/* LumeRide Rider — app-specific layout on top of css/design.css.
 * Positioning/visuals for shared components (.sheet, .topbar, .fab,
 * .center-pin, .toast, .seg, .btn, .field, .tier-card, .driver-card,
 * .stars, .list-row, .notice) live in design.css — this file only adds
 * what is unique to the rider flow. */

.view[hidden] { display: none; }

/* ── Map loading / error overlays ──────────────────────────────
 * Cover the map area only (below the top bar and bottom sheet) so
 * the map is never a blank/grey box at open: a branded loading state
 * first, a visible error state with Retry if the provider fails.
 * These live here (not design.css) by shared-layer decision — see
 * the note in design.css. Toggled with the `hidden` attribute and
 * the map handle's onReady/onError (js/app.js createMap). */
.map-loading, .map-error {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 90% 55% at 50% 42%, rgba(229, 200, 148, .07), transparent 70%),
    var(--coal);
  pointer-events: none;
}
.map-loading[hidden], .map-error[hidden] { display: none; }
.map-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 24px 22vh;
  text-align: center;
}
.map-loading-mark { width: 52px; height: 52px; flex-basis: 52px; font-size: 19px; border-radius: 14px; }
@keyframes map-shimmer-slide {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.map-loading-shimmer {
  width: 148px; height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--panel-2) 25%, #2c3540 50%, var(--panel-2) 75%);
  background-size: 400px 100%;
  animation: map-shimmer-slide 1.4s infinite linear;
}
.map-loading-text { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.map-error { pointer-events: auto; }
.map-loading-title { font-size: 18px; font-weight: 800; }
.map-error .map-loading-text { font-weight: 400; max-width: 300px; }
.map-error .btn { pointer-events: auto; }

/* ── App footer (build badge) ──────────────────────────────── */
.app-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
}

.view .btn-wide { margin-top: 12px; }

.sheet-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 4px 0 10px;
}

.brand-name { font-size: 16px; }

/* Recenter FAB placement (design.css styles the button itself). */
.fab {
  position: fixed;
  right: 16px;
  bottom: 44vh;
  z-index: 650;
}
@media (min-width: 720px) {
  .fab { right: 24px; bottom: 24px; }
}

.center-pin[hidden] { display: none; }

/* Pickup row */
.pickup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 12px 0 10px;
  background: var(--panel-2);
}
.dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.dot-pickup { background: var(--gold); box-shadow: 0 0 0 4px rgba(229, 200, 148, 0.2); }
.dot-dropoff { background: #fff; border-radius: 3px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15); }
.pickup-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pickup-caption {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.pickup-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.adjust-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; margin-bottom: 12px;
  border: 1px dashed rgba(229, 200, 148, 0.5); border-radius: 12px;
  font-size: 13px;
}
.adjust-bar[hidden] { display: none; }

/* Destination field: clear button + suggestion states. */
.dest-wrap { display: block; position: relative; }
.dest-wrap input { padding-right: 46px; }
.dest-clear {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
  font-size: 19px; line-height: 1;
  cursor: pointer;
}
.dest-clear:active { background: rgba(255, 255, 255, .16); }
.dest-clear[hidden] { display: none; }
.suggest-list[hidden] { display: none; }
.suggest-item.active { background: rgba(229, 200, 148, .09); }
.suggest-empty {
  padding: 14px 4px;
  font-size: 14px;
  color: var(--muted);
}

/* Notices that carry an inline action button sit on one row. */
.notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notice[hidden] { display: none; }

/* Plan view */
.back-link {
  background: none; border: none; color: var(--gold); font: inherit; font-weight: 600;
  padding: 4px 0 0; cursor: pointer;
}
.route-summary { color: var(--muted); margin: 4px 0 10px; }
.route-labels { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.route-leg { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.tier-desc { display: block; font-size: 12.5px; color: var(--muted); }
.tier-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.tier-side .tier-eta { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Payment view */
.card-mount {
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 10px;
  background: #fff;
}
.card-mount:empty { display: none; }
.pay-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.fare-summary { font-size: 15px; line-height: 1.55; }

/* Matching / trip status headlines */
.status-line { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--text); margin-top: 6px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.35; } 100% { opacity: 1; } }
.progress-track { margin: 14px 0; }

.driver-card { margin-top: 14px; }
.driver-card[hidden] { display: none; }
.driver-side { text-align: right; flex: 0 0 auto; }
.meet-note { font-size: 14px; color: var(--muted); margin-top: 12px; }
.trip-eta { font-size: 15px; color: var(--muted); margin: 6px 0 0; }
.trip-dest { font-size: 14px; color: var(--muted); margin-top: 12px; }

/* Receipt */
.fare-breakdown { margin: 12px 0; }
.fare-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; }
.fare-row.fare-sub { color: var(--muted); font-size: 13.5px; padding: 3px 0; }
.rate-block { margin: 14px 0 4px; }
.rate-caption { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* Trips */
.empty-state { color: var(--muted); padding: 16px 0; }

/* "Your stats" block at the top of My trips (js/app.js renderStats). */
.stats-heading { font-size: 15px; font-weight: 700; margin: 14px 0 8px; }
.rider-stats { margin-bottom: 10px; }
.stats-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.stats-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px; color: var(--muted);
}
.stats-row strong { color: var(--text); font-size: 14px; font-weight: 700; text-align: right; }
#clearTripsBtn { margin-top: 14px; }

.toast[hidden] { display: none; }

/* ── Auth gate ───────────────────────────────────────────────
   Full-screen branded sign-in / sign-up gate. Shown first when
   there is no Supabase session; #appRoot stays hidden until
   sign-in succeeds (js/app.js boot flow). */
#appRoot[hidden] { display: none; }
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(229, 200, 148, .13), transparent 55%),
    var(--coal);
}
.auth-gate[hidden] { display: none; }
.auth-card { width: 100%; max-width: 380px; text-align: center; }
.auth-mark {
  width: 54px; height: 54px;
  font-size: 20px;
  border-radius: 16px;
  margin-bottom: 16px;
}
.auth-sub { color: var(--muted); font-size: var(--text-caption); margin: 8px 0 28px; }
.auth-form { text-align: left; }
.auth-seg { margin-bottom: 20px; }
.auth-state .spinner { margin-bottom: 14px; }
.auth-note { color: var(--muted); font-size: 14px; }
.auth-state-title { font-size: var(--text-title); font-weight: 700; margin-bottom: 8px; }
.auth-form .auth-note { margin-bottom: 18px; }
.auth-link {
  display: inline-block;
  margin: 2px 0 14px;
  padding: 4px 2px;
  background: none;
  border: 0;
  color: var(--gold);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* ── Account row (sheet footer area, above the build badge) ── */
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.account-email {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* ── Light theme (Build 7) ─────────────────────────────────────
   Token flips live in design.css; these are the rider surfaces
   with hard-coded dark values. */
[data-theme="light"] .map-loading-shimmer {
  background: linear-gradient(90deg, var(--panel-2) 25%, #e0d8c4 50%, var(--panel-2) 75%);
  background-size: 400px 100%;
}
[data-theme="light"] .dot-dropoff {
  background: #23252a;
  box-shadow: 0 0 0 4px rgba(35, 37, 42, 0.14);
}
[data-theme="light"] .dest-clear { background: rgba(35, 37, 42, .07); }
[data-theme="light"] .dest-clear:active { background: rgba(35, 37, 42, .14); }
