/* Language switcher dropdown (English / Kurdish Sorani / Iraqi Arabic).
   Built on a native <details> element so it needs no framework JS. */

.lang-menu { position: relative; display: inline-block; }

.lang-menu > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary::marker { content: ""; }

.lang-caret {
    font-size: 16px;
    line-height: 1;
    opacity: .9;
    transition: transform .15s ease;
}
.lang-menu[open] .lang-caret { transform: rotate(180deg); }

.lang-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 1200;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--modern-line, #e4e7ec);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, .14);
}

.lang-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #1d2939;
    font-weight: 700;
    white-space: nowrap;
    text-align: start;
}
.lang-menu-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.lang-flag {
    flex-shrink: 0;
    width: 20px;
    height: 14px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(16, 24, 40, .12);
    overflow: hidden;
}
.lang-menu-item:hover { background: #eef2ff; color: #4338ca; }
.lang-menu-item.is-active { background: #eef2ff; color: #4f46e5; }
.lang-menu-item.is-active::after { content: "\2713"; font-weight: 900; }

/* Inline variant used inside the stacked mobile menu. */
.lang-menu--inline { display: block; width: 100%; }
.lang-menu--inline .lang-menu-panel {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 4px 0 0;
    min-width: 0;
    background: transparent;
}

/* Dark theme */
body.theme-dark .lang-menu-panel { background: #171331; border-color: #382a66; }
body.theme-dark .lang-menu-item { color: #f8fafc; }
body.theme-dark .lang-menu-item:hover { background: #2a2347; color: #c7d2fe; }
body.theme-dark .lang-menu-item.is-active { background: #2a2347; color: #c7d2fe; }
