/* ============================================================
   ACC-TRANS Language / Country / Currency Switcher CSS v1.0.0
   All classes use acc-trans- prefix
   ============================================================ */

.acc-trans-switcher {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    position: relative;
}

/* ── Item container ──────────────────────────────────────────── */
.acc-trans-switcher-item {
    position: relative;
    display: inline-block;
}

/* ── Toggle button ───────────────────────────────────────────── */
.acc-trans-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.4;
    color: #1d2327;
    font-family: inherit;
}

.acc-trans-switcher-btn:hover,
.acc-trans-switcher-item.open .acc-trans-switcher-btn {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,.2);
    outline: none;
    color: #2271b1;
}

.acc-trans-switcher-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* ── Dropdown ────────────────────────────────────────────────── */
.acc-trans-switcher-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    z-index: 99999;
}

.acc-trans-switcher-item.open .acc-trans-switcher-dropdown {
    display: block;
    animation: acc-trans-dropdown-in 0.15s ease;
}

@keyframes acc-trans-dropdown-in {
    from { transform: translateY(-6px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Search ──────────────────────────────────────────────────── */
.acc-trans-switcher-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
    outline: none;
    color: #1d2327;
    background: #f6f7f7;
    border-radius: 8px 8px 0 0;
    font-family: inherit;
}

.acc-trans-switcher-search:focus {
    background: #f0f6fc;
}

/* ── List items ──────────────────────────────────────────────── */
.acc-trans-switcher-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.acc-trans-switcher-dropdown li {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.1s;
    white-space: nowrap;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acc-trans-switcher-dropdown li:hover {
    background: #f0f6fc;
    color: #2271b1;
}

.acc-trans-switcher-dropdown li.active {
    background: #e8f0fe;
    font-weight: 600;
    color: #2271b1;
}

.acc-trans-switcher-dropdown li.hidden {
    display: none;
}

/* ── Scrollbar ───────────────────────────────────────────────── */
.acc-trans-switcher-dropdown::-webkit-scrollbar {
    width: 6px;
}

.acc-trans-switcher-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.acc-trans-switcher-dropdown::-webkit-scrollbar-thumb {
    background: #c3c4c7;
    border-radius: 3px;
}

/* ── RTL ─────────────────────────────────────────────────────── */
[dir="rtl"] .acc-trans-switcher-dropdown {
    left: auto;
    right: 0;
}

[dir="rtl"] .acc-trans-switcher {
    flex-direction: row-reverse;
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .acc-trans-switcher {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .acc-trans-switcher-item {
        width: 100%;
    }

    .acc-trans-switcher-btn {
        width: 100%;
        justify-content: space-between;
    }

    .acc-trans-switcher-dropdown {
        width: 100%;
        position: static;
        box-shadow: none;
        border: 1px solid #c3c4c7;
        border-radius: 6px;
        margin-top: 4px;
    }
}
