/* Tripgo Child — Polylang language switcher dropdown.
   Uses CSS logical properties so RTL (Arabic) works without overrides. */

.tgc-lang-switcher {
    position: relative;
    display: inline-block;
    font-size: 14px;
    line-height: 1;
}

.tgc-lang-switcher .tgc-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.tgc-lang-switcher .tgc-switcher__toggle:hover,
.tgc-lang-switcher .tgc-switcher__toggle:focus-visible {
    border-color: var(--color-primary, #c94a30);
}

.tgc-lang-switcher .tgc-switcher__flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    flex: 0 0 auto;
}

.tgc-lang-switcher .tgc-switcher__caret {
    width: 0;
    height: 0;
    border-inline-start: 4px solid transparent;
    border-inline-end: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
}

.tgc-lang-switcher.is-open .tgc-switcher__caret {
    transform: rotate(180deg);
}

.tgc-lang-switcher .tgc-switcher__menu {
    position: absolute;
    top: calc(100% + 4px);
    inset-inline-end: 0;
    min-width: 160px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
}

.tgc-lang-switcher.is-open .tgc-switcher__menu {
    display: block;
}

.tgc-lang-switcher .tgc-switcher__item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.tgc-lang-switcher .tgc-switcher__item a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tgc-lang-switcher .tgc-switcher__item.is-active a {
    color: var(--color-primary, #c94a30);
    font-weight: 600;
}

/* Mobile: larger touch targets */
@media (max-width: 767px) {
    .tgc-lang-switcher .tgc-switcher__toggle {
        padding: 10px 12px;
    }

    .tgc-lang-switcher .tgc-switcher__item a {
        padding: 12px 16px;
    }
}
