/* DivorcePlus booking widget
   Palette lifted from the live site so the widget reads as part of the page:
   navy #141C5C, teal #166F92, pale #CCEFFA, mist #EFFAFD, paper #EFEEEA, ink #1E181A */

:root {
  --ink:      #1E181A;
  --navy:     #141C5C;
  --teal:     #166F92;
  --teal-dk:  #0F5670;
  --pale:     #CCEFFA;
  --mist:     #EFFAFD;
  --paper:    #EFEEEA;
  --muted:    #676363;
  --line:     #DDE5EA;
  --white:    #FFFFFF;
  --warn:     #A3341F;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(20,28,92,.05), 0 8px 24px rgba(20,28,92,.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font: 400 15px/1.55 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 26px;
  max-width: 620px;
  margin: 0 auto;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

.muted { color: var(--muted); }

/* ── Header ───────────────────────────────────────────────────── */
.head { margin-bottom: 20px; }

.eyebrow {
  margin: 0 0 8px;
  font: 600 11px/1 'Inter Tight', sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
}

.coach-name {
  margin: 0;
  font: 600 26px/1.15 'Fraunces', Georgia, serif;
  letter-spacing: -.01em;
  color: var(--navy);
}

.coach-line { margin: 6px 0 0; font-size: 14px; }

/* ── Step 1: session types ────────────────────────────────────── */
.session-list { display: grid; gap: 10px; }

.session {
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color .14s, background .14s, transform .14s;
}
.session:hover { border-color: var(--teal); background: var(--mist); }
.session:active { transform: translateY(1px); }
.session[aria-checked="true"] { border-color: var(--teal); background: var(--mist); box-shadow: inset 0 0 0 1px var(--teal); }

.session-body { flex: 1; min-width: 0; }
.session-name { display: block; font-weight: 600; font-size: 16px; color: var(--navy); }
.session-desc { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.session-meta { flex: 0 0 auto; text-align: right; font-size: 13px; color: var(--muted); }
.session-price { display: block; font-weight: 600; color: var(--ink); }
.session-dur { display: block; margin-top: 2px; white-space: nowrap; }
.session-price.free { color: var(--teal); }

/* ── Step 2: the day rail (signature element) ─────────────────── */
.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.rail-month {
  margin: 0;
  font: 600 13px/1 'Inter Tight', sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail-nav {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  font-size: 15px; line-height: 1;
  cursor: pointer;
  transition: border-color .14s, background .14s;
}
.rail-nav:hover:not(:disabled) { border-color: var(--teal); background: var(--mist); }
.rail-nav:disabled { opacity: .32; cursor: default; }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  padding-bottom: 2px;
}

.day {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 11px 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  font: inherit; color: inherit;
  transition: border-color .14s, background .14s;
}
.day:hover:not(:disabled) { border-color: var(--teal); }
.day[aria-selected="true"] { background: var(--navy); border-color: var(--navy); }
.day[aria-selected="true"] .day-dow,
.day[aria-selected="true"] .day-num { color: var(--white); }
.day:disabled { cursor: default; background: var(--paper); border-color: transparent; }
.day:disabled .day-dow, .day:disabled .day-num { color: #A8A5A5; }

.day-dow {
  font: 600 10.5px/1 'Inter Tight', sans-serif;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.day-num { font: 600 18px/1 'Fraunces', Georgia, serif; color: var(--navy); }

/* The meter: one dash per open slot, capped at four. Reading the rail tells
   you where the room is without opening every day. */
.day-meter { display: flex; gap: 2.5px; height: 4px; }
.day-meter i { width: 6px; height: 3px; border-radius: 2px; background: var(--pale); }
.day[aria-selected="true"] .day-meter i { background: rgba(255,255,255,.55); }
.day:disabled .day-meter i { background: #D8D5D0; }

.tz-note { margin: 14px 0 12px; font-size: 12.5px; color: var(--muted); }
.tz-note strong { color: var(--ink); font-weight: 600; }

.linky {
  border: 0; background: none; padding: 0;
  font: inherit; font-size: inherit;
  color: var(--teal); text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}
.linky:hover { color: var(--teal-dk); }

.times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.time {
  padding: 11px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font: 500 14.5px/1 'Inter Tight', sans-serif;
  color: var(--navy);
  cursor: pointer;
  transition: border-color .14s, background .14s, color .14s;
}
.time:hover { border-color: var(--teal); background: var(--mist); }
.time.selected { background: var(--teal); border-color: var(--teal); color: var(--white); }

.empty { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

.rail-skeleton { display: grid; grid-auto-flow: column; gap: 6px; margin-bottom: 16px; }
.rail-skeleton i {
  height: 66px; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--paper) 25%, #F7F6F3 50%, var(--paper) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Step 3: details ──────────────────────────────────────────── */
.chosen {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  background: var(--mist);
  border: 1px solid var(--pale);
  border-radius: var(--r-md);
  margin-bottom: 20px;
}
.chosen-when { margin: 0; font: 600 15.5px/1.3 'Inter Tight', sans-serif; color: var(--navy); }
.chosen-what { margin: 3px 0 0; font-size: 13px; }
/* "Change" sits on its own rather than inside a sentence, so it has to meet the
   24px WCAG 2.5.8 target minimum on its own. */
.chosen .linky { padding: 4px 6px; margin-right: -6px; min-height: 24px; }

.field { margin-bottom: 16px; }

/* .lbl is for captions that head a group or a read-only value: they look like a
   label but have no form control to point at, and an orphan <label> is a lie to
   a screen reader. */
label, .lbl {
  display: block;
  margin-bottom: 6px;
  font: 600 13.5px/1.3 'Inter Tight', sans-serif;
  color: var(--ink);
}
.opt { font-weight: 400; color: var(--muted); }

/* Every text-entry type gets the same treatment. number/time/date are left out
   on purpose: they live in tight grid rows that style themselves, and a
   type-selector here would outrank those class rules. */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], input[type="url"], textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font: 400 15px/1.4 'Inter Tight', sans-serif;
  color: var(--ink);
  transition: border-color .14s, box-shadow .14s;
}
textarea { resize: vertical; min-height: 76px; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22,111,146,.14);
}

input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--warn); }

.hint { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.err { margin: 5px 0 0; font-size: 12.5px; color: var(--warn); min-height: 0; }
.err:empty { display: none; }
.form-err { margin-top: 12px; font-size: 13.5px; }

/* Payment step */
.pay-element { margin: 16px 0 18px; min-height: 40px; }
.pay-secure { text-align: center; }

.consent {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 4px 0 18px;
  font: 400 13px/1.5 'Inter Tight', sans-serif;
  color: var(--muted);
}
.consent input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--teal); flex: 0 0 auto; }
.consent a { color: var(--teal); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 22px;
  border: 1px solid var(--teal);
  border-radius: var(--r-sm);
  background: var(--teal);
  color: var(--white);
  font: 600 15.5px/1 'Inter Tight', sans-serif;
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}
.btn:hover { background: var(--teal-dk); border-color: var(--teal-dk); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--teal); }
.btn.ghost:hover { background: var(--mist); }

/* ── Sign in with Google ──────────────────────────────────────── */
/* Google's brand guidelines want their mark unaltered on a neutral button,
   so this one does not inherit the teal treatment. */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 22px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: #3C4043;
  font: 600 15px/1 'Inter Tight', sans-serif;
  text-decoration: none; cursor: pointer;
  transition: background .14s, border-color .14s;
}
.btn-google:hover { background: #F7F7F5; border-color: #C9C6C2; }
.btn-google svg { flex: 0 0 18px; }

/* "or" rule between the two ways in */
.or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--muted);
  font: 500 12px/1 'Inter Tight', sans-serif; letter-spacing: .06em; text-transform: uppercase;
}
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── Confirmation ─────────────────────────────────────────────── */
#state-done { text-align: center; padding: 12px 0 4px; }

.done-mark {
  width: 56px; height: 56px; margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--mist);
  color: var(--teal);
  animation: pop .4s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

.done-title { margin: 0 0 6px; font: 600 24px/1.2 'Fraunces', Georgia, serif; color: var(--navy); }
.done-when { margin: 0 0 10px; font: 600 16px/1.4 'Inter Tight', sans-serif; color: var(--ink); }
#done-note { margin: 0 auto 22px; max-width: 380px; font-size: 14px; }
.done-actions { display: grid; gap: 10px; max-width: 320px; margin: 0 auto 16px; }
.ref { font-size: 12px; letter-spacing: .04em; }
.ref span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.err-title { margin: 0 0 8px; font: 600 20px/1.25 'Fraunces', Georgia, serif; color: var(--navy); }
#state-error { text-align: center; }
#state-error .btn { max-width: 220px; margin: 18px auto 0; }

/* ── Focus and motion ─────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 480px) {
  .wrap { padding: 18px; border-radius: 12px; }
  .coach-name { font-size: 22px; }
  .rail { gap: 4px; }
  .day { padding: 9px 2px 8px; }
  .day-num { font-size: 16px; }
  .day-meter i { width: 4px; }
  .times { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .session { padding: 14px; }
}
