@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Newsreader:ital,opsz,wght@0,6..72,300..600;1,6..72,300..500&display=swap');
/* Type here is a stand-in for the brand faces (Romie headings, BL Melody body).
   The self-hosted brand fonts are cut-down subsets with no digits or punctuation
   to spare, so prices, times and dates would break apart mid-word. Do not switch
   this over until full font files arrive - see "Brand standard" in PROJECT.md,
   and run scripts/check-font-coverage.mjs on anything new. */

:root {
  --green: #2a523f;
  --green-deep: #1f3e30;
  --cream: #f0ece7;
  --cream-card: #ffffff;
  --peach: #f5d7c3;
  --ink: #2c2825;
  --muted: #9b8e80;
  --line: #e6dfd7;
  --serif-head: 'Instrument Serif', Georgia, serif;
  --serif-body: 'Newsreader', Georgia, serif;
}

#booking-root, #booking-root * { box-sizing: border-box; }

#booking-root.booking-embed {
  font-family: var(--serif-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Manage/booking React pages rendered inside the site chrome (header+footer):
   content padding + soft background, but NOT full-viewport (chrome supplies the
   header/footer above and below). */
/* The Squarespace #page.container (from SiteChrome) imposes a large
   min-height / top padding meant for full page-sections. On these embedded
   React pages that creates a big blank band under the header - neutralise it. */
#page.site-chrome-main {
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  /* Don't let any inherited flex centering push the content down. */
  display: block !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}
/* The .book-embed itself must hug the top, not stretch/centre. */
#page.site-chrome-main > .book-embed {
  min-height: 0 !important;
  display: block !important;
}

.book-embed {
  font-family: var(--serif-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding: 40px 20px 80px;
  background: radial-gradient(1200px 600px at 50% -10%, #f7f3ee 0%, var(--cream) 55%);
}

.book-shell {
  max-width: 720px;
  margin: 0 auto;
}

/* ---- Header ---- */
.book-head { text-align: center; margin-bottom: 36px; padding-top: 60px; }
.book-eyebrow {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 14px;
}
.book-title {
  font-family: var(--serif-head);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.2;
  color: var(--green);
  margin: 0 0 18px;
  padding: 0 12px;
}
/* Embedded /book title: inherit the site's H3 styling (Instrument Serif,
   matching the Therapy "Therapy fees and rebates" heading). Only set spacing
   + brand colour; leave font-size/family to the inherited Squarespace H3. */
.book-title-h {
  color: var(--green);
  margin: 0 0 18px;
}
.book-sub {
  font-size: 17px;
  line-height: 1.6;
  color: #5c5750;
  max-width: 30em;
  margin: 0 auto 16px;
}
.book-rates {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--green);
  background: rgba(245, 215, 195, 0.4);
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  margin: 0;
}
.book-rates span { color: var(--muted); }

/* ---- Card ---- */
.book-card {
  background: var(--cream-card);
  border-radius: 22px;
  box-shadow: 0 10px 40px rgba(42, 82, 63, 0.08);
  border: 1px solid var(--line);
  padding: 30px;
}

/* ---- Step header ---- */
.step-label {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-label .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.step + .step { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); }

/* ---- Room picker ---- */
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.room-option {
  text-align: left;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  font-family: var(--serif-body);
}
.room-option:hover { border-color: var(--peach); }
.room-option.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(42, 82, 63, 0.12);
  background: #fbfaf8;
}
.room-option .r-name { font-size: 20px; color: var(--green); display: block; }
/* The studio's number for the room, beside its name. Set smaller and lighter
   so the name still leads and the number reads as a note against it. */
.room-option .r-number { font-size: 15px; opacity: 0.7; }
.room-option .r-meta { font-size: 13px; color: var(--muted); font-family: 'Helvetica Neue', Arial, sans-serif; }
/* How the rates apply, said once under the spaces rather than on every card. */
.rate-note {
  margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted);
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ---- Date ---- */
.date-input {
  font-family: var(--serif-body);
  font-size: 17px;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  width: 100%;
  background: #fff;
}
.date-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(42,82,63,.12); }

/* ---- Time grid ---- */
.grid-hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; font-family: 'Helvetica Neue', Arial, sans-serif; }
.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
  margin: -4px;
}
.slot {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 12.5px;
  padding: 9px 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: background .1s, color .1s, border-color .1s;
}
.slot:hover:not(.taken) { border-color: var(--green); }
.slot.taken { background: #f3efe9; color: #c3b9ac; cursor: not-allowed; text-decoration: line-through; }
.slot.in-range { background: var(--green); color: #fff; border-color: var(--green); }
.slot.range-edge { box-shadow: 0 0 0 2px var(--peach) inset; }
.slot-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 24px; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 14px; }

/* ---- Start / Finish time selectors ---- */
.time-range {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.time-field { flex: 1; min-width: 0; }
.time-field label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: 6px; font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 600;
}
.time-select {
  width: 100%;
  font-family: var(--serif-body);
  font-size: 17px;
  padding: 13px 40px 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background-color: #fff;
  /* custom chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232a523f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.time-select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(42,82,63,.12); }
.time-select:disabled { background-color: #f6f3ef; color: var(--muted); cursor: not-allowed; }
.time-arrow { color: var(--muted); font-size: 20px; padding-bottom: 12px; }

@media (max-width: 480px) {
  .time-range { flex-direction: column; align-items: stretch; gap: 12px; }
  .time-arrow { display: none; }
}

/* ---- Date range ---- */
.date-range { display: flex; gap: 14px; }
.date-field { flex: 1; }
.date-field label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: 6px; font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 600;
}

/* ---- Calendar drag-select grid ---- */
.cal-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 480px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.cal-grid {
  display: grid;
  /* columns set inline (48px label + N day columns) */
  min-width: max-content;
  touch-action: none; /* let us handle drag without the page scrolling */
  /* Dragging across cells must not select the hour labels / day headings. */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
.cal-corner { position: sticky; top: 0; left: 0; z-index: 3; background: #fff; }
.cal-dayhead {
  position: sticky; top: 0; z-index: 2;
  background: #fbfaf8; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line);
  padding: 8px 4px; text-align: center;
  display: flex; flex-direction: column; gap: 1px;
}
.cal-wd { font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
/* Same Instrument Serif as the page heading, just smaller. A little
   letter-spacing + breathing room stops it reading as horizontally squashed
   in the narrow day columns. */
.cal-dt {
  font-family: var(--serif-head);
  font-size: 19px;
  color: var(--green);
  line-height: 1.15;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.cal-dayhead { min-width: 80px; }

.cal-hour {
  position: sticky; left: 0; z-index: 1;
  background: #fff; border-top: 1px solid var(--line);
  font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 10px; color: var(--muted);
  padding: 2px 6px 0 6px; text-align: right;
}
.cal-hourcell { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }

.cal-cell {
  height: 11px;
  cursor: pointer;
  border-bottom: 1px solid #f3efe9;
  background: #fff;
  transition: background .05s;
}
.cal-hourcell .cal-cell:nth-child(4) { border-bottom: none; }
.cal-cell:hover:not(.taken):not(.past) { background: #eef3ef; }
.cal-cell.taken { background: repeating-linear-gradient(45deg,#f3efe9,#f3efe9 4px,#ece6de 4px,#ece6de 8px); cursor: not-allowed; }
/* Past time (already elapsed today): blank + faded, not selectable, so the
   grid doesn't look fully booked. */
.cal-cell.past { background: #fbfaf8; cursor: default; opacity: 0.5; }
/* The booking being modified - shown lightly but still selectable. */
.cal-cell.current { background: rgba(42,82,63,0.14); }
.cal-cell.current:hover { background: rgba(42,82,63,0.22); }
.cal-cell.sel { background: var(--green) !important; border-bottom-color: var(--green-deep); }

.cal-legend {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); margin: 0 0 12px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
.cal-legend-swatch {
  display: inline-block; width: 16px; height: 16px; border-radius: 4px;
  background: rgba(42,82,63,0.14); border: 1px solid var(--line);
}

/* ---- Selection summary ---- */
.sel-summary {
  margin-top: 16px;
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.sel-summary .when { font-size: 16px; color: var(--ink); }
.sel-summary .price { font-size: 22px; color: var(--green); font-family: var(--serif-head); white-space: nowrap; }
.sel-summary .price small { font-size: 12px; color: var(--muted); font-family: 'Helvetica Neue', Arial, sans-serif; display: block; text-align: right; }

/* ---- Fields ---- */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: 6px; font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 600;
}
.field input, .field textarea {
  width: 100%; font-family: var(--serif-body); font-size: 16px;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(42,82,63,.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Button ---- */
.book-submit {
  width: 100%;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; font-size: 14px;
  color: #fff; background: var(--green); border: none; border-radius: 12px;
  padding: 17px; cursor: pointer; transition: background .15s, transform .05s; margin-top: 8px;
}
.book-submit:hover:not(:disabled) { background: var(--green-deep); }
.book-submit:active:not(:disabled) { transform: translateY(1px); }
.book-submit:disabled { opacity: .5; cursor: not-allowed; }

.form-errors {
  background: #fdf3f1; border: 1px solid #f0c8c0; color: #8a3b2e;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px;
}
.form-errors ul { margin: 6px 0 0; padding-left: 18px; }

/* ---- Manage actions ---- */
.mng-btn {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px; letter-spacing: .5px;
  color: var(--green); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 22px; cursor: pointer; transition: border-color .15s, background .15s;
}
.mng-btn:hover:not(:disabled) { border-color: var(--green); }
.mng-btn:disabled { opacity: .5; cursor: not-allowed; }
.mng-btn.danger { color: #8a3b2e; border-color: #e6c4bc; }
.mng-btn.danger:hover:not(:disabled) { background: #fdf3f1; border-color: #d99; }

/* ---- Post-payment finalising banner (spinner -> success tick) ---- */
.pay-finalising {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 28px 20px; border-radius: 16px;
  background: #fbfaf8; border: 1px solid var(--line);
}
.pay-finalising.done { background: #eef5ef; border-color: #cfe0d4; }
.pay-finalising-t { margin: 4px 0 0; font-size: 18px; color: var(--green); font-family: var(--serif-head); }
.pay-finalising-s { margin: 0; font-size: 13px; color: var(--muted); }
.pay-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #e3ded6; border-top-color: var(--green);
  animation: pay-spin 0.8s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }
.pay-tick {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  animation: pay-pop 0.3s ease-out;
}
@keyframes pay-pop { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---- Voucher box ---- */
.voucher-box {
  background: #fbfaf8; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px;
}
.voucher-row { display: flex; gap: 10px; }
.voucher-row .date-input { flex: 1; }
.voucher-msg { font-size: 14px; color: var(--green); margin: 0 0 10px; }
.pay-form { margin-top: 4px; }

/* ---- Success ---- */
.book-success { text-align: center; padding: 20px 10px; }
.book-success .tick {
  width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 20px;
}
.book-success h2 { font-family: var(--serif-head); font-weight: 400; font-size: 30px; color: var(--green); margin: 0 0 12px; }
.book-success p { font-size: 16px; line-height: 1.6; color: #5c5750; max-width: 28em; margin: 0 auto 10px; }

@media (max-width: 560px) {
  .room-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
  .book-card { padding: 22px 18px; }
}
