/* NASINAI — shared styles for the customer app, tracking, driver page and simulator. */
:root {
  --sea: #155c41; --sea-2: #2e9a63; --sea-deep: #0e3b2b; --foam: #e8f5d6;
  --sand: #f4f5ef; --sand-2: #e6e9dd; --paper: #ffffff; --lime: #c8f169; --cream: #f6f1e2;
  --ink: #17251f; --muted: #66726b; --line: rgba(23, 37, 31, .1);
  --coral: #e2673a; --sun: #f2b33d; --ok: #1d9a5b; --bad: #c8412f;
  --r: 18px; --shadow: 0 10px 30px -14px rgba(14, 59, 43, .35);
  --font: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif; --display: 'Readex Pro', 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.6 var(--font); color: var(--ink); background: var(--sand); }
a { color: var(--sea); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px;
  background: var(--sea); color: #fff; font-weight: 600; text-decoration: none; transition: transform .15s, background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn--ghost { background: transparent; color: var(--sea); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--soft { background: var(--foam); color: var(--sea-deep); }
.btn--coral { background: var(--coral); }
.btn--ok { background: var(--ok); }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 13px; background: rgba(255,255,255,.14); color: inherit; font-size: 20px; text-decoration: none; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(247, 241, 230, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { font: 700 19px/1 var(--display); letter-spacing: -.01em; }
.brand small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.top__sp { flex: 1; }
/* The visible pill shows a short code; the native select sits invisibly on top so phones get their own picker. */
.lang { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.lang select { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 16px; cursor: pointer; }
.lang:focus-within { outline: 2px solid var(--sea-2); outline-offset: 2px; }
#myOrders { white-space: nowrap; }
.chip-place { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* hero */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(160deg, var(--sea) 0%, var(--sea-deep) 100%); }
.hero__in { position: relative; z-index: 1; padding: 36px 0 86px; display: grid; gap: 14px; }
.hero h1 { margin: 0; font: 700 clamp(30px, 6vw, 48px)/1.15 var(--display); letter-spacing: -.02em; max-width: 14ch; }
.hero p { margin: 0; max-width: 46ch; color: rgba(255,255,255,.82); font-size: 16px; }
.hero__sun { position: absolute; inset-inline-start: 6%; top: 22px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #ffd27a, var(--sun) 60%, rgba(242,179,61,0) 72%); opacity: .9; }
.hero__waves { position: absolute; inset-inline: 0; bottom: -1px; width: 100%; height: 70px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero__cta .btn { background: #fff; color: var(--sea-deep); }
.hero__cta .btn--wa { background: #25d366; color: #063f2a; }

/* sections */
.sec { padding: 26px 0; }
.sec h2 { margin: 0 0 14px; font: 600 21px/1.3 var(--display); }
.sec__sub { margin: -8px 0 16px; color: var(--muted); }

/* store cards */
.stores { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: -64px; position: relative; z-index: 2; }
.store-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; border: 1px solid var(--line); transition: transform .2s; }
.store-card:hover { transform: translateY(-2px); }
.store-card__emoji { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; font-size: 32px; background: color-mix(in srgb, var(--c) 16%, #fff); }
.store-card h3 { margin: 0; font: 600 17px/1.3 var(--display); }
.store-card p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--foam); color: var(--sea-deep); }
.badge--closed { background: #f6e1dc; color: var(--bad); }
.badge--live { background: #ffe9df; color: var(--coral); }
.badge--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { padding: 18px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); }
.step i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--foam); font-style: normal; font-size: 21px; margin-bottom: 10px; }
.step b { display: block; font: 600 16px/1.4 var(--display); }
.step span { color: var(--muted); font-size: 14px; }

.demo { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.demo a { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--r); background: var(--sea-deep); color: #fff; text-decoration: none; }
.demo a i { font-style: normal; font-size: 26px; }
.demo a b { display: block; font-family: var(--display); font-weight: 600; }
.demo a span { font-size: 13px; color: rgba(255,255,255,.7); }

/* store page */
.store-head { padding: 20px 0 12px; display: flex; gap: 14px; align-items: center; }
.store-head .store-card__emoji { width: 58px; height: 58px; }
.store-head h1 { margin: 0; font: 700 24px/1.2 var(--display); }
.store-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.search { position: relative; }
.search input { width: 100%; height: 48px; padding: 0; padding-inline: 44px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); outline: none; }
.search input:focus { border-color: var(--sea-2); box-shadow: 0 0 0 3px var(--foam); }
.search::before { content: "⌕"; position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-52%); font-size: 20px; color: var(--muted); }
.cats { position: sticky; top: 62px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; background: var(--sand); scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; white-space: nowrap; }
.cats button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-title { margin: 18px 0 10px; font: 600 17px/1.3 var(--display); }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
.prod { position: relative; display: flex; flex-direction: column; padding: 10px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.prod__img { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; background: linear-gradient(160deg, #fff, var(--sand-2)); font-size: 46px; }
.prod__name { margin: 8px 0 0; font-weight: 600; font-size: 14px; line-height: 1.4; min-height: 2.8em; }
.prod__unit { font-size: 12px; color: var(--muted); }
.prod__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.prod__price { font-weight: 700; font-size: 15px; }
.prod--out { opacity: .55; }
.prod--out .prod__img::after { content: "خلصان"; position: absolute; top: 18px; inset-inline-end: 18px; padding: 2px 8px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.add { width: 36px; height: 36px; border-radius: 11px; border: 0; background: var(--sea); color: #fff; font-size: 22px; line-height: 1; }
.stepper { display: inline-flex; align-items: center; gap: 2px; border-radius: 11px; background: var(--foam); }
.stepper button { width: 32px; height: 36px; border: 0; background: none; font-size: 19px; color: var(--sea-deep); }
.stepper span { min-width: 30px; text-align: center; font-weight: 700; font-size: 14px; }

.cartbar { position: fixed; z-index: 60; inset-inline: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--sand) 70%, rgba(247,241,230,0)); }
.cartbar .btn { width: min(560px, 100%); margin-inline: auto; display: flex; justify-content: space-between; min-height: 56px; border-radius: 16px; box-shadow: var(--shadow); }
.cartbar__count { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.18); }

/* checkout */
.sheet { max-width: 640px; margin-inline: auto; padding: 18px 0 120px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.card { padding: 16px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); }
.card h2 { margin: 0 0 12px; font: 600 17px/1.3 var(--display); }
.muted { color: var(--muted); }
.track__panel .card { margin-top: 14px; }
.line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.line:last-child { border-bottom: 0; }
.line__emoji { font-size: 26px; width: 36px; text-align: center; }
.line__name { flex: 1; font-size: 14px; }
.line__name small { display: block; color: var(--muted); }
.totals { display: grid; gap: 6px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { padding-top: 8px; border-top: 1px solid var(--line); font-size: 17px; font-weight: 700; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 13px; border: 1px solid var(--line); background: #fff; outline: none; }
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--sea-2); box-shadow: 0 0 0 3px var(--foam); }
.field input[type=tel] { direction: ltr; text-align: right; }
.pick-map { height: 280px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.places { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.places button { flex: none; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.zone-note { margin-top: 8px; font-size: 14px; }
.zone-note.bad { color: var(--bad); }
.err { padding: 10px 14px; border-radius: 12px; background: #f9e3de; color: var(--bad); font-size: 14px; }

/* map pins */
.pin { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--c, var(--sea)); box-shadow: 0 6px 14px -4px rgba(0,0,0,.4); border: 3px solid #fff; }
.pin > span { transform: rotate(45deg); font-size: 18px; }
.rider { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--coral); border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(226,103,58,.22), 0 8px 18px -6px rgba(0,0,0,.5); font-size: 22px; }
.stop-pin { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; border: 2px solid #fff; }
.stop-pin--pickup { background: #fff; border-color: var(--sea); font-size: 16px; }
.leaflet-container { font-family: var(--font); background: #dfe9e6; }
.leaflet-div-icon { background: none; border: 0; }

/* track page */
.track { display: grid; min-height: 100dvh; grid-template-rows: auto 1fr; }
.track__map { position: relative; height: 52dvh; min-height: 300px; }
.track__map #map { position: absolute; inset: 0; }
.track__panel { position: relative; z-index: 5; margin-top: -26px; padding: 22px 0 40px; border-radius: 26px 26px 0 0; background: var(--sand); box-shadow: 0 -10px 30px -18px rgba(0,0,0,.4); }
.track__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.track__head h1 { margin: 4px 0 0; font: 700 22px/1.3 var(--display); }
.eta { text-align: center; min-width: 116px; padding: 10px 12px; border-radius: 16px; background: var(--sea-deep); color: #fff; }
.eta b { display: block; font: 700 24px/1.1 var(--display); }
.eta small { font-size: 12px; color: rgba(255,255,255,.75); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 6px; }
.progress div { height: 6px; border-radius: 99px; background: var(--sand-2); overflow: hidden; }
.progress div.on { background: var(--sea-2); }
.progress div.now { background: linear-gradient(90deg, var(--sea-2) 40%, var(--sand-2) 40%); background-size: 250% 100%; animation: flow 1.6s linear infinite; }
@keyframes flow { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.progress-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 12px; color: var(--muted); }
.progress-labels .on { color: var(--ink); font-weight: 600; }
.driver-card { display: flex; align-items: center; gap: 12px; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #ffe9df; font-size: 24px; }
.driver-card b { display: block; }
.driver-card span { font-size: 13px; color: var(--muted); }
.driver-card .btn { margin-inline-start: auto; }
.privacy { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.map-note { position: absolute; z-index: 500; top: 14px; inset-inline: 14px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255,253,249,.94); box-shadow: var(--shadow); font-size: 14px; }
.map-back { position: absolute; z-index: 500; bottom: 40px; inset-inline-start: 14px; }
.map-back .icon-btn { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* driver page */
.drv { min-height: 100dvh; display: grid; grid-template-rows: auto auto 1fr; background: var(--sand); }
.drv__bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--sea-deep); color: #fff; }
.drv__bar b { font: 600 17px/1.2 var(--display); }
.drv__bar small { display: block; font-size: 12px; color: rgba(255,255,255,.7); }
.switch { position: relative; width: 52px; height: 30px; border-radius: 99px; border: 0; background: rgba(255,255,255,.25); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; }
.switch.on { background: #3ddc84; }
.switch.on::after { inset-inline-start: 25px; }
.drv__map { height: 38dvh; min-height: 240px; }
.drv__list { padding: 14px 16px 40px; display: grid; gap: 12px; align-content: start; }
.stop { padding: 14px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); display: grid; gap: 8px; }
.stop--next { border: 2px solid var(--coral); box-shadow: var(--shadow); }
.stop__head { display: flex; align-items: center; gap: 10px; }
.stop__head .stop-pin { flex: none; }
.stop__head b { font: 600 16px/1.3 var(--display); }
.stop__head small { display: block; font-size: 13px; color: var(--muted); }
.stop ul { margin: 0; padding-inline-start: 20px; font-size: 14px; color: var(--muted); }
.stop__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.gps { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 13px; background: var(--paper); border-bottom: 1px solid var(--line); }
.gps i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.gps.live i { background: #3ddc84; animation: pulse 1.4s infinite; }
.gps.warn i { background: var(--sun); }
.gps select, .gps button { margin-inline-start: auto; }
.empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.empty i { display: block; font-size: 40px; font-style: normal; margin-bottom: 6px; }

/* toast */
.toast { position: fixed; z-index: 900; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* footer + MUL.LA credit */
.foot { padding: 30px 0 110px; text-align: center; color: var(--muted); font-size: 13px; }
.credit { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; padding: 8px 8px 8px 14px; border-radius: 18px; background: var(--ink); color: #f1ece2; text-decoration: none; direction: ltr; box-shadow: 0 14px 30px -16px rgba(0,0,0,.6); transition: transform .4s; }
.credit:hover { transform: translateY(-2px); }
.credit img { width: 34px; height: 34px; }
.credit span { display: grid; gap: 3px; text-align: left; }
.credit small { font: 400 9px/1 'Helvetica Neue', Arial, sans-serif; letter-spacing: .24em; text-transform: uppercase; opacity: .6; }
.credit b { font: 500 14px/1 'Helvetica Neue', Arial, sans-serif; letter-spacing: .16em; }

@media (max-width: 420px) { .chip-place { display: none; } .top__in { gap: 8px; } }
@media (max-width: 560px) {
  .hero__in { padding: 26px 0 80px; }
  .hero__sun { width: 80px; height: 80px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .track__head h1 { font-size: 19px; }
  .eta { min-width: 100px; }
  .eta b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
