/**
 * KKU Web — Dil değiştirici (header)
 * Koyu tema: --kku-cm-* değişkenleri. Dropdown: yüksek z-index + overflow kaçışı.
 */

/* Sticky header içindeki ancestor'lar menüyü kesmesin */
.kku-red-header,
.kku-red-header > .container,
.kku-red-header .header-bar,
.kku-red-header .header-bar-inner,
.kku-red-header .header-actions {
    overflow: visible !important;
}

.kku-lang-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 2rem;
    padding: 0 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s ease, color 0.2s ease;
}

.kku-lang-switch__btn:hover,
.kku-lang-switch__btn:focus-visible {
    background: #fff;
    color: #b91c1c;
    outline: none;
}

.kku-lang-switch__btn::after {
    display: none;
}

.kku-lang-switch__code {
    text-transform: uppercase;
}

.kku-lang-switch__menu.dropdown-menu,
.kku-red-header .kku-lang-switch__menu.dropdown-menu {
    z-index: 1080 !important;
    min-width: 10.5rem;
    padding: 0.4rem;
    margin-top: 0.4rem !important;
    border: 1px solid var(--kku-cm-border, #e2e8f0) !important;
    border-radius: 0.75rem !important;
    background: var(--kku-cm-surface, #ffffff) !important;
    color: var(--kku-cm-text, #1e293b) !important;
    box-shadow: 0 14px 36px var(--kku-cm-shadow, rgba(15, 23, 42, 0.2)) !important;
}

.kku-lang-switch__item.dropdown-item,
.kku-red-header .kku-lang-switch__item.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--kku-cm-text, #1e293b) !important;
    background: transparent !important;
}

.kku-lang-switch__item.dropdown-item:hover,
.kku-lang-switch__item.dropdown-item:focus,
.kku-red-header .kku-lang-switch__item.dropdown-item:hover,
.kku-red-header .kku-lang-switch__item.dropdown-item:focus {
    background: rgba(185, 28, 28, 0.1) !important;
    color: #b91c1c !important;
}

.kku-lang-switch__item.dropdown-item.active,
.kku-red-header .kku-lang-switch__item.dropdown-item.active {
    background: rgba(185, 28, 28, 0.14) !important;
    color: #b91c1c !important;
    font-weight: 600;
}

.kku-lang-switch__item-code {
    font-weight: 700;
    font-size: 0.75rem;
    opacity: 0.8;
    min-width: 1.6rem;
    letter-spacing: 0.03em;
}

.kku-lang-switch__item-name {
    flex: 1;
    min-width: 0;
}

/* Koyu tema: hover/active kırmızı tonları metinle uyumlu kalsın */
html[data-color-mode="dark"] .kku-lang-switch__item.dropdown-item:hover,
html[data-color-mode="dark"] .kku-lang-switch__item.dropdown-item:focus,
html[data-color-mode="dark"] .kku-lang-switch__item.dropdown-item.active,
html[data-color-mode="dark"] .kku-red-header .kku-lang-switch__item.dropdown-item:hover,
html[data-color-mode="dark"] .kku-red-header .kku-lang-switch__item.dropdown-item:focus,
html[data-color-mode="dark"] .kku-red-header .kku-lang-switch__item.dropdown-item.active {
    background: rgba(248, 113, 113, 0.16) !important;
    color: #fca5a5 !important;
}

@media (max-width: 575.98px) {
    .kku-lang-switch__item-name {
        display: none;
    }

    .kku-lang-switch__menu.dropdown-menu {
        min-width: 4.25rem;
    }
}
