/* =========================================================================
   The two appointment pages a patient sees: their own appointment, and the
   booking page on the website.

   Layered on form.css (palette, type, one-column shape) and sign.css.
   ========================================================================= */

.appt-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 26px 28px; margin-bottom: 22px;
}
@media (max-width: 640px) { .appt-card { padding: 20px 18px; } }

.appt-when {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.appt-when .day { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; }
.appt-when .time {
  font-size: 1.9rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.appt-meta { display: grid; gap: 8px; }
.appt-meta div { display: flex; gap: 12px; font-size: .95rem; }
.appt-meta span { color: var(--ink-3); min-width: 96px; flex: none; }

.appt-state {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 20px;
  padding: 5px 13px; font-size: .82rem; font-weight: 600;
  background: var(--surface-3); color: var(--ink-2);
}
.appt-state.ok { background: var(--ok-soft); color: var(--ok); }
.appt-state.warn { background: var(--warn-soft); color: var(--warn); }
.appt-state .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.appt-actions { display: grid; gap: 10px; margin-top: 4px; }
.appt-actions .btn { width: 100%; }
.appt-note {
  font-size: .86rem; color: var(--ink-3); line-height: 1.6; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.appt-note b { color: var(--ink-2); }

/* --------------------------------------------------- the soonest, or the diary
 *
 * Two doors, neither of them the advanced one. Most people want the first
 * appointment they can get and would rather not read a month of Tuesdays to
 * find it; the rest are working around a job or a school run and need the
 * actual days. The first card names the time instead of promising one, because
 * a button that answers the question is worth more than a button that offers
 * to.
 */
.when-picker { display: grid; gap: 10px; margin-bottom: 8px; }
.when-card {
  display: grid; gap: 2px; text-align: left; width: 100%;
  padding: 15px 18px; border-radius: 14px; cursor: pointer; font: inherit;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  transition: filter .12s, border-color .12s, background .12s;
}
.when-card:hover { filter: brightness(1.06); }
.when-card.ghost {
  background: var(--surface); border-color: var(--line-strong); color: var(--ink);
}
.when-card.ghost:hover { border-color: var(--accent); background: var(--accent-soft); filter: none; }
.when-card .when-kind {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; opacity: .78;
}
.when-card b { font-size: 1.06rem; font-weight: 650; letter-spacing: -.01em; }
.when-card .when-time { font-size: .92rem; opacity: .85; font-variant-numeric: tabular-nums; }
.when-back {
  margin-bottom: 14px; padding-left: 0; padding-right: 0; background: none; border: 0;
  color: var(--ink-3); font-size: .88rem; cursor: pointer;
}
.when-back:hover { color: var(--accent); }

/* ------------------------------------------------------------ slot picker */

.slot-days { display: grid; gap: 18px; }
.slot-day > h3 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); margin: 0 0 9px; font-weight: 650;
}
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot {
  padding: 11px 6px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem;
  font-variant-numeric: tabular-nums; cursor: pointer; text-align: center;
  transition: border-color .12s, background .12s;
}
.slot:hover { border-color: var(--accent); background: var(--accent-soft); }
.slot.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.slot:disabled { opacity: .4; cursor: default; }

.type-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.type-picker button {
  padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font: inherit; font-size: .9rem; cursor: pointer;
}
.type-picker button.on {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600;
}

.chosen {
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 20px; font-size: .95rem;
}
.chosen b { display: block; font-size: 1.05rem; margin-bottom: 2px; }

.step-head { margin: 0 0 6px; font-size: 1.15rem; }
.step-sub { margin: 0 0 18px; color: var(--ink-3); font-size: .92rem; line-height: 1.6; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media print {
  .appt-actions, .slot-days, .type-picker { display: none !important; }
}

.more-dates {
  width: 100%; margin-top: 18px; justify-content: center;
  border: 1px dashed var(--line-strong); background: transparent;
}


/* --------------------------------------------------- the fee, said up front */

/* Before the time is chosen, not after. A price that appears at the end of a
   form is the reason people abandon forms. */
.fee-note {
  margin: 0 0 18px; padding: 11px 14px;
  border-radius: 10px; background: var(--accent-soft, #e3f2ef);
  color: var(--accent-deep, #0d3b36); font-size: .92rem; line-height: 1.5;
}
.fee-line {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 12px 0; margin-bottom: 14px;
  border-top: 1px solid var(--line, #e4e1db); border-bottom: 1px solid var(--line, #e4e1db);
}
.fee-line b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* The rehearsal checkout. Loud on purpose: nobody should mistake it for a real
   payment page, so it looks nothing like one. */
.test-pay { text-align: center; padding: 30px 0; }
.test-badge {
  display: inline-block; margin-bottom: 16px; padding: 5px 13px;
  border-radius: 999px; background: #b45309; color: #fff;
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.test-pay h2 { margin: 0 0 10px; }
.test-pay p { max-width: 44ch; margin: 0 auto 22px; line-height: 1.6; }

.spinner-lg {
  width: 34px; height: 34px; margin: 0 auto 18px;
  border: 3px solid var(--line, #e4e1db); border-top-color: var(--accent, #0f766e);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* The choices are now named things — "breast augmentation, first
   consultation" — not one-word types, so they need room to breathe. */
.type-picker button em {
  display: block; font-style: normal; font-weight: 400;
  font-size: .78rem; opacity: .7; margin-top: 2px;
}

/* ---- the note under the email box ---------------------------------------
 * Amber for "is that right?", red for "that cannot receive mail", and the
 * suggestion one tap away. Nothing here stops the booking. */
.addr-note {
  display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 0; font-size: 13.5px; line-height: 1.45;
}
.addr-note.warn { color: var(--warn, #9a6700); }
.addr-note.bad { color: var(--danger, #b3261e); }
.addr-note .addr-use {
  border: 1px solid currentColor; background: transparent; color: inherit;
  border-radius: 999px; padding: 2px 11px; font: inherit; font-size: 13px; cursor: pointer;
}

/* The practice's logo above its name, when one has been set. */
.masthead-logo { display: block; height: auto; width: auto; max-height: 52px; max-width: 220px; margin: 0 0 10px; }

/* Where — the place on the day, on the slot, and on what was chosen. */
.day-place { font-weight: 500; opacity: .7; letter-spacing: 0; text-transform: none; }
.slot small { display: block; font-size: .72rem; opacity: .7; margin-top: 2px; }
.place-line { margin: -4px 0 18px; color: var(--muted, #6b6b6b); font-size: .95rem; }
.chosen-place { margin-top: 4px; font-size: .95rem; }
.place-picker button em { white-space: normal; }

/* A place with nothing left online, said on its card. */
.place-picker .place-full { display: block; margin-top: 4px; color: #b45309; font-style: normal; font-size: .8rem; }
