/* Havezic-style skin for GTranslate dropdown_with_flags (dwf) widget.
 * All selectors are prefixed with `html` to beat GT's runtime-injected rules,
 * which use the same class-level specificity AND !important. */

html .gtranslate_wrapper {
    display: inline-block;
    position: relative;
    z-index: 1000;
}

html .gtranslate_wrapper .gt_switcher {
    position: relative;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    font-family: Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.4;
    border: 0 !important;
}

/* ---- Trigger (selected language) ---- */
html .gtranslate_wrapper .gt_switcher .gt_selected {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
    position: relative;
    z-index: 1;
}

html .gtranslate_wrapper .gt_switcher .gt_selected a {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #fff !important;
    font-family: Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: capitalize !important;
    text-decoration: none !important;
    cursor: pointer;
}

html .gtranslate_wrapper .gt_switcher .gt_selected a:hover {
    background: transparent !important;
}

/* Hide the flag on the trigger; keep flags in the dropdown list */
html .gtranslate_wrapper .gt_switcher .gt_selected a img {
    display: none !important;
}

/* Globe icon before the language name */
html .gtranslate_wrapper .gt_switcher .gt_selected a::before {
    content: '' !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 6px !important;
    background-image: url('pt-globe.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    filter: brightness(0) invert(1);
    vertical-align: middle !important;
    flex: 0 0 auto;
}

/* Recolor + reposition GTranslate's built-in SVG chevron (its #666 SVG on dark bar). */
html .gtranslate_wrapper .gt_switcher .gt_selected a::after {
    position: static !important;
    width: 10px !important;
    height: 10px !important;
    right: auto !important;
    margin-left: 6px !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
    display: inline-block !important;
    vertical-align: middle !important;
}

html .gtranslate_wrapper .gt_switcher .gt_selected a.open::after {
    transform: rotate(180deg);
}

/* ---- Dropdown panel ---- */
html .gtranslate_wrapper .gt_switcher .gt_option {
    position: absolute !important;
    top: calc(100% + 20px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 180px !important;
    width: auto !important;
    height: auto !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    background: #fff !important;
    border: 1px solid #dee0ea !important;
    border-radius: 6px !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05) !important;
    z-index: 999;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    transition: none !important;
}

html .gtranslate_wrapper .gt_switcher .gt_option a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 7px 15px !important;
    width: auto !important;
    border: 0 !important;
    background: transparent !important;
    color: #6e6e6e !important;
    font-family: Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

html .gtranslate_wrapper .gt_switcher .gt_option a:hover {
    background: transparent !important;
    color: #f2295b !important;
}

/* Hide flags in dropdown rows too — text only */
html .gtranslate_wrapper .gt_switcher .gt_option a img {
    display: none !important;
}

/* Transparent bridge over the 20px gap between trigger and dropdown,
 * so moving the cursor from trigger to panel doesn't break :hover. */
html .gtranslate_wrapper .gt_switcher .gt_option::before {
    content: '' !important;
    position: absolute !important;
    top: -20px !important;
    left: 0 !important;
    right: 0 !important;
    height: 20px !important;
    background: transparent !important;
}

/* Hover-to-open — matches demo */
html .gtranslate_wrapper .gt_switcher:hover .gt_option {
    display: block !important;
}
