/* Language switcher — SparkBIM / GTranslate style (self-hosted UI) */

/* Hide ALL Google Translate UI chrome */
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
.skiptranslate iframe,
body > .skiptranslate,
iframe.skiptranslate,
#goog-gt-vt,
.goog-te-balloon-frame,
div#goog-gt-tt,
.goog-tooltip,
.goog-text-highlight {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body {
    top: 0 !important;
    position: static !important;
    margin-top: 0 !important;
}

html.translated-ltr,
html.translated-rtl {
    margin-top: 0 !important;
}

#google_translate_element,
.goog-te-gadget,
.goog-te-combo {
    display: none !important;
}

.gt-float-switcher {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 99999;
    font-family: var(--default-font, 'DM Sans', sans-serif);
    background: #fff;
    border: 1px solid rgba(13, 16, 26, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(13, 16, 26, 0.12);
    min-width: 120px;
}

.gt-selected {
    cursor: pointer;
}

.gt-current-lang {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #0d101a;
}

.gt-current-lang img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 2px;
    flex-shrink: 0;
}

.gt-lang-code {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.gt-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #0d101a;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.gt-float-switcher.gt-open .gt-arrow {
    transform: rotate(180deg);
}

.gt-options {
    display: none;
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    width: 280px;
    max-height: 360px;
    background: #fff;
    border: 1px solid rgba(13, 16, 26, 0.1);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(13, 16, 26, 0.16);
    overflow: hidden;
    z-index: 100000;
}

.gt-float-switcher.gt-open .gt-options {
    display: block;
}

.gt-search-wrap {
    padding: 10px;
    border-bottom: 1px solid rgba(13, 16, 26, 0.08);
}

.gt-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(13, 16, 26, 0.12);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.gt-search:focus {
    border-color: var(--accent-color, #1f5eff);
}

.gt-options-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 6px 0;
}

.gt-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #0d101a;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.gt-lang-item:hover,
.gt-lang-item.gt-current {
    background: rgba(31, 94, 255, 0.08);
}

.gt-lang-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 575px) {
    .gt-float-switcher {
        left: 12px;
        bottom: 12px;
    }

    .gt-options {
        width: min(280px, calc(100vw - 24px));
    }
}
