/* Language menu (includes/sw_ui_lang.php sw_ui_switcher_html): site header, listen app, Bible / directory pages.
   A <details> dropdown; logical properties so it mirrors in right-to-left languages. */
.sw-lang-menu { position: relative; display: inline-block; font-family: var(--font-heading, inherit); }
.sw-lang-menu > summary { list-style: none; cursor: pointer; }
.sw-lang-menu > summary::-webkit-details-marker { display: none; }
.sw-lang-menu__btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
    padding: 4px 14px; border: 1px solid rgba(255,255,255,0.2); border-radius: 100px;
    color: inherit; font-size: 0.8125rem; letter-spacing: 0.02em; white-space: nowrap;
    transition: border-color .2s, background .2s;
}
.sw-lang-menu__btn:hover, .sw-lang-menu[open] > .sw-lang-menu__btn { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.08); }
.sw-lang-menu__btn:focus-visible { outline: 2px solid var(--aqua, #00BCD4); outline-offset: 2px; }
.sw-lang-menu__globe { flex: none; opacity: .85; }
.sw-lang-menu__list {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 1200;
    margin: 0; padding: 6px; list-style: none;
    display: grid; grid-template-columns: repeat(2, minmax(9.5rem, 1fr)); gap: 2px;
    width: max-content; max-width: min(92vw, 26rem); max-height: min(70vh, 32rem); overflow-y: auto;
    background: var(--navy-mid, #132347); border: 1px solid rgba(255,255,255,0.14); border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.sw-lang-menu__list:has(> li:nth-child(-n+6):last-child) { grid-template-columns: minmax(9.5rem, 1fr); }
.sw-lang-menu__item {
    display: block; padding: 8px 12px; border-radius: 8px; color: #fff !important; text-decoration: none;
    font-size: 0.9375rem; line-height: 1.35; white-space: nowrap; text-align: start;
}
.sw-lang-menu__item:hover, .sw-lang-menu__item:focus-visible { background: rgba(255,255,255,0.1); }
.sw-lang-menu__item.is-active { background: rgba(0,188,212,0.18); font-weight: 600; }

/* light surfaces (listen app light theme, cards) */
.sw-lang-menu--light .sw-lang-menu__btn { border-color: rgba(13,27,62,0.2); }
.sw-lang-menu--light .sw-lang-menu__btn:hover, .sw-lang-menu--light[open] > .sw-lang-menu__btn { border-color: rgba(13,27,62,0.45); background: rgba(13,27,62,0.05); }

/* site header: collapsed (hamburger) nav up to 1180 px - the list opens in place, full width */
@media (max-width: 1180px) {
    .header__lang { display: block; width: 100%; margin-top: var(--space-sm, 8px); }
    .header__lang > .sw-lang-menu__btn { min-height: 44px; }
    .header__lang .sw-lang-menu__list {
        position: static; width: 100%; max-width: none; max-height: none; margin-top: 8px;
        grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); box-shadow: none;
    }
}
/* same in a collapsed wide header (.header--compact, includes/header.php) */
.header--compact .header__lang { display: block; width: 100%; margin-top: var(--space-sm, 8px); }
.header--compact .header__lang > .sw-lang-menu__btn { min-height: 44px; }
.header--compact .header__lang .sw-lang-menu__list {
    position: static; width: 100%; max-width: none; max-height: none; margin-top: 8px;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); box-shadow: none;
}
