/* ============================================================
   TIMTIM Translate — Language switcher + RTL support
   ============================================================ */

/* ── Dropdown wrapper ────────────────────────────────────────── */

.timtim-lang-switch {
    position: relative;
    display: inline-block;
    font-family: inherit;
}

/* ── Trigger — "En ∨" ────────────────────────────────────────── */

.timtim-lang-trigger {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #3C2D13;
    font-size: 15px;
    font-weight: 400;
    font-family: inherit;
    line-height: 1;
    padding: 6px 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    letter-spacing: 0.01em;
}

.timtim-lang-trigger:hover { opacity: 0.6; }

.timtim-lang-chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    transition: transform 0.18s ease;
    opacity: 0.55;
    flex-shrink: 0;
    position: relative;
    top: 0.5px;
}

.timtim-lang-switch.is-open .timtim-lang-chevron {
    transform: rotate(180deg);
}

/* ── Dropdown panel ──────────────────────────────────────────── */

.timtim-lang-dropdown {
    display: none !important;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid rgba(60, 45, 19, 0.1);
    border-radius: 8px;
    padding: 4px;
    min-width: 120px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
    z-index: 99999;
}

.timtim-lang-switch.is-open .timtim-lang-dropdown {
    display: block !important;
}

/* ── Option buttons ──────────────────────────────────────────── */

.timtim-lang-btn {
    all: unset;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 5px;
    color: #3C2D13;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.timtim-lang-btn:hover     { background: rgba(60, 45, 19, 0.06); }
.timtim-lang-btn.is-active { font-weight: 600; }

.timtim-lang-btn .tt-flag {
    font-size: 15px;
    line-height: 1;
}

/* ── RTL ─────────────────────────────────────────────────────── */

html.tt-rtl { direction: rtl; }

html.tt-rtl .tt-rtl-flip        { flex-direction: row-reverse; }
html.tt-rtl .tt-text-start       { text-align: right; }
html:not(.tt-rtl) .tt-text-start { text-align: left; }

/* ── Language content ────────────────────────────────────────── */

.tt-lang-default,
.tt-lang-es,
.tt-lang-ar { transition: opacity 0.2s ease; }
