/* Shift lead capture: mobile-first dark theme from the Shift Innovation design concept.
   System fonts only (zero font downloads). Phone first; two-column route step on tablets (staff mode). */
:root {
  --bg: #0B1B3D;
  --bg-2: #061026;
  --card: #10224A;
  --card-2: #152B5A;
  --ink: #ffffff;
  --ink-2: #9FB0D3;
  --line: rgba(255,255,255,.14);
  --cyan: #1FD0EC;
  --cyan-2: #0F8FE6;
  --field: #ffffff;
  --field-ink: #0B1B3D;
  --danger: #FF8A8A;
  --ok: #3DDC97;
  --radius: 14px;
  --bar-h: 92px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg-2); }
body {
  margin: 0; color: var(--ink); line-height: 1.45; min-height: 100vh;
  background: radial-gradient(900px 520px at 85% -10%, rgba(31,208,236,.16), rgba(11,27,61,0) 60%), linear-gradient(var(--bg), var(--bg-2));
  background-attachment: fixed;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}
[hidden] { display: none !important; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 8px; padding-top: calc(14px + env(safe-area-inset-top));
  max-width: 960px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 38px; width: auto; }
.staff-badge { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bg); background: var(--cyan); padding: 5px 10px; border-radius: 999px; }

.steps { display: flex; gap: 6px; max-width: 960px; margin: 6px auto 0; padding: 0 20px; }
.dot { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); transition: background .25s; }
.dot.on { background: var(--cyan); box-shadow: 0 0 10px rgba(31,208,236,.55); }

main { max-width: 520px; margin: 0 auto; padding: 20px 20px 8px; }
.step { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow { margin: 0 0 8px; font-size: 12.5px; letter-spacing: .06em; color: var(--ink-2); font-weight: 650; }
h1:focus { outline: none; }
h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.12; letter-spacing: -.015em; font-weight: 800; }
.lead { margin: 0 0 22px; color: var(--ink-2); font-size: 16px; }

.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
label, legend { display: block; font-weight: 650; font-size: 14px; margin: 0 0 7px; padding: 0; color: #dbe5ff; }
input[type="text"], input[type="tel"], input[type="email"], input[type="time"] {
  width: 100%; height: 54px; padding: 0 16px; font-size: 17px; /* 16px+ stops iOS zoom */
  color: var(--field-ink); background: var(--field);
  border: 2px solid transparent; border-radius: 12px;
  outline: none; transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
input::placeholder { color: #7a86a3; }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(31,208,236,.25); }
input[aria-invalid="true"] { border-color: var(--danger); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
.hint { margin: 7px 0 0; font-size: 13px; color: var(--ink-2); }
.err { margin: 7px 0 0; font-size: 13.5px; color: var(--danger); font-weight: 650; min-height: 0; }
.err:empty { display: none; }
.form-err { text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* route preview */
.routemap { position: relative; height: 210px; margin: 4px 0 18px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.routemap canvas, .routemap #gmap { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* autocomplete */
.combo { position: relative; }
.combo input { padding-right: 56px; }
.locate {
  position: absolute; right: 7px; top: 7px; width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; border-radius: 10px;
  background: #E6F9FD; color: #0B6B86; cursor: pointer;
}
.locate:active { background: #cdf1fa; }
.list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  margin: 0; padding: 6px; list-style: none; max-height: 280px; overflow-y: auto;
  background: #fff; color: var(--field-ink); border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
}
.list li { padding: 11px 12px; border-radius: 10px; cursor: pointer; }
.list li[aria-selected="true"], .list li:hover { background: #E6F9FD; }
.list .p { display: block; font-weight: 650; font-size: 15.5px; }
.list .s { display: block; font-size: 13px; color: #5a6784; }
.list .none { color: #5a6784; cursor: default; }
.list .none:hover { background: none; }
.chosen {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--card); border: 1.5px solid rgba(31,208,236,.45); border-radius: var(--radius);
}
.tick { width: 22px; height: 22px; border-radius: 50%; background: var(--cyan); color: var(--bg); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.chosen-label { flex: 1; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { border: 0; background: none; color: var(--cyan); font-weight: 750; font-size: 14px; padding: 8px 4px; cursor: pointer; }
.presets { display: flex; gap: 14px; margin-top: 2px; }

/* day chips + flexibility pills */
.chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chip input, .pill input { position: absolute; opacity: 0; pointer-events: none; }
.chip { margin: 0; }
.chip span, .pill span {
  display: grid; place-items: center; height: 52px; border-radius: 12px; font-size: 14px; font-weight: 700;
  background: rgba(255,255,255,.06); border: 1.5px solid var(--line); color: #fff; cursor: pointer; user-select: none; text-align: center;
  transition: transform .08s, background .15s, color .15s, border-color .15s;
}
.chip input:checked + span, .pill input:checked + span { background: var(--cyan); border-color: var(--cyan); color: var(--bg); box-shadow: 0 0 16px rgba(31,208,236,.35); }
.chip input:focus-visible + span, .pill input:focus-visible + span { box-shadow: 0 0 0 4px rgba(31,208,236,.4); }
.chip span:active { transform: scale(.96); }
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pill { margin: 0; }
.pill span { font-size: 15px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
.check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--cyan); }
.check a { color: var(--cyan); }

/* sticky action bar */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; gap: 10px; justify-content: center;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg-2) 62%, rgba(6,16,38,0));
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 58px; padding: 0 22px; border: 0; border-radius: 14px;
  font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; text-decoration: none;
  transition: transform .08s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { flex: 1; max-width: 400px; background: linear-gradient(135deg, #3CE3FA, var(--cyan)); color: var(--bg); box-shadow: 0 10px 26px rgba(31,208,236,.35); }
.btn.primary[disabled] { opacity: .65; }
.btn.ghost { background: transparent; color: #fff; border: 1.5px solid var(--line); }
.btn.small { height: 44px; font-size: 15px; padding: 0 16px; border-radius: 12px; background: var(--cyan); color: var(--bg); }
.btn.wa { background: #25d366; color: #05220f; flex: 1; }
.btn.slack { background: #4a154b; color: #fff; flex: 1; }
.bar.done { display: none; }

/* success */
.success { position: relative; text-align: center; padding-top: 6px; }
.success .eyebrow { color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; }
.success .lead { margin-bottom: 18px; }
.burst { position: absolute; left: 50%; top: 4px; width: 0; height: 0; pointer-events: none; }
.burst span { position: absolute; width: 8px; height: 8px; border-radius: 2px; opacity: 0; animation: pop 1.1s ease-out .1s forwards; }
.burst span:nth-child(1) { background: var(--cyan); --x: -110px; --y: 30px; }
.burst span:nth-child(2) { background: #fff; --x: 100px; --y: 18px; }
.burst span:nth-child(3) { background: var(--cyan-2); --x: -60px; --y: 70px; }
.burst span:nth-child(4) { background: #9CF3FF; --x: 70px; --y: 80px; }
.burst span:nth-child(5) { background: var(--cyan); --x: 20px; --y: 100px; }
.burst span:nth-child(6) { background: #fff; --x: -20px; --y: 55px; }
@keyframes pop { 0% { opacity: 1; transform: translate(0,0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(200deg); } }
.share-card, .next-card { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.next-card { text-align: center; }
.next-card .btn { width: 100%; max-width: none; }
.share-card h2 { margin: 0 0 6px; font-size: 18px; }
.share-card p, .next-card p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.linkbox { display: flex; gap: 8px; margin-bottom: 12px; }
.linkbox input { height: 44px; font-size: 15px; }
.share-actions { display: flex; gap: 10px; }
.share-actions .btn { height: 52px; font-size: 16px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #fff; color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 700; z-index: 30;
  max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 640px) { main { padding-top: 32px; } h1 { font-size: 34px; } }

/* tablets (staff-assisted registration) and desktops: roomier, route step in two columns */
@media (min-width: 760px) {
  main { max-width: 900px; }
  [data-step="1"] .field, [data-step="1"] .row2, [data-step="1"] .lead { max-width: 560px; }
  .step[data-step="2"] { display: grid; grid-template-columns: 1fr 1.15fr; gap: 0 28px; align-items: start; }
  .step[data-step="2"] > .eyebrow, .step[data-step="2"] > h1 { grid-column: 1 / -1; }
  .step[data-step="2"] .routemap { grid-column: 2; grid-row: 3 / span 2; height: 360px; margin: 0; }
  .step[data-step="2"] .place-fields { grid-column: 1; grid-row: 3; }
  .step[data-step="2"] > .hint { grid-column: 1; grid-row: 4; }
  .step[data-step="3"] .field { max-width: 640px; }
  .step.success { max-width: 560px; margin: 0 auto; }
  .bar { padding-left: calc(50% - 450px); padding-right: calc(50% - 450px); }
}
