/* DriveStream web companion — layered on the marketing site's style.css. */

/* The `hidden` attribute only works because the UA stylesheet sets display:none, and ANY author
   `display` rule outranks it. Several things here are flex/grid and toggled with `hidden`, so
   without this they stay visible when hidden — the signed-out page showed its tabs and trip picker.
   Keep this above every layout rule below. */
[hidden] { display: none !important; }

.tabs { display: flex; gap: 18px; margin-left: 24px; font-size: 15px; }
.tabs a { color: var(--ink-soft); padding: 4px 0; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--coral); font-weight: 640; }
header.site .spacer { margin-left: auto; }
.who { color: var(--ink-soft); font-size: 14px; margin-right: 14px; }

.gate { text-align: center; padding: 70px 0 90px; }
.gate-icon {
  width: 88px; height: 88px; border-radius: 20px; margin-bottom: 24px;
  box-shadow: 0 6px 0 var(--shade);   /* the same slab the landing page's hero icon sits on */
}
.gate h1 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -.025em; margin: 0 0 12px; font-weight: 780; }
.gate .lede { color: var(--ink-soft); max-width: 520px; margin: 0 auto 26px; }

.tripbar { display: flex; align-items: center; gap: 12px; padding: 22px 0 6px; flex-wrap: wrap; }
.tripbar label { font-size: 13px; font-weight: 650; color: var(--ink-soft); }
.tripmeta { font-size: 13.5px; color: var(--ink-faint); }

.view { padding: 18px 0 80px; }
.view h1 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -.02em; margin: 0 0 4px; font-weight: 760; }
.view .sub { color: var(--ink-soft); margin: 0 0 22px; font-size: 15px; }

/* `email` and `password` were missing here when the sign-in form landed, so those two fields fell
   through to the UA default — a white box with white-ish text, unreadable in dark mode. Any new
   input type has to be added to this list; there is no bare `input` rule to catch it. */
select,
input[type="url"], input[type="text"], input[type="number"],
input[type="email"], input[type="password"] {
  padding: 10px 13px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
select:focus, input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
input[type="url"], input[type="text"], input[type="email"], input[type="password"] { width: 100%; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 21px;
  /* A slab with a visible side face, like ChunkySurface in the app and the cards on the landing
     page. Zero blur on purpose — the look builds depth from adjacent flat faces, never a blend. */
  box-shadow: 0 5px 0 var(--shade);
}
.card h2 { font-size: 16.5px; font-weight: 700; margin: 0 0 3px; letter-spacing: -.01em; }
.card .sub { font-size: 13.5px; color: var(--ink-faint); margin: 0 0 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row .btn { flex: 0 0 auto; padding: 10px 18px; font-size: 15px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* metrics */
.metrics { display: flex; gap: 10px; flex-wrap: wrap; }
.metric { flex: 1; min-width: 118px; }
.metric .value { display: block; font-size: 24px; font-weight: 780; letter-spacing: -.02em; }
.metric .label { font-size: 11.5px; font-weight: 650; color: var(--ink-faint);
                 text-transform: uppercase; letter-spacing: .04em; }

/* map */
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.map.tall { height: 560px; }
.marker {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; font-weight: 750; font-size: 13px; border: 2.5px solid var(--card);
  box-shadow: 0 2px 0 rgba(46,58,47,.45); cursor: default;
}
.marker.off { opacity: .45; }

/* ---------- drive replay transport ---------- */

.replay { margin-top: 14px; padding: 16px 18px; }
.replay-readouts { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.replay-readouts .value {
  display: block; font-size: 21px; font-weight: 780; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.replay-readouts .label {
  font-size: 11px; font-weight: 650; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: .04em;
}

/* Range inputs get no theming at all by default — left alone this is a grey system slider on a
   cream slab, which is the one control that would give away that the page isn't the app. */
#r-scrub {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; margin: 0 0 14px;
  background: var(--bg-soft); border: 1px solid var(--line); cursor: pointer;
}
#r-scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--coral);
  box-shadow: 0 2px 0 var(--shade);
}
#r-scrub::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--coral); box-shadow: 0 2px 0 var(--shade);
}

.replay-controls { display: flex; align-items: center; gap: 12px; }
.replay-controls .btn { padding: 9px 20px; font-size: 15px; line-height: 1; }
.rates { display: flex; gap: 4px; margin-left: auto; }
.rates button {
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
  padding: 6px 11px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); border: 1px solid transparent;
}
.rates button.on { background: var(--card); color: var(--ink); border-color: var(--line); }
.replay-note {
  margin: 12px 0 0; font-size: 12.5px; color: var(--ink-faint); text-align: center;
}

/* member rows */
.members { list-style: none; margin: 0; padding: 0; }
.members li {
  display: flex; align-items: center; gap: 13px; padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}
.members li:last-child { border-bottom: 0; }
.members li.offline { opacity: .55; }
.avatar {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 15px;
}
.who-col { flex: 1; min-width: 0; }
.who-col .name { font-size: 15.5px; font-weight: 640; }
.who-col .meta { font-size: 13px; color: var(--ink-faint); margin-top: 1px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  font-size: 12.5px; font-weight: 640; padding: 3px 9px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); white-space: nowrap;
}
/* These two were literal rgba() left over from the old palette — a hot pink and a teal-mint that
   no longer exist anywhere. Derive them from the paint instead so they can never desync again. */
.chip.warn { background: color-mix(in srgb, var(--coral) 14%, transparent); color: var(--coral); }
.chip.good { background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); }
.chip.pos  { color: var(--mint); }
.chip.neg  { color: var(--coral); }
.pos-badge {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; background: var(--bg-soft);
  display: grid; place-items: center; font-size: 12px; font-weight: 750; color: var(--ink-soft);
}

/* stops list (planner) */
.stops { list-style: none; margin: 0 0 14px; padding: 0; }
.stops:empty { display: none; }
.stops li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--bg-soft);
}
.stops li.dragging { opacity: .45; }
.stops .grip { cursor: grab; color: var(--ink-faint); user-select: none; }
.stops .idx { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
              font-size: 12px; font-weight: 700; background: var(--blue); color: #fff; flex: 0 0 auto; }
.stops .name { flex: 1; min-width: 0; font-size: 15px; }
.stops .name small { display: block; color: var(--ink-faint); font-size: 12.5px;
                     overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stops .remove { border: 0; background: transparent; color: var(--ink-faint); cursor: pointer;
                 font-size: 17px; padding: 4px 6px; border-radius: 8px; }
.stops .remove:hover { color: var(--coral); background: var(--bg); }

/* generic list rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 2px;
           border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-soft); }
.rows li:last-child { border-bottom: 0; }
.rows li b { color: var(--ink); font-weight: 640; }
.rows li .nums { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.status { font-size: 14px; color: var(--ink-soft); margin: 10px 0 0; }
.status.err { color: var(--coral); }
.status.ok  { color: var(--mint); }
.empty { text-align: center; color: var(--ink-faint); padding: 40px 12px; font-size: 15px; }
.invite-code { font-size: 30px; font-weight: 800; letter-spacing: .16em;
               font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 720px) {
  .tabs { margin-left: 0; gap: 14px; font-size: 14px; overflow-x: auto; }
  header.site .wrap { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 8px; }
  .map { height: 380px; }
}

/* ---------- email sign-in (gate) ---------- */

.emailform {
  max-width: 340px; margin: 18px auto 0;
  display: flex; flex-direction: column; gap: 10px;
}
.emailform input { text-align: center; }
.emailform .row { display: flex; gap: 10px; }
.emailform .row .btn { flex: 1; text-align: center; }
.linkish {
  background: none; border: 0; padding: 4px; cursor: pointer;
  color: var(--ink-faint); font: inherit; font-size: 13.5px;
}
.linkish:hover { color: var(--ink-soft); }
.autherr {
  margin: 0; font-size: 13.5px; color: var(--coral); font-weight: 640;
}
