/* Booking — a workshop reception desk, not a car advert.
   Palette: a deep service-bay teal that matches the estimating platform, warm
   paper neutrals biased slightly toward it, and one amber for "we are holding
   this for you". Type: Archivo for everything spoken, IBM Plex Mono for the
   things a person reads back aloud — VIN, plate, reference. */
:root {
  --ink: #0f1e20;
  --ink-soft: #55696c;
  --line: #d6dee0;
  --bg: #eef1f2;
  --paper: #ffffff;
  --paper-2: #f6f9f9;
  --teal: #0a5d69;
  --teal-deep: #073f47;
  --teal-wash: #e3eff1;
  --amber: #a4620c;
  --amber-wash: #fcf2e2;
  --green: #1c7a4d;
  --red: #a52828;
  --ui: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --r: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6eded; --ink-soft: #93a8ab; --line: #2a393c;
    --bg: #0c1314; --paper: #141d1f; --paper-2: #1a2426;
    --teal: #4fb3bf; --teal-deep: #0f2c31; --teal-wash: #13292d;
    --amber: #e0a94f; --amber-wash: #2a2214;
    --green: #5bc88c; --red: #ef7f7f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e6eded; --ink-soft: #93a8ab; --line: #2a393c;
  --bg: #0c1314; --paper: #141d1f; --paper-2: #1a2426;
  --teal: #4fb3bf; --teal-deep: #0f2c31; --teal-wash: #13292d;
  --amber: #e0a94f; --amber-wash: #2a2214;
  --green: #5bc88c; --red: #ef7f7f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--ui); font-size: 15px; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
.wrap {
  max-width: 1020px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ── header ─────────────────────────────────────────────────────── */
.top { background: var(--teal-deep); color: #e8f3f4; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mark {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid #6fc3cd;
  background:
    linear-gradient(160deg, transparent 46%, #6fc3cd 46%, #6fc3cd 54%, transparent 54%);
}
.brandtext { display: flex; flex-direction: column; min-width: 0; }
.brandtext b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brandtext span { font-size: 11.5px; color: #9ac6cc; }
.langs { display: flex; gap: 0; flex: 0 0 auto; }
.lang {
  font-family: var(--ui); font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 5px 11px; border: 1px solid #2f5f67; background: transparent;
  color: #9ac6cc;
}
.lang:first-child { border-radius: var(--r) 0 0 var(--r); }
.lang:last-child { border-radius: 0 var(--r) var(--r) 0; border-left: 0; }
.lang.on { background: #0e5260; color: #fff; }

/* ── page head ──────────────────────────────────────────────────── */
h1 {
  font-size: clamp(25px, 5vw, 34px); margin: 26px 0 6px;
  letter-spacing: -0.02em; font-weight: 700; text-wrap: balance;
}
.lede { margin: 0 0 20px; color: var(--ink-soft); max-width: 62ch; }
.tel { color: var(--teal); font-weight: 600; text-decoration: none; }
.tel:hover { text-decoration: underline; }

/* ── step rail ──────────────────────────────────────────────────── */
.steps {
  display: flex; gap: 0; list-style: none; margin: 0 0 18px; padding: 0;
  overflow-x: auto;
}
.steps li {
  display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0;
  font-size: 12.5px; color: var(--ink-soft); white-space: nowrap;
  padding: 9px 10px; background: var(--paper); border: 1px solid var(--line);
  border-right: 0;
}
.steps li:first-child { border-radius: var(--r) 0 0 var(--r); }
.steps li:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--r) var(--r) 0; }
.steps li .dot {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-soft);
}
.steps li.on { color: var(--ink); background: var(--teal-wash); border-color: var(--teal); }
.steps li.on .dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.steps li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }

/* ── layout ─────────────────────────────────────────────────────── */
.cols { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 860px) { .cols { grid-template-columns: 1fr 300px; } }
.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px; min-width: 0;
}
.side { display: grid; gap: 12px; min-width: 0; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px; min-width: 0;
}
.card h3 {
  margin: 0 0 9px; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-soft);
}

h2 { font-size: 19px; margin: 0 0 4px; font-weight: 600; letter-spacing: -0.01em; }
.sub {
  font-size: 13px; font-weight: 600; margin: 20px 0 8px;
  color: var(--ink);
}
.sub:first-of-type { margin-top: 14px; }
.hint { margin: 0 0 14px; color: var(--ink-soft); font-size: 13.5px; max-width: 60ch; }

/* ── fields ─────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 13px; }
.field > span {
  display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 5px;
}
.field em { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .75; }
input, select, textarea {
  width: 100%; font-family: var(--ui); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 11px;
}
input.mono { font-family: var(--mono); letter-spacing: 0.04em; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}
.row { display: grid; grid-template-columns: 1fr; gap: 0 13px; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }

.note {
  font-size: 12.5px; margin: -6px 0 14px; padding: 8px 10px;
  border-radius: var(--r); background: var(--teal-wash); color: var(--ink);
  border: 1px solid var(--line);
}
.note.soft { background: none; border: 0; padding: 0; color: var(--ink-soft); margin-top: 2px; }
.note.warn { background: var(--amber-wash); border-color: var(--amber); }

/* ── choices ────────────────────────────────────────────────────── */
.opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 13px; background: var(--paper); text-align: left;
  font-family: var(--ui); font-size: 15px; color: var(--ink); width: 100%;
}
.opt:hover { border-color: var(--teal); }
.opt.on { border-color: var(--teal); background: var(--teal-wash); box-shadow: inset 2px 0 0 var(--teal); }
.opt .box {
  width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px;
  border: 1px solid var(--line); border-radius: 3px; background: var(--paper);
  display: grid; place-items: center; font-size: 11px; color: #fff;
}
.opt.round .box { border-radius: 50%; }
.opt.on .box { background: var(--teal); border-color: var(--teal); }
.opt .body { min-width: 0; flex: 1 1 auto; }
.opt .t { font-weight: 600; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.opt .code {
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--teal);
  background: var(--teal-wash); border: 1px solid var(--line);
  border-radius: 2px; padding: 0 5px;
}
.opt .d { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.opt .hrs { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.opt .due { font-size: 11px; font-weight: 600; color: var(--amber); text-transform: uppercase; letter-spacing: .06em; }

/* ── calendar ───────────────────────────────────────────────────── */
.cal { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.calhead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px; background: var(--paper-2); border-bottom: 1px solid var(--line);
}
.calhead b { font-size: 14px; font-weight: 600; }
.navbtn {
  width: 28px; height: 28px; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-size: 16px; line-height: 1; display: grid; place-items: center;
}
.navbtn:disabled { opacity: .35; cursor: default; }
.dow, .days { display: grid; grid-template-columns: repeat(7, 1fr); }
.dow span {
  padding: 7px 0; text-align: center; font-size: 10.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft);
  background: var(--paper-2);
}
.day {
  aspect-ratio: 1 / 0.82; border: 0; border-top: 1px solid var(--line);
  border-right: 1px solid var(--line); background: var(--paper);
  font-family: var(--mono); font-size: 13px; color: var(--ink); cursor: pointer;
  display: grid; place-items: center; gap: 2px; padding: 0;
}
.day:nth-child(7n) { border-right: 0; }
.day.pad { background: var(--paper-2); cursor: default; }
.day.off { color: var(--ink-soft); background: var(--paper-2); cursor: default; opacity: .6; }
.day.full { color: var(--ink-soft); cursor: default; text-decoration: line-through; opacity: .55; }
.day:not(.pad):not(.off):not(.full):hover { background: var(--teal-wash); }
.day.on { background: var(--teal); color: #fff; font-weight: 600; }
.day .free { font-size: 9px; font-family: var(--ui); color: var(--ink-soft); }
.day.on .free { color: #cdeaee; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 7px; }
.slot {
  font-family: var(--mono); font-size: 13px; cursor: pointer; padding: 9px 0;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper); color: var(--ink);
}
.slot:hover { border-color: var(--teal); }
.slot.on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.slot:disabled { opacity: .35; cursor: default; text-decoration: line-through; }

/* ── summary / promise ──────────────────────────────────────────── */
.sum { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.sum dt {
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-soft); padding-top: 2px;
}
.sum dd { margin: 0; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.promise { background: var(--amber-wash); border-color: var(--amber); }
.promiseday { margin: 0 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.addr { margin: 0; font-size: 13.5px; }

/* ── actions ────────────────────────────────────────────────────── */
.acts { display: flex; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.btn {
  font-family: var(--ui); font-size: 15px; font-weight: 600; cursor: pointer;
  padding: 11px 20px; border-radius: var(--r);
  border: 1px solid var(--teal); background: var(--teal); color: #fff;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--teal); }
#next { margin-inline-start: auto; }
.err {
  margin: 12px 0 0; padding: 9px 11px; border-radius: var(--r);
  background: var(--amber-wash); border: 1px solid var(--amber);
  color: var(--ink); font-size: 13.5px;
}

/* ── done ───────────────────────────────────────────────────────── */
.done { text-align: center; padding: 14px 0 6px; }
.tick {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--green); color: #fff; display: grid; place-items: center;
  font-size: 23px;
}
.ref { margin: 0 0 16px; color: var(--ink-soft); }
.ref b { color: var(--ink); font-size: 17px; }
.donelist {
  margin: 0 auto; max-width: 420px; text-align: left;
  display: grid; grid-template-columns: auto 1fr; gap: 7px 14px;
  border-top: 1px solid var(--line); padding-top: 14px;
}
.donelist dt {
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-soft); padding-top: 2px;
}
.donelist dd { margin: 0; font-size: 14px; }

.foot {
  margin-top: 34px; padding-block: 18px 26px;
  border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12.5px;
}

[dir="rtl"] .opt.on { box-shadow: inset -2px 0 0 var(--teal); }
[dir="rtl"] #next { margin-inline-start: auto; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
