/* ARRIVE – dark mode, Arabic (RTL) fixes and the language/theme buttons. Load LAST on every page. */

/* ---------------------------------------------------------------- language / theme buttons */
.prefs{display:flex;align-items:center;gap:6px;margin:0 14px}
.prefs.floating{position:fixed;top:12px;right:12px;z-index:200}
.pref-btn{width:38px;height:38px;border-radius:50%;border:1px solid rgba(127,160,210,.45);background:rgba(255,255,255,.08);color:inherit;font:600 14px 'Cairo','Poppins',system-ui,sans-serif;cursor:pointer;display:grid;place-items:center;transition:background .2s,transform .2s}
.pref-btn:hover{background:rgba(47,128,255,.18);transform:translateY(-1px)}
header.top .pref-btn{background:var(--soft);border-color:var(--line);color:var(--navy)}
@media(max-width:900px){.prefs{margin:0 6px}}

/* Google button block on sign in / sign up */
.google-block[hidden]{display:none}
.gwrap{display:flex;justify-content:center;min-height:44px}

/* ---------------------------------------------------------------- Arabic */
html[lang=ar] body,html[lang=ar] input,html[lang=ar] button,html[lang=ar] select,html[lang=ar] textarea,
html[lang=ar] h1,html[lang=ar] h2,html[lang=ar] h3,html[lang=ar] h4,html[lang=ar] p,html[lang=ar] a,html[lang=ar] span,html[lang=ar] label,html[lang=ar] li,html[lang=ar] b,html[lang=ar] small,html[lang=ar] strong,html[lang=ar] em,
html[lang=ar] .ac-panel,html[lang=ar] .ac-launcher,html[lang=ar] .ac-btn,html[lang=ar] .ac-chip,html[lang=ar] .ac-input textarea{font-family:'Cairo','Poppins',system-ui,sans-serif}
html[lang=ar] .logo b,html[lang=ar] .logo small{font-family:'Poppins','Cairo',system-ui,sans-serif}
html[lang=ar] .hero h1,html[lang=ar] .sv-hero h1{letter-spacing:0}

/* right-to-left adjustments */
[dir=rtl] .field .l{left:auto;right:0}
[dir=rtl] .field .eye{right:auto;left:0}
[dir=rtl] .field input[type=text]{padding-left:46px;padding-right:46px}
[dir=rtl] .search{margin-left:0;margin-right:60px}
[dir=rtl] .search::before{left:auto;right:15px}
[dir=rtl] .search input{padding:0 42px 0 16px}
[dir=rtl] .tools{margin-left:0;margin-right:auto}
[dir=rtl] .menu{right:auto;left:0}
[dir=rtl] .side{border-right:0;border-left:1px solid var(--line);padding-right:0;padding-left:16px}
[dir=rtl] .sec-head .more,[dir=rtl] .more{margin-left:0;margin-right:auto}
[dir=rtl] .panel h3 a,[dir=rtl] .panel h3 button{margin-left:0;margin-right:auto}
[dir=rtl] .zoom{right:auto;left:8px}
[dir=rtl] .legend i{margin-right:0;margin-left:5px}
[dir=rtl] .bell em{right:auto;left:-6px}
[dir=rtl] .app li::before{margin-right:0;margin-left:10px}
[dir=rtl] .strip div{border-right:0;border-left:1px solid #e2e8f0}
[dir=rtl] .perks .grid4{text-align:right}
[dir=rtl] .pay.loading::before{margin-right:0;margin-left:8px}
[dir=rtl] .sum-row b{text-align:left}
[dir=rtl] .option{padding:16px 46px 14px 16px}
[dir=rtl] .option input{left:auto;right:16px}
[dir=rtl] .tlegs{text-align:right}
[dir=rtl] .fav-go{text-align:right}
[dir=rtl] .mm-close{right:auto;left:20px}
[dir=rtl] .ac-launcher,[dir=rtl] .ac-panel{right:auto;left:22px}
@media(max-width:520px){[dir=rtl] .ac-panel{left:0}}
[dir=rtl] .ac-msg.me{align-self:flex-start}[dir=rtl] .ac-msg.bot{align-self:flex-end}
[dir=rtl] .ac-msg.me .ac-text{border-bottom-right-radius:14px;border-bottom-left-radius:4px}
[dir=rtl] .ac-msg.bot .ac-text{border-bottom-left-radius:14px;border-bottom-right-radius:4px}
[dir=rtl] .prefs.floating{right:auto;left:12px}
[dir=rtl] .dd-btn i{transform:none}
[dir=rtl] .history li{direction:rtl}
/* numbers, card numbers, codes and e-mail stay left-to-right */
[dir=rtl] input[type=email],[dir=rtl] input[name=number],[dir=rtl] input[name=expiry],[dir=rtl] input[name=cvc],[dir=rtl] input[name=phone],[dir=rtl] input[name=token],[dir=rtl] input[type=tel],[dir=rtl] #scan,[dir=rtl] .tid{direction:ltr;text-align:right}

/* ---------------------------------------------------------------- dark mode */
html[data-theme=dark]{color-scheme:dark;--ink:#e2e8f0;--muted:#94a3b8;--light:#0f172a;--soft:#172033;--navy:#f8fafc;--line:#273449}
html[data-theme=dark] body{background:#0b1020;color:var(--ink)}

/* public pages (style.css) */
html[data-theme=dark] header{background:rgba(4,12,26,.94)}
html[data-theme=dark] .strip,html[data-theme=dark] .steps{background:#0f172a}
html[data-theme=dark] .strip div{border-color:#273449}
html[data-theme=dark] .split .txt{background:#131c31}
html[data-theme=dark] .app,html[data-theme=dark] .perks{background:#0b1020}
html[data-theme=dark] .phone{background:linear-gradient(#1e293b,#131c31);color:#e2e8f0;border-color:#000}
html[data-theme=dark] footer.foot{background:#080c18}
html[data-theme=dark] .sv,html[data-theme=dark] .si{background:#0b1020}
html[data-theme=dark] .card{background:#131c31}
html[data-theme=dark] .form-card{background:#131c31;color:var(--ink);box-shadow:0 24px 60px rgba(0,0,0,.6)}
html[data-theme=dark] .form-card h2{color:#f8fafc}
html[data-theme=dark] .field input,html[data-theme=dark] .field input[type=email]{background:#1e293b;border-color:#334155;color:#e2e8f0}
html[data-theme=dark] .field input:focus{background:#1e293b}
html[data-theme=dark] .rules li{background:#1e293b;color:#94a3b8}
html[data-theme=dark] .rules li.ok{background:#123d2a;color:#7fe0a8}
html[data-theme=dark] .or{color:#94a3b8}html[data-theme=dark] .or::before,html[data-theme=dark] .or::after{background:#334155}

/* alerts */
html[data-theme=dark] .alert.error{background:#3a1518;color:#ffb4b4;border-color:#6b2a2f}
html[data-theme=dark] .alert.success{background:#0f3324;color:#8fe5b2;border-color:#14532d}
html[data-theme=dark] .alert.info{background:#1e1b4b;color:#c7d2fe;border-color:#3730a3}

/* app pages (pay.css / app.css) */
html[data-theme=dark] .pay-main{background:linear-gradient(160deg,#080c18,#1e1b4b 70%,#0b1020)}
html[data-theme=dark] .panel-w{background:#131c31;color:var(--ink);box-shadow:0 24px 60px rgba(0,0,0,.55)}
html[data-theme=dark] .balance-card{background:linear-gradient(135deg,#4f46e5,#5b40c9)!important}
html[data-theme=dark] .panel-w h2,html[data-theme=dark] .route-line,html[data-theme=dark] .sum-total,html[data-theme=dark] .opt-price,html[data-theme=dark] .fld,html[data-theme=dark] .ticket h3{color:#f8fafc}
html[data-theme=dark] .fld input,html[data-theme=dark] .fld select{background:#1e293b;border-color:#334155;color:#e2e8f0}
html[data-theme=dark] .fld input:focus,html[data-theme=dark] .fld select:focus{background:#1e293b}
html[data-theme=dark] .note{color:#94a3b8}
html[data-theme=dark] .note.warn,html[data-theme=dark] .sandbox{background:#33290c;color:#f3d98b;border-color:#5c4a14}
html[data-theme=dark] .sum-row{border-color:#273449}
html[data-theme=dark] .method,html[data-theme=dark] .option,html[data-theme=dark] .presets button,html[data-theme=dark] .mini,html[data-theme=dark] .swap,html[data-theme=dark] .seg label{background:#172033;border-color:#334155;color:#e2e8f0}
html[data-theme=dark] .method.on{background:#312e81;border-color:#6366f1}
html[data-theme=dark] .seg label:has(input:checked){background:#6366f1}
html[data-theme=dark] .option.on{box-shadow:0 0 0 3px rgba(47,128,255,.3)}
html[data-theme=dark] .opt-legs li,html[data-theme=dark] .tlegs li{background:#1e293b}
html[data-theme=dark] .tlegs .leg-inside{background:#123d2a}
html[data-theme=dark] .opt-legs .leg-line,html[data-theme=dark] .opt-legs small,html[data-theme=dark] .opt-meta,html[data-theme=dark] .tlegs li small,html[data-theme=dark] .method .mtxt small,html[data-theme=dark] .sum-legs{color:#94a3b8}
html[data-theme=dark] .opt-why{background:#241d4a;color:#d6ccff}
html[data-theme=dark] .chip{background:#312e81;color:#c7d2fe}
html[data-theme=dark] .ticket,html[data-theme=dark] .empty,html[data-theme=dark] .poster{background:#131c31;color:var(--ink)}
html[data-theme=dark] .ticket canvas{border-color:#334155}
html[data-theme=dark] .ticket .meta{color:#94a3b8}
html[data-theme=dark] .tbtns button{background:#172033;border-color:#334155;color:#e2e8f0}
html[data-theme=dark] .badge.valid{background:#123d2a;color:#7fe0a8}html[data-theme=dark] .badge.used{background:#1e293b;color:#a9b8d0}
html[data-theme=dark] .badge.expired{background:#3a1518;color:#ffb4b4}html[data-theme=dark] .badge.soon{background:#312e81;color:#c7d2fe}
html[data-theme=dark] .pending{background:#33290c;color:#f3d98b}
html[data-theme=dark] .review{border-color:#334155}html[data-theme=dark] .review input{background:#1e293b;border-color:#334155;color:#e2e8f0}
html[data-theme=dark] .methods-list li,html[data-theme=dark] .tx-list li,html[data-theme=dark] .history li{border-color:#273449}
html[data-theme=dark] .tx-list .plus{color:#7fe0a8}html[data-theme=dark] .tx-list .minus{color:#ffb4b4}
html[data-theme=dark] .gate-result{background:#1e293b;color:#a9b8d0}
html[data-theme=dark] .btn.alt{background:#312e81;color:#c7d2fe;border-color:#312e81}

/* service popups + map viewer */
html[data-theme=dark] .mm{background:#131c31;color:#e2e8f0}
html[data-theme=dark] .mm-head h2,html[data-theme=dark] .mm-close{color:#f8fafc}
html[data-theme=dark] .mm-head p,html[data-theme=dark] .lbl{color:#94a3b8}
html[data-theme=dark] .mm-close:hover{background:#1e293b}
html[data-theme=dark] .dd-btn{background:#1e293b;border-color:#334155;color:#94a3b8}
html[data-theme=dark] .dd-btn.has{color:#e2e8f0}
html[data-theme=dark] .dd-list,html[data-theme=dark] .dd-list .dd-filter{background:#172033;border-color:#334155;color:#e2e8f0}
html[data-theme=dark] .dd-list .dd-filter input{background:#1e293b;border-color:#334155;color:#e2e8f0}
html[data-theme=dark] .dd-list li.active,html[data-theme=dark] .dd-list li:hover{background:#312e81;color:#c7d2fe}
html[data-theme=dark] .mm-result{background:#312e81;color:#e2e8f0}
html[data-theme=dark] .mm-result.error{background:#3a1518;color:#ffb4b4}
html[data-theme=dark] .mm-buy.alt{background:transparent!important;color:#c7d2fe!important;border-color:#c7d2fe}

/* dashboard (dashboard.css) */
html[data-theme=dark] .top{background:#0f172a;border-color:#273449}
html[data-theme=dark] .logo{color:#f8fafc}
html[data-theme=dark] .search input{background:#172033;border-color:#273449}
html[data-theme=dark] .search input:focus,html[data-theme=dark] .pt:focus-within{background:#1e293b}
html[data-theme=dark] .bell{color:#e2e8f0}
html[data-theme=dark] .menu{background:#131c31;border-color:#273449}
html[data-theme=dark] .side a i{background:#172033}
html[data-theme=dark] .green{background:linear-gradient(160deg,#0f2e22,#0b2419);border-color:#14532d;color:#9fd8b8}
html[data-theme=dark] .green h4{color:#b8f0d0}
html[data-theme=dark] .act{background:#131c31;border-color:#273449}
html[data-theme=dark] .act i{background:#312e81}
html[data-theme=dark] .card .ic{background:#131c31;border-color:#273449}
html[data-theme=dark] .panel{background:#131c31;border-color:#273449;box-shadow:none}
html[data-theme=dark] .pt{background:#172033;border-color:#273449}
html[data-theme=dark] .map{border-color:#273449;filter:brightness(.8) saturate(.9)}
html[data-theme=dark] .zoom button{background:#172033;color:#e2e8f0}
html[data-theme=dark] .dep+.dep{border-color:#273449}
html[data-theme=dark] a.dep:hover,html[data-theme=dark] .fav-go:hover{background:#172033}
html[data-theme=dark] .fav-go,html[data-theme=dark] .fav-form input{background:#172033;border-color:#273449;color:#e2e8f0}
html[data-theme=dark] .fav-rm{background:#3a1518;color:#ffb4b4}
html[data-theme=dark] .foot{border-color:#273449}
html[data-theme=dark] .toast{background:#6366f1}
html[data-theme=dark] .dash-note{color:#94a3b8}
html[data-theme=dark] header.top .pref-btn{background:#172033;border-color:#273449;color:#e2e8f0}

/* assistant */
html[data-theme=dark] .ac-panel{background:#0f172a;color:#e2e8f0}
html[data-theme=dark] .ac-msg.bot .ac-text,html[data-theme=dark] .ac-opt,html[data-theme=dark] .ac-ticket{background:#172033;border-color:#273449;color:#e2e8f0}
html[data-theme=dark] .ac-opt-head b{color:#f8fafc}
html[data-theme=dark] .ac-opt-head span,html[data-theme=dark] .ac-opt small{color:#94a3b8}
html[data-theme=dark] .ac-badges span{background:#312e81;color:#c7d2fe}
html[data-theme=dark] .ac-btn.alt{background:transparent;color:#c7d2fe;border-color:#c7d2fe}
html[data-theme=dark] .ac-chip{background:#172033;border-color:#273449;color:#c7d2fe}
html[data-theme=dark] .ac-input,html[data-theme=dark] .ac-locnote{background:#0f172a;border-color:#273449}
html[data-theme=dark] .ac-input textarea{background:#172033;border-color:#273449;color:#e2e8f0}
html[data-theme=dark] .ac-loc{background:#172033}
html[data-theme=dark] .ac-msg.err .ac-text{background:#3a1518;border-color:#6b2a2f;color:#ffb4b4}

/* sign in / sign up icons (Font Awesome) */
.field .l{color:#6b7f9c;font-size:15px}
.field .eye{color:#6b7f9c;font-size:15px}.field .eye:hover{color:var(--blue)}
.perk i[class*=fa-]{color:#a5b4fc;font-size:20px}
html[data-theme=dark] .field .l,html[data-theme=dark] .field .eye{color:#94a3b8}
.gwrap{width:100%}.gwrap>div{margin:0 auto}
.gbtn{border-radius:25px;transition:box-shadow .2s,background .2s}.gbtn:hover{box-shadow:0 2px 10px rgba(10,31,61,.12)}
html[data-theme=dark] .gbtn{background:#fff;color:#1f1f1f;border-color:#fff}
