/* Language switch (header) */
.lang-wrap { position: relative; }
button.lang-pill { font: inherit; font-size: 0.85rem; font-weight: 600; }
.lang-menu {
    position: absolute;
    inset-inline-end: 0;   /* right in LTR, left in RTL (Arabic, Urdu) */
    top: calc(100% + 8px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    min-width: 170px;
    max-height: min(60vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.lang-menu.hidden { display: none; }
.lang-menu button {
    padding: 10px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.95rem;
    text-align: start;
    cursor: pointer;
}
.lang-menu button:hover { background: rgba(255, 255, 255, 0.08); }
.lang-menu button[aria-checked="true"] { color: var(--brand-red); font-weight: 700; }
.lang-menu button[aria-checked="true"]::after { content: ' ✓'; }

/* Right-to-left (Arabic, Urdu): arrows point the reading way; times, links and the
   video timeline stay left-to-right like the player itself */
[dir="rtl"] .btn-arrow { transform: scaleX(-1); }
[dir="rtl"] .status-slider,
[dir="rtl"] .status-input { direction: ltr; }
