.lang-wrap { position: fixed; inset: 0; z-index: 400; background: rgba(15,15,20,.55); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.lang-box { position: relative; width: min(560px, 100%); background: var(--surface, #fff); color: var(--ink, #1D1D1F); border-radius: 24px; padding: 32px; box-shadow: 3px 5px 30px rgba(0,0,0,.25); text-align: center; }
.lang-globe { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0071E3, #6C5CE7 55%, #D97757); }
.lang-globe svg { width: 28px; height: 28px; }
.lang-box h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.lang-sub { margin: 6px 0 22px; color: var(--ink-2, #6E6E73); font-size: 14px; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lang-opt { min-height: 48px; border-radius: 12px; border: 1px solid var(--border-strong, rgba(0,0,0,.16)); background: var(--surface, #fff); font-size: 16px; cursor: pointer; transition: border-color .15s, background .15s; color: inherit; }
.lang-opt:hover { border-color: #0071E3; background: rgba(0,113,227,.06); }
.lang-opt.on { border: 2px solid #0071E3; background: rgba(0,113,227,.08); font-weight: 600; }
.lang-opt:focus-visible { outline: 2px solid #0071E3; outline-offset: 2px; }
.lang-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-subtle, #F5F5F7); cursor: pointer; color: var(--ink-2, #6E6E73); }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-strong, rgba(0,0,0,.16)); background: transparent; color: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.lang-switch:hover { background: var(--bg-subtle, #F5F5F7); }
.lang-switch svg { flex: none; }
.lang-note { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 350; background: #1D1D1F; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; box-shadow: 3px 5px 30px rgba(0,0,0,.22); max-width: 92vw; text-align: center; }
.legal-banner { margin: 16px 0 8px; padding: 12px 16px; border-radius: 12px; background: #FFF4DE; color: #6B4300; font-size: 14px; line-height: 1.5; }
.legal-banner a { color: #0066CC; }
/* Right-to-left (Arabic) */
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--border); }
[dir="rtl"] .drawer { margin-left: 0; margin-right: auto; }
[dir="rtl"] .search svg { left: auto; right: 12px; } [dir="rtl"] .search input { padding-left: 14px; padding-right: 36px; }
[dir="rtl"] .a-trash { right: auto; left: 12px; } [dir="rtl"] .a-card h3 { padding-right: 0 !important; padding-left: 34px; }
[dir="rtl"] .t th, [dir="rtl"] .t td { text-align: right; } [dir="rtl"] .t .num { text-align: left; }
[dir="rtl"] .lang-close { right: auto; left: 14px; }
[dir="rtl"] .eula ul, [dir="rtl"] .doc ul { padding-left: 0; padding-right: 20px; }

.dark-switch .lang-switch { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.22); }
.dark-switch .lang-switch:hover { background: rgba(255,255,255,.08); }

.lang-note-btn { margin-left: 8px; background: #fff; color: #1D1D1F; border: 0; border-radius: 999px; padding: 4px 12px; font: inherit; font-weight: 600; cursor: pointer; }
