/* assets/learn-lang.css - the language switcher, the one-time suggestion and the "shown in English" note (5 Nov 2026).
   Dark by default; light only via :root[data-theme="light"] (never prefers-color-scheme). Logical properties, so it mirrors in Arabic. */
.lrn-lang { position: relative; display: inline-block; }
.lrn-lang > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-inline: 14px; border-radius: 999px; background: #0b0b0b; color: #fff; font: 600 14px var(--st-ui, Inter, sans-serif); box-shadow: inset 0 0 0 1px rgba(255,207,94,.55); user-select: none; }
.lrn-lang > summary::-webkit-details-marker { display: none; }
.lrn-lang > summary:focus-visible, .lrn-lang-m a:focus-visible, .lrn-hlsug a:focus-visible { outline: 2px solid var(--st-accent, #ffcf5e); outline-offset: 2px; }
.lrn-lang .lrn-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lrn-lang-m { position: absolute; z-index: 60; inset-block-start: calc(100% + 6px); inset-inline-start: 0; margin: 0; padding: 6px; list-style: none; min-width: 190px; max-height: min(70vh, 420px); overflow: auto; border-radius: 14px; background: #10131c; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.lrn-lang-m li { margin: 0; }
.lrn-lang-m a { display: flex; align-items: center; min-height: 44px; padding-inline: 12px; border-radius: 10px; color: #f3f5fb; text-decoration: none; font: 500 15px var(--st-ui, Inter, sans-serif); }
.lrn-lang-m a:hover { background: rgba(255,207,94,.12); }
.lrn-lang-m a[data-hl-go] { cursor: pointer; }   /* a language opened by the script (no href: 11 Nov 2026) */
.lrn-lang-m a[aria-current="true"] { background: #0b0b0b; color: #fff; box-shadow: inset 0 0 0 1.5px var(--st-accent, #ffcf5e); }
.lrn-hlsug { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 12px 0; padding: 12px 16px; border-radius: 14px; background: rgba(255,207,94,.08); border: 1px solid rgba(255,207,94,.35); color: var(--st-ink, #f3f5fb); font: 500 15px/1.5 var(--st-ui, Inter, sans-serif); }
.lrn-hlsug p { margin: 0; flex: 1 1 260px; }
.lrn-hlsug a { color: var(--st-accent, #ffcf5e); font-weight: 700; }
.lrn-lang-note { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.06); color: var(--st-ink-2, rgba(243,245,251,.86)); font: 500 14px/1.5 var(--st-ui, Inter, sans-serif); }
.lrn-lang-note .lrn-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; margin-block-start: 2px; }
:root[data-theme="light"] .lrn-lang-m { background: #fff; border-color: rgba(0,0,0,.14); box-shadow: 0 14px 40px rgba(0,0,0,.18); }
:root[data-theme="light"] .lrn-lang-m a { color: #10131c; }
:root[data-theme="light"] .lrn-lang-m a[aria-current="true"], :root[data-theme="light"] .lrn-lang-m a[aria-current="true"]:hover { color: #fff; background: #0b0b0b; }
:root[data-theme="light"] .lrn-lang-m a:hover { background: rgba(122,86,0,.1); }
:root[data-theme="light"] .lrn-hlsug { background: rgba(122,86,0,.08); border-color: rgba(122,86,0,.4); color: #10131c; }
:root[data-theme="light"] .lrn-hlsug a { color: #7a5600; }
:root[data-theme="light"] .lrn-lang-note { background: rgba(0,0,0,.05); color: #20232d; }
@media (max-width: 480px) { .lrn-lang-m { min-width: 170px; } .lrn-lang > summary { padding-inline: 12px; } }
/* in the Learn bar: compact; on phones the bar has no room (it would widen the page), so the switcher sits in its own row under the bar */
.lrn-lang--bar > summary { min-height: 44px; padding-inline: 10px; font-size: 13px; }
.lrn-lang--bar .lrn-lang-m { inset-inline-start: auto; inset-inline-end: 0; }
.lrn-lang--row .lrn-lang-m { inset-block-start: auto; inset-block-end: calc(100% + 6px); inset-inline-start: 50%; transform: translateX(-50%); }
.lrn-lang-row { display: none; }
@media (max-width: 640px) { .lrn-lang--bar { display: none; } .lrn-lang-row { display: flex; justify-content: center; margin: 16px 0 8px; } .lrn-lang--row > summary { min-height: 44px; } }
.sn-lang { padding: 10px 14px; }
.lrn-lang--menu > summary { width: 100%; justify-content: flex-start; min-height: 44px; }
.lrn-lang--menu { display: block; }
.lrn-lang--menu .lrn-lang-m { position: static; margin: 6px 0 0; box-shadow: none; max-height: 50vh; }
