/* לה פמיליה בוט · אפליקציית נהגים — עיצוב מונית: צהוב, אספלט ומשבצות */
:root {
  --yellow: #FFC72C;
  --yellow-deep: #F2A900;
  --asphalt: #141414;
  --asphalt-2: #1E1E1E;
  --asphalt-3: #2A2A2A;
  --line: #343434;
  --text: #F4F1E8;
  --muted: #A29E93;
  --red: #E5383B;
  --green: #2EC27E;
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--asphalt);
  background-image:
    radial-gradient(1200px 500px at 50% -200px, rgba(255, 199, 44, .10), transparent 60%);
  color: var(--text);
  min-height: 100dvh;
  overscroll-behavior-y: contain;
  padding-bottom: calc(24px + var(--safe-bottom));
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }

.checker {
  height: 14px;
  background:
    conic-gradient(#111 25%, var(--yellow) 0 50%, #111 0 75%, var(--yellow) 0) 0 0 / 14px 14px;
}
.checker.top { position: sticky; top: 0; z-index: 30; margin-top: var(--safe-top); }

.screen { max-width: 560px; margin: 0 auto; padding: 18px 16px 0; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- כפתורים ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; border-radius: 14px; padding: 13px 18px;
  font-weight: 700; font-size: 16px; text-decoration: none; transition: transform .1s, filter .15s;
}
.btn:active { transform: scale(.98); }
.btn-lg { padding: 16px 20px; font-size: 18px; }
.btn-sm { width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-yellow { background: var(--yellow); color: #111; box-shadow: 0 6px 0 var(--yellow-deep); }
.btn-yellow:active { box-shadow: 0 3px 0 var(--yellow-deep); transform: translateY(3px); }
.btn-ghost { background: var(--asphalt-3); color: var(--text); border: 1px solid var(--line); }
.btn-danger-ghost { background: transparent; color: var(--red); border: 1px solid rgba(229, 56, 59, .4); }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 10px; font-size: 15px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--asphalt-2); font-size: 20px; display: grid; place-items: center; flex: none;
}

/* ---------- כרטיסים וטפסים ---------- */
.card {
  background: var(--asphalt-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.form label, .card > label { display: block; font-weight: 500; color: var(--muted); font-size: 14px; margin: 4px 0 8px; }
.card > label:not(:first-child) { margin-top: 16px; }
input[type=tel], input[type=text], input[type=search] {
  width: 100%; background: var(--asphalt); color: var(--text); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 14px; font-size: 18px; outline: none;
}
input:focus { border-color: var(--yellow); }
input[type=tel] { direction: ltr; text-align: center; letter-spacing: 1px; font-size: 22px; font-weight: 500; }
.static-field { font-size: 20px; font-weight: 700; direction: ltr; text-align: right; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 10px 0 0; }
.hint.center { text-align: center; }
.lead { color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.form .btn { margin-top: 14px; }
.inline-field { display: flex; gap: 8px; align-items: center; }

.toggle-row {
  display: flex !important; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0 2px; margin: 0 !important; color: var(--text) !important; font-size: 16px !important; cursor: pointer;
}
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row i {
  flex: none; width: 50px; height: 30px; border-radius: 99px; background: var(--asphalt-3);
  border: 1px solid var(--line); position: relative; transition: background .2s;
}
.toggle-row i::after {
  content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #8b877d; transition: transform .2s, background .2s;
}
.toggle-row input:checked + i { background: var(--yellow); }
.toggle-row input:checked + i::after { transform: translateX(-20px); background: #111; }

/* ---------- כניסה ---------- */
.login-hero { text-align: center; padding: 34px 0 26px; }
.roof-sign {
  display: inline-block; background: var(--yellow); color: #111; font-weight: 900; letter-spacing: 4px;
  padding: 10px 26px 8px; border-radius: 14px 14px 6px 6px; font-size: 22px;
  box-shadow: 0 0 0 3px #111, 0 0 40px rgba(255, 199, 44, .45);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
.hero-icon { border-radius: 22px; box-shadow: 0 0 0 3px #111, 0 0 40px rgba(255, 199, 44, .45); }
.brand { font-size: 40px; font-weight: 900; margin: 18px 0 6px; letter-spacing: -.5px; }
.tagline { color: var(--muted); margin: 0; font-size: 17px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head h2 { margin: 0; font-size: 24px; flex: 1; }

/* ---------- סוגי רכב ---------- */
.vehicle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vehicle-opt {
  background: var(--asphalt); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 10px;
  text-align: center; font-weight: 500; font-size: 15px; line-height: 1.3;
}
.vehicle-opt .ico { display: block; font-size: 26px; margin-bottom: 4px; }
.vehicle-opt.selected { border-color: var(--yellow); background: rgba(255, 199, 44, .12); color: var(--yellow); }

/* ---------- תשלום ---------- */
.phone-warning {
  background: rgba(255, 199, 44, .1); border: 1.5px dashed var(--yellow); border-radius: 14px;
  padding: 14px; line-height: 1.6; margin-bottom: 14px;
}
.phone-big { display: block; direction: ltr; text-align: center; font-size: 28px; font-weight: 900; color: var(--yellow); letter-spacing: 1px; margin: 6px 0; }
.pay-list { display: grid; gap: 10px; margin: 12px 0 14px; }
.pay-opt {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text);
  background: var(--asphalt-2); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px;
}
.pay-opt.recommended { border-color: var(--yellow); }
.pay-opt .pay-main { flex: 1; }
.pay-opt .pay-title { font-weight: 700; font-size: 17px; }
.pay-opt .pay-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pay-opt .pay-price { font-weight: 900; font-size: 22px; color: var(--yellow); white-space: nowrap; }
.pay-opt .tag { display: inline-block; background: var(--yellow); color: #111; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-inline-start: 6px; vertical-align: middle; }

/* ---------- ראשי ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hello { font-size: 22px; font-weight: 700; }
.sub-chip { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.sub-chip.warn { color: var(--yellow); }

/* שורת סטטוס קומפקטית — הנסיעות מקבלות את כל המסך */
.status-zone { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 0; }

/* כפתור צף פנוי / תפוס — פינה ימנית תחתונה */
.toggle-btn {
  position: fixed; right: 16px; bottom: calc(18px + var(--safe-bottom)); z-index: 40;
  width: 84px; height: 84px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 50% 35%, #ffd75e, var(--yellow) 55%, var(--yellow-deep));
  color: #111; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 5px 0 #b67f00, 0 10px 26px rgba(0, 0, 0, .6);
  transition: transform .12s, box-shadow .12s;
}
.toggle-btn::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(#111 25%, transparent 0 50%, #111 0 75%, transparent 0) 0 0 / 8px 8px;
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 65%, #000 69%, transparent 70%);
          mask: radial-gradient(circle, transparent 64%, #000 65%, #000 69%, transparent 70%);
}
.toggle-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #b67f00, 0 5px 14px rgba(0, 0, 0, .5); }
.toggle-label { font-size: 22px; font-weight: 900; line-height: 1; }
.toggle-btn.on {
  background: radial-gradient(circle at 50% 35%, #ff6b6d, var(--red) 55%, #a91f22);
  color: #fff; box-shadow: 0 5px 0 #7d1517, 0 10px 26px rgba(229, 56, 59, .4);
}
.toggle-btn.on:active { box-shadow: 0 2px 0 #7d1517; }
.toggle-btn.on::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--green);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
.toggle-btn:disabled { filter: grayscale(.6) brightness(.8); }
#screen-main { padding-bottom: 120px; }

.status-line { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.status-line .dot { width: 10px; height: 10px; border-radius: 50%; background: #6b6860; }
.status-line.live .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(46, 194, 126, .2); }
.filter-pill {
  background: var(--asphalt-2); border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px;
  font-size: 14px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.filter-pill b { color: var(--text); font-weight: 500; }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255, 199, 44, .1); border: 1px solid rgba(255, 199, 44, .35); border-radius: 14px;
  padding: 10px 12px; margin-bottom: 12px; font-size: 14px; line-height: 1.4;
}

.feed-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 2px 10px; }
.feed-head h3 { margin: 0; font-size: 20px; }
.feed-count { color: var(--muted); font-size: 14px; }
.feed { display: grid; gap: 12px; }
.empty { text-align: center; color: var(--muted); padding: 30px 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); line-height: 1.6; }
.empty .big { font-size: 40px; display: block; margin-bottom: 6px; }

.trip {
  background: var(--asphalt-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  animation: rise .3s ease both;
}
.trip.fresh { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 199, 44, .18); }
.trip-top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 0; }
.trip-route { flex: 1; font-weight: 700; font-size: 19px; line-height: 1.3; }
.trip-route .arrow { color: var(--yellow); margin: 0 4px; }
.trip-time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.trip-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; }
.badge { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 99px; background: var(--asphalt-3); color: var(--text); }
.badge.y { background: rgba(255, 199, 44, .15); color: var(--yellow); }
.badge.p { background: rgba(255, 105, 180, .15); color: #ff8cc6; }
.trip-text { padding: 10px 14px 12px; white-space: pre-wrap; line-height: 1.5; font-size: 15px; color: #dcd8cd; word-break: break-word; }
.trip-actions { display: grid; padding: 0 14px 14px; }
.trip-actions .btn { padding: 12px; }
.trip-contact { color: var(--muted); font-size: 13px; padding: 0 14px 10px; direction: rtl; }

/* ---------- גיליון הגדרות ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: fade .2s both; }
.sheet {
  position: absolute; inset-inline: 0; bottom: 0; max-height: 92dvh; overflow-y: auto;
  background: var(--asphalt); border-radius: 24px 24px 0 0; padding: 8px 16px calc(20px + var(--safe-bottom));
  max-width: 560px; margin: 0 auto; animation: slide .28s cubic-bezier(.2, .9, .3, 1) both;
  border-top: 4px solid var(--yellow);
}
@keyframes slide { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } }
.sheet-footer {
  position: sticky; bottom: calc(-20px - var(--safe-bottom)); margin: 6px -16px calc(-20px - var(--safe-bottom));
  padding: 12px 16px calc(14px + var(--safe-bottom)); background: linear-gradient(to top, var(--asphalt) 75%, rgba(20, 20, 20, 0));
  z-index: 3;
}
.sheet-footer .btn { box-shadow: 0 6px 0 var(--yellow-deep), 0 10px 24px rgba(0, 0, 0, .5); }
.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; }
.sheet > .btn { margin-bottom: 10px; }
.card .btn + .btn, .card .btn + .pay-list + .btn { margin-top: 10px; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--asphalt); border-radius: 12px; padding: 4px; border: 1px solid var(--line); }
.segmented button { border: 0; background: none; padding: 11px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.segmented button.active { background: var(--yellow); color: #111; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; min-height: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow); color: #111; font-weight: 700; padding: 7px 8px 7px 12px; border-radius: 99px; border: 0; }
.chip span { font-size: 12px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .15); display: grid; place-items: center; }
.city-search { position: relative; }
.suggest {
  position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 5; background: var(--asphalt-3);
  border: 1px solid var(--line); border-radius: 12px; max-height: 240px; overflow-y: auto;
}
.suggest button { display: block; width: 100%; text-align: right; background: none; border: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.suggest button:last-child { border-bottom: 0; }

.radius-value { text-align: center; font-size: 15px; color: var(--muted); margin: 12px 0 8px; }
.radius-value span { font-size: 44px; font-weight: 900; color: var(--yellow); }
.radius-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.radius-chips button { border: 1px solid var(--line); background: var(--asphalt); border-radius: 10px; padding: 10px 0; font-weight: 700; }
.radius-chips button.active { background: var(--yellow); color: #111; border-color: var(--yellow); }
.sub-info { line-height: 1.6; margin-bottom: 10px; }

/* ---------- שכבות-על ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(10, 10, 10, .92); display: grid; place-items: center; padding: 20px;
  animation: fade .25s both;
}
.overlay-box {
  background: var(--asphalt-2); border: 1px solid var(--line); border-radius: 24px; padding: 26px 20px 16px;
  text-align: center; width: 100%; max-width: 400px; border-top: 6px solid var(--yellow);
}
.overlay-box h2 { margin: 8px 0; font-size: 26px; }
.overlay-box p { color: var(--muted); line-height: 1.6; }
.candles { font-size: 46px; }

.install-icon { border-radius: 20px; box-shadow: 0 8px 24px rgba(255, 199, 44, .3); }
.install-lead { margin: 4px 0 18px; }
.install-steps { text-align: right; padding: 0; margin: 0 0 14px; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.install-steps li { counter-increment: s; position: relative; display: block; background: var(--asphalt); border-radius: 12px; padding: 12px 50px 12px 12px; line-height: 1.55; min-height: 52px; }
.install-steps li::before {
  content: counter(s); position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: #111;
  font-weight: 900; display: grid; place-items: center;
}
.install-note { color: var(--yellow) !important; font-weight: 500; }
.ios-share {
  display: inline-block; width: 18px; height: 22px; vertical-align: -5px; margin: 0 2px;
  border: 2px solid var(--yellow); border-top: 0; border-radius: 0 0 4px 4px; position: relative;
}
.ios-share::before { content: "↑"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); color: var(--yellow); font-weight: 900; }

.toast {
  position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: calc(118px + var(--safe-bottom)); z-index: 99;
  background: #f4f1e8; color: #111; font-weight: 500; padding: 12px 18px; border-radius: 12px; 
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: rise .2s both; text-align: center;
}
.toast.err { background: var(--red); color: #fff; }

.loader { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--asphalt); }
.loader.hide { display: none; }
.wheel {
  width: 54px; height: 54px; border-radius: 50%; border: 8px solid #333; border-top-color: var(--yellow);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
