/* Trilingual Switcher v3 — style.css */

/* Hide ALL Google Translate UI */
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-menu-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-text-highlight,
.skiptranslate,
#tls-google-element          { display: none !important; visibility: hidden !important; }
body                         { top: 0 !important; }
iframe.goog-te-banner-frame  { display: none !important; }

/* ── Wrapper ── */
.tls-wrap {
    position: relative;
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    z-index: 99999;
    vertical-align: middle;
}

/* ── Trigger Button ── */
.tls-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    background: #ffffff;
    border: 1.5px solid #cccccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #333333;
    white-space: nowrap;
    min-width: 120px;
    justify-content: space-between;
    transition: border-color .18s, box-shadow .18s, background .18s;
    line-height: 1.4;
}

.tls-btn:hover,
.tls-btn:focus-visible {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, .15);
    background: #f8fafc;
    outline: none;
}

.tls-wrap.is-open .tls-btn {
    border-color: #0073aa;
    border-radius: 6px 6px 0 0;
    background: #f8fafc;
}

/* Caret arrow */
.tls-caret {
    flex-shrink: 0;
    opacity: .45;
    transition: transform .2s;
}
.tls-wrap.is-open .tls-caret {
    transform: rotate(180deg);
    opacity: .7;
}

/* ── Dropdown List ── */
.tls-list {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #ffffff;
    border: 1.5px solid #0073aa;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
    z-index: 100000;
    animation: tlsSlide .15s ease;
}

@keyframes tlsSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Items ── */
.tls-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    cursor: pointer;
    color: #333333;
    white-space: nowrap;
    gap: 10px;
    transition: background .12s, color .12s;
    user-select: none;
    outline: none;
}

.tls-item:hover,
.tls-item:focus {
    background: #f0f7ff;
    color: #0073aa;
}

.tls-item.is-active {
    background: #f0f7ff;
    color: #0073aa;
    font-weight: 600;
}

.tls-tick {
    font-size: 11px;
    color: #0073aa;
    flex-shrink: 0;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
    .tls-btn {
        background: #2c2c2c;
        border-color: #555;
        color: #e0e0e0;
    }
    .tls-btn:hover, .tls-btn:focus-visible,
    .tls-wrap.is-open .tls-btn {
        border-color: #5aaddb;
        background: #222;
    }
    .tls-list {
        background: #2c2c2c;
        border-color: #5aaddb;
    }
    .tls-item { color: #e0e0e0; }
    .tls-item:hover, .tls-item:focus, .tls-item.is-active {
        background: #1a3a50;
        color: #5aaddb;
    }
    .tls-tick { color: #5aaddb; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .tls-btn { min-width: 90px; padding: 6px 10px; font-size: 13px; }
    .tls-item { padding: 11px 14px; }
}

/* ── RTL ── */
[dir="rtl"] .tls-list { left: auto; right: 0; }
