/* Booking flow.
   Palette and type lifted from lisagroomehomeopathy.ie so the page reads as
   part of her site: Cormorant Garamond, ink #2E2E2E, the lime accent from her
   Book Now buttons, black pill CTAs. Body copy uses a system sans rather than
   the serif — the serif is lovely at 36px and hard work at 15px in a form. */

:root {
  --ink: #2e2e2e;
  --body: #5b594f;
  --muted: #8a877c;
  --line: #e4e1d8;
  --page: #ffffff;
  --surface: #faf9f5;
  --accent: #8cb452;          /* deeper leaf green, for borders and focus */
  --accent-soft: #e8f5d2;     /* her Book Now lime, flattened onto white */
  --accent-ink: #4a6b26;
  --danger: #9c3b2e;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  /* her font's old style 1 and 0 read as a small i and o: a fee or a date must not be misread */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

main a { color: var(--accent-ink); }
main a:hover { text-decoration: none; }

/* ---- header ---- */

.head { text-align: center; padding: 1rem 0 1.5rem; }

.brand {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-block;
}

.brandlogo { height: 64px; width: auto; max-width: 90%; display: block; }

.tagline {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---- step rail ---- */

.steps {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.steps li { display: flex; align-items: center; gap: 0.5rem; }
.steps li + li::before { content: ""; width: 1.25rem; height: 1px; background: var(--line); }
.steps a { color: var(--accent-ink); text-decoration: none; }
.steps a:hover { text-decoration: underline; }
.steps .on { color: var(--ink); font-weight: 600; }

/* ---- headings and copy ---- */

h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.lede { margin: 0 0 1.75rem; }

.note, .hint {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0.4rem 0 1.1rem;
}

.note { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.hint.centre { text-align: center; margin-top: 0.85rem; }
.opt { color: var(--muted); font-weight: 400; }

/* ---- who it is for: a box each, marked with her tall tree and her small tree ---- */

.wrap.wide { max-width: 58rem; }

.intro { max-width: 40rem; margin: 0 auto 2rem; text-align: center; }
.intro .lede { margin-bottom: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }

.whobox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.5rem 0.5rem;
}

.who {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.9rem;
  height: 104px;
  margin-bottom: 1rem;
}

.who img { display: block; width: auto; }
.who.adult img { height: 96px; }
.who.child img { height: 52px; }

.who h2 {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.1rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.row:hover .r-name, .row:focus-visible .r-name { color: var(--accent-ink); }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.r-name, .r-fee {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--ink);
}

.r-meta { grid-column: 1 / -1; font-size: 0.875rem; color: var(--muted); }

.r-go {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
}

@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
  .who { justify-content: flex-start; height: auto; min-height: 64px; }
  .who.adult img { height: 84px; }
  .who.child img { height: 48px; }
}

/* ---- the time step: a calendar on the left, the chosen day's times on the right ---- */

/* fixed, so pressing a square far down a phone screen cannot scroll the page to its radio */
.cal-radio { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.chosen { display: flex; align-items: center; gap: 0.55rem; }
.chosen img { display: block; height: 34px; width: auto; }

.cal-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.5rem;
  align-items: start;
}

.cal-pills { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.75rem; }
.cal-side { grid-column: 1; grid-row: 2; }
.cal-slots { grid-column: 2; grid-row: 2; }

.cal-pills label {
  padding: 0.35rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--page);
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  cursor: pointer;
}
.cal-pills label:hover { border-color: var(--accent); }

/* the weekday row and the chosen day's heading are the same height with the same line
   under them, and the squares and the time buttons match, so both sides read as one grid */
.cal-dows, .cal-head {
  display: grid;
  align-items: center;
  height: 3rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.cal-dows { grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 4px; }
.cal-dows span { text-align: center; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cal-head { grid-template-columns: 1fr auto; column-gap: 1rem; }
.cal-head .day-name { margin: 0; padding: 0; border: 0; font-size: 1.4rem; line-height: 1.2; }
.cal-count { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

.cal-month, .cal-panel { display: none; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-day { display: flex; align-items: center; justify-content: center; height: 2.85rem; border-radius: 10px; }
.cal-day.off { color: #c9c6bb; }
.cal-day.full { color: var(--muted); text-decoration: line-through; }
.cal-day.free { background: var(--accent-soft); color: var(--ink); font-weight: 500; cursor: pointer; transition: box-shadow 0.12s; }
.cal-day.free:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }

.cal-legend { margin: 0.7rem 0 0; font-size: 0.8rem; color: var(--muted); }
.cal-legend i { display: inline-block; width: 0.7rem; height: 0.7rem; margin-right: 0.3rem; border: 1px solid #cfe3a8; border-radius: 3px; background: var(--accent-soft); vertical-align: -1px; }

/* level with the calendar: start below any empty first row, then one row of times to one
   row of squares, in however many columns fill the same height (appointments.TIME_ROWS) */
.cal-slots .times { gap: 4px; padding-top: calc(var(--cal-lead, 0) * (2.85rem + 4px)); }
.cal-slots .times.cols-1 { grid-template-columns: minmax(0, 1fr); }
.cal-slots .times.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cal-slots .times.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cal-slots .times.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cal-slots .time { display: flex; align-items: center; justify-content: center; height: 2.85rem; padding: 0; }

@media (max-width: 720px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-slots { grid-column: 1; grid-row: 3; margin-top: 1.25rem; }
  /* one column here: nothing beside the times to line up with */
  .cal-slots .times, .cal-slots .times.cols-1, .cal-slots .times.cols-2, .cal-slots .times.cols-3 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-top: 0;
  }
}

.day-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.times {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
  gap: 0.5rem;
}

.time {
  display: block;
  padding: 0.7rem 0.5rem;
  text-align: center;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s, border-color 0.15s;
}

.time:hover, .time:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
  outline: none;
}

.empty {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---- chosen slot summary ---- */

.summary {
  position: relative;
  padding: 1.1rem 1.25rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin: 0 0 1.75rem;
}

.summary-when {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
  padding-right: 4.5rem;
}

.summary-what, .summary-ref { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--accent-ink); }
.summary-ref { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

.summary-change {
  position: absolute;
  top: 1.15rem;
  right: 1.25rem;
  font-size: 0.85rem;
  color: var(--accent-ink);
}

/* ---- form ---- */

.form { display: block; }

.form label {
  display: block;
  margin: 1.1rem 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.form input[type="text"], .form input:not([type]),
.form input[type="email"], .form input[type="tel"], .form textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form textarea { resize: vertical; }

.modes { border: 0; padding: 0; margin: 1.5rem 0 0; }

.modes legend {
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 400;
  cursor: pointer;
}

.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin: 0; }

/* ---- buttons ---- */

.cta {
  display: block;
  width: 100%;
  margin-top: 1.75rem;
  padding: 1rem 2rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: #fff;
  background: #000;
  border: 1px solid #000;
  border-radius: 50px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s;
}

.cta:hover { opacity: 0.85; }
.cta.ghost { background: transparent; color: var(--ink); }

/* ---- flashes ---- */

.flashes { margin: 0 0 1.5rem; }

.flash {
  margin: 0 0 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 0.925rem;
}

.flash.error { border-left-color: var(--danger); color: var(--danger); }

/* ---- done ---- */

.done-panel { text-align: left; }
.done-panel .summary { background: var(--accent-soft); }

/* ---- manage (change / cancel) ---- */

.status { margin: 0 0 1rem; }
.manage-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1.25rem 0 0.5rem;
}
.manage-actions form { margin: 0; }
.back { margin-top: 1.75rem; font-size: 0.9rem; }

.remembered {
  margin: 0 0 1.25rem;
  padding: 0.6rem 0.85rem;
  background: var(--accent-soft);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent-ink);
}
.remembered a { color: var(--ink); }

/* ---- footer ---- */

.foot {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}

.foot a { color: var(--accent-ink); }

@media (min-width: 34rem) {
  .wrap { padding-top: 2.5rem; }
  h1 { font-size: 2.4rem; }
}

/* the test copy says so on every page */
.testband { background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; text-align: center; padding: 8px 16px; }
