/* ==========================================================================
   Language dropdown (shared component)
   Used by: Home/Index, Home/CerezPolitikasi, Home/KvkkAydinlatmaMetni
   ========================================================================== */

.lang-dd {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 18px;
    font-family: inherit;
}

.lang-dd__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .10);
    color: #fff;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.lang-dd__toggle:hover {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .55);
}

.lang-dd__toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, .55);
}

.lang-dd__globe {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    position: relative;
    opacity: .9;
    flex: 0 0 auto;
}

.lang-dd__globe:before {
    content: "";
    position: absolute;
    left: 50%;
    top: 1px;
    bottom: 1px;
    width: 2px;
    background: currentColor;
    transform: translateX(-50%);
}

.lang-dd__globe:after {
    content: "";
    position: absolute;
    left: 1px;
    right: 1px;
    top: 50%;
    height: 2px;
    background: currentColor;
    transform: translateY(-50%);
}

.lang-dd__flag {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.lang-dd__code {
    font-size: 13px;
    text-transform: uppercase;
}

.lang-dd__chev {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .25s ease;
}

.lang-dd.is-open .lang-dd__chev {
    transform: rotate(-135deg) translate(-1px, -1px);
}

.lang-dd__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    color: #101820;
    border-radius: 14px;
    border: 1px solid rgba(16, 24, 32, .06);
    box-shadow: 0 18px 40px -12px rgba(9, 16, 32, .45), 0 4px 12px rgba(0, 0, 0, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.98);
    transform-origin: top right;
    z-index: 1050;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.lang-dd.is-open .lang-dd__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-dd__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #101820;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s ease, color .15s ease;
}

.lang-dd__item:hover {
    background: #f2f5f9;
}

.lang-dd__item.is-active {
    background: #101820;
    color: #fff;
}

.lang-dd__item img {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.lang-dd__item span:first-of-type {
    flex: 1 1 auto;
}

/* Fallback when a language has no flag image: render its code as a small chip. */
.lang-dd__item span.lang-dd__fallback {
    width: 24px;
    height: 16px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: #eef1f5;
    color: #101820;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.lang-dd__item span.lang-dd__fallback + span {
    flex: 1 1 auto;
}

.lang-dd__check {
    width: 12px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    opacity: 0;
}

.lang-dd__item.is-active .lang-dd__check {
    opacity: 1;
}

@media (max-width: 991.98px) {
    .lang-dd {
        margin: 10px 0 4px;
    }

    .lang-dd__menu {
        right: auto;
        left: 0;
    }
}
