/* Patient-facing booking pages.

   Standalone rather than built on app.css: the people using these are mostly
   older, often hard of hearing, usually on a phone, and sometimes standing in a
   doorway scanning a poster. That calls for larger type and much larger tap
   targets than a staff tool, so the sizes here are deliberately not the clinic
   app's. The palette is the clinic's own, so it still looks like them. */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --line: #e5e3df;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --soft: #8a8a8a;
  --accent: #8b3a2b;
  --accent-soft: #f4e6e0;
  --good: #3f6b45;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, system-ui, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.bk-preview {
  background: #f0c869; color: #5c3d06; text-align: center;
  padding: 8px 14px; font-size: 14px; font-weight: 600;
}

.bk-wrap { max-width: 620px; margin: 0 auto; padding: 0 18px 56px; }

.bk-head { padding: 26px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.bk-brand { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.bk-brand span { color: var(--accent); font-weight: 500; }

h1 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 21px; margin: 34px 0 14px; letter-spacing: -0.01em; }
h3 { font-size: 16px; margin: 0 0 10px; color: var(--muted); font-weight: 600; }

.bk-lead { font-size: 17px; color: var(--muted); margin: 0 0 8px; }
.bk-empty {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; color: var(--muted); margin: 16px 0;
}

/* Choices ----------------------------------------------------------------- */
.bk-list { display: grid; gap: 12px; }
.bk-option {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; text-decoration: none; color: inherit; cursor: pointer;
  font: inherit;
}
.bk-option:hover, .bk-option:focus-visible {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none;
}
.bk-option-name { display: block; font-size: 19px; font-weight: 600; }
.bk-option-sub { display: block; font-size: 15px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.bk-option-time { display: block; font-size: 14px; color: var(--soft); margin-top: 8px; }

/* Times ------------------------------------------------------------------- */
.bk-day { margin: 22px 0 26px; }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.bk-time-form { margin: 0; }
.bk-time {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 8px; cursor: pointer; font: inherit;
  /* Comfortably above the 44px minimum: these are tapped by people whose hands
     are not always steady. */
  min-height: 58px;
}
.bk-time:hover, .bk-time:focus-visible {
  border-color: var(--accent); background: var(--accent-soft); outline: none;
}
.bk-time-h { display: block; font-size: 18px; font-weight: 600; }
.bk-time-who { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.htmx-request#bk-slots { opacity: .4; }

/* Summary ----------------------------------------------------------------- */
.bk-summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px 20px; margin: 20px 0 26px;
}
.bk-summary-row {
  display: flex; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line);
}
.bk-summary-row:last-child { border-bottom: 0; }
.bk-summary-row span { flex: 0 0 74px; color: var(--soft); font-size: 15px; }
.bk-summary-row b { font-weight: 600; }

/* Form -------------------------------------------------------------------- */
.bk-form { display: grid; gap: 22px; }
.bk-field { display: block; border: 0; padding: 0; margin: 0; }
.bk-label { display: block; font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.bk-optional { font-weight: 400; color: var(--soft); font-size: 15px; }
.bk-help { display: block; font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.bk-field input[type="text"],
.bk-field input[type="tel"],
.bk-field input[type="email"],
.bk-field input[type="date"],
.bk-field textarea {
  width: 100%; font: inherit; font-size: 18px;
  padding: 14px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); margin-top: 6px;
}
.bk-field input:focus, .bk-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.bk-radio {
  display: flex; align-items: center; gap: 12px; padding: 14px 0; font-size: 17px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.bk-radio:last-child { border-bottom: 0; }
.bk-radio input { width: 22px; height: 22px; accent-color: var(--accent); }

.bk-submit {
  width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 18px; font: inherit; font-size: 19px; font-weight: 600; cursor: pointer;
  min-height: 60px;
}
.bk-submit:hover { filter: brightness(1.08); }
.bk-note { font-size: 15px; color: var(--muted); margin: 0; }
.bk-error {
  background: #f7e6e4; border: 1px solid #e0b5af; color: #7a2320;
  border-radius: 10px; padding: 15px 18px; margin-bottom: 20px; font-size: 16px;
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Done -------------------------------------------------------------------- */
.bk-done { text-align: center; }
.bk-tick {
  width: 64px; height: 64px; border-radius: 50%; background: var(--good); color: #fff;
  display: grid; place-items: center; font-size: 34px; margin: 10px auto 20px;
}
.bk-done .bk-summary { text-align: left; }
.bk-ref {
  background: var(--accent-soft); border-radius: 12px; padding: 18px; margin: 8px 0 22px;
}
.bk-ref span { display: block; font-size: 15px; color: var(--muted); }
.bk-ref b {
  display: block; font-size: 30px; letter-spacing: .08em; color: var(--accent);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; margin-top: 4px;
}
.bk-phone { color: var(--accent); font-weight: 600; text-decoration: none; }
.bk-phone-big { font-size: 24px; }

.bk-foot {
  margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 15px;
}

/* Poster ------------------------------------------------------------------ */
.poster-body { background: #f2f0ed; }
.poster-actions {
  max-width: 720px; margin: 0 auto; padding: 16px 18px;
  display: flex; align-items: center; gap: 16px; font-size: 14px;
}
.poster-actions a { color: var(--accent); text-decoration: none; }
.poster-print {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer;
}
.poster-warn { color: #85560a; }

.poster {
  background: #fff; max-width: 720px; margin: 0 auto 40px; padding: 54px 48px 48px;
  text-align: center; border: 1px solid var(--line);
}
.poster-brand { font-size: 22px; font-weight: 600; margin-bottom: 34px; }
.poster-brand span { color: var(--accent); font-weight: 500; }
.poster h1 { font-size: 46px; margin: 0 0 6px; letter-spacing: -0.03em; }
.poster-site { font-size: 26px; color: var(--accent); font-weight: 600; margin: 0 0 30px; }
.poster-qr { width: 340px; height: 340px; display: block; margin: 0 auto 26px; }
.poster-how { font-size: 23px; font-weight: 600; margin: 0 0 6px; }
.poster-url { font-size: 17px; color: var(--muted); margin: 0 0 26px; word-break: break-all; }
.poster-phone { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.poster-addr { font-size: 17px; color: var(--muted); margin: 0; }

@media print {
  .no-print { display: none !important; }
  .poster-body { background: #fff; }
  .poster { border: 0; margin: 0; padding: 30px; max-width: none; }
  .poster-qr { width: 300px; height: 300px; }
}

@media (max-width: 420px) {
  h1 { font-size: 26px; }
  .bk-times { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}
