@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

:root {
  --cream:      #F7F3EA;   /* Arcadia paper */
  --cream-dark: #EEE8DC;
  --navy:       #22301F;   /* Arcadia forest */
  --navy-light: #304632;   /* Arcadia forest, lighter */
  --gold:       #C9A227;   /* Arcadia gold */
  --gold-light: #DCB464;   /* Arcadia gold, lighter */
  --tan:        #9C8B76;
  --tan-light:  #C4B8A8;
  --text:       #1A1A1A;
  --text-soft:  #5A5047;
  --white:      #FFFFFF;
  --radius:     6px;
  --shadow:     0 1px 12px rgba(28,45,60,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Top bar ──────────────────────────────────────────────────────── */
.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  padding: .75rem 2rem;
}
.top-bar-inner {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 500;
}
.top-bar-sub {
  color: var(--tan);
  font-size: .82rem;
  font-weight: 300;
}

/* ── Layout ───────────────────────────────────────────────────────── */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.body-wrap {
  flex: 1;
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  gap: 0;
}

/* ── Left panel ───────────────────────────────────────────────────── */
.left-panel {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--cream-dark);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  background: var(--white);
}

.service-host {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--tan);
  margin-bottom: .3rem;
}
.service-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: .5rem;
}
.service-meta { margin-bottom: .4rem; }
.duration-display {
  font-size: .82rem;
  color: var(--text-soft);
}
.service-hours {
  font-size: .78rem;
  color: var(--tan);
  line-height: 1.7;
}
.service-hours em { font-style: italic; }

/* Duration toggle */
.dur-toggle-wrap {
  display: flex;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.dur-btn {
  flex: 1;
  padding: .5rem .75rem;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 150ms, color 150ms;
}
.dur-btn + .dur-btn { border-left: 1.5px solid var(--cream-dark); }
.dur-btn.active { background: var(--navy); color: var(--white); }
.dur-btn:not(.active):not(.locked):hover { background: var(--cream); }

/* A length that exists but is not on offer to this visitor yet. Shown rather
   than hidden: knowing the hour exists is part of the invitation. */
.dur-btn.locked {
  color: var(--tan-light);
  background: repeating-linear-gradient(
    -45deg, transparent 0 6px, rgba(156,139,118,.07) 6px 12px);
  cursor: not-allowed;
}
.dur-note {
  margin-top: .55rem;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--tan);
}
.dur-note a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.dur-note a:hover { color: var(--gold); }

/* ── Mini calendar ────────────────────────────────────────────────── */
.mini-cal { user-select: none; }
.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
}
.mini-month-label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--navy);
}
.mini-nav {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tan);
  font-size: 1rem;
  padding: .2rem .35rem;
  border-radius: var(--radius);
  transition: color 150ms, background 150ms;
  line-height: 1;
}
.mini-nav:hover { color: var(--navy); background: var(--cream); }

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.mini-dn {
  text-align: center;
  font-size: .65rem;
  color: var(--tan-light);
  padding: .25rem 0 .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mini-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  border-radius: 50%;
  color: var(--tan-light);
  cursor: default;
  transition: background 120ms, color 120ms;
}
.mini-day.workday { color: var(--text); cursor: pointer; }
.mini-day.workday:hover { background: var(--cream-dark); }
.mini-day.in-week { background: var(--cream-dark); color: var(--navy); }
.mini-day.today { font-weight: 600; color: var(--gold); }
.mini-day.past { opacity: .35; cursor: default; }

/* Timezone pill */
.tz-pill {
  font-size: .75rem;
  color: var(--text-soft);
  padding: .4rem .6rem;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--cream-dark);
  word-break: break-all;
}

/* ── Right panel ──────────────────────────────────────────────────── */
.right-panel {
  flex: 1;
  padding: 2rem 2rem 3rem;
  min-width: 0;
}

/* Week nav */
.week-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.week-arrow {
  background: none;
  border: 1.5px solid var(--cream-dark);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--tan);
  font-size: .95rem;
  transition: border-color 150ms, color 150ms, background 150ms;
  flex-shrink: 0;
  line-height: 1;
}
.week-arrow:hover { border-color: var(--navy); color: var(--navy); background: var(--cream); }
.week-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--navy);
}

/* Week grid: 7 columns */
.week-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  align-items: start;
}

.day-col { display: flex; flex-direction: column; gap: .35rem; }

.day-header {
  text-align: center;
  padding-bottom: .6rem;
  border-bottom: 1.5px solid var(--cream-dark);
  margin-bottom: .15rem;
}
.day-name {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--tan);
  margin-bottom: .2rem;
}
.day-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: .95rem;
  font-weight: 500;
  color: var(--navy);
  margin: 0 auto;
}
.day-num.today {
  background: var(--navy);
  color: var(--white);
}
.day-col.weekend .day-name,
.day-col.weekend .day-num { color: var(--tan-light); opacity: .6; }

/* Slot buttons */
.slot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  /* The time can be joined by a date tag and a clash caption. Wrapping keeps
     them from squeezing each other out on a narrow column. */
  flex-wrap: wrap;
  column-gap: .3rem;
  width: 100%;
  border: 1px solid #DDD6C8;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #FFFFFF 0%, #EDE8DF 100%);
  box-shadow: 0 1px 3px rgba(28,45,60,.10), inset 0 1px 0 rgba(255,255,255,.9);
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms, box-shadow 150ms, color 150ms, background 150ms;
  white-space: nowrap;
}
.slot-btn:hover {
  border-color: var(--gold-light);
  background: linear-gradient(180deg, #FFFFFF 0%, #F5EDD8 100%);
  box-shadow: 0 2px 6px rgba(201,168,76,.18), inset 0 1px 0 rgba(255,255,255,.9);
  color: var(--gold);
}

/* Height scales with duration: 30 min = compact, 60 min = double */
.week-grid.dur-30 .slot-btn { min-height: 26px; padding: .15rem .25rem; }
.week-grid.dur-60 .slot-btn { min-height: 52px; padding: .15rem .25rem; }

.day-loading {
  text-align: center;
  padding: 1rem 0;
  color: var(--tan-light);
  font-size: .78rem;
}
.day-empty {
  text-align: center;
  padding: .75rem 0;
  color: var(--tan-light);
  font-size: .72rem;
}

/* ── Booking form ─────────────────────────────────────────────────── */
.back-btn {
  background: none;
  border: none;
  color: var(--tan);
  font-size: .85rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.25rem;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: color 150ms;
}
.back-btn:hover { color: var(--navy); }

.form-slot-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 1.75rem;
}
.form-slot-label em { font-style: italic; color: var(--gold); }

.form-group { margin-bottom: 1.1rem; }
label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--tan);
  margin-bottom: .35rem;
  font-weight: 500;
}
input[type=text], input[type=email], textarea {
  width: 100%;
  max-width: 460px;
  padding: .65rem .85rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  color: var(--text);
  background: var(--cream);
  outline: none;
  transition: border-color 150ms, background 150ms;
}
input:focus, textarea:focus {
  border-color: var(--gold);
  background: var(--white);
}
textarea { resize: vertical; min-height: 80px; display: block; }
input::placeholder, textarea::placeholder { color: var(--tan-light); }

.btn-primary {
  margin-top: .5rem;
  padding: .75rem 2rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms;
  letter-spacing: .03em;
}
.btn-primary:hover { background: var(--navy-light); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  background: none;
  border: none;
  color: var(--tan);
  font-size: .85rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 0;
  transition: color 150ms;
}
.btn-ghost:hover { color: var(--navy); }
.mt2 { margin-top: 1.5rem; display: block; }

.error-msg {
  max-width: 460px;
  background: #FFF4F4;
  border: 1px solid #F5C6C6;
  border-radius: var(--radius);
  padding: .65rem .9rem;
  color: #C0392B;
  font-size: .82rem;
  margin-bottom: 1rem;
}

/* ── Confirmation ─────────────────────────────────────────────────── */
.confirm-view { padding-top: 1rem; }
.confirm-icon {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.confirm-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: .5rem;
}
.confirm-sub {
  color: var(--text-soft);
  font-size: .88rem;
  margin-bottom: 1.5rem;
}
.confirm-detail {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: .85rem;
  color: var(--text-soft);
  line-height: 1.9;
  max-width: 400px;
  margin-bottom: .75rem;
}
.confirm-detail strong { color: var(--navy); }
.confirm-cal-link {
  font-size: .82rem;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-light);
}

/* ── Utility ──────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ───────────────────────────────────────────────────── */

/* Tablet: the two panels stack and the left one lies down as a strip. */
@media (min-width: 721px) and (max-width: 920px) {
  .body-wrap { flex-direction: column; }
  .left-panel {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--cream-dark);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.25rem 1.75rem;
    padding: 1.25rem 1.5rem;
  }
  .service-block   { flex: 1 1 240px; }
  .mini-cal        { flex: 0 0 230px; }
  .dur-block       { flex: 0 0 auto; align-self: flex-start; max-width: 280px; }
  /* These two sit on their own row: kept to their natural size so a wide
     tablet does not stretch a button across the whole strip. */
  .me-block        { flex: 0 0 auto; width: 320px; margin-top: 0; }
  .tz-pill         { flex: 0 0 auto; align-self: flex-start; }
}

/* ── Phone ─────────────────────────────────────────────────────────
   Five day-columns never fit a phone. Rather than squeezing them (which
   silently pushed Thursday and Friday onto a second row that read as a
   different week), the phone shows one day at a time and the month grid
   becomes the date picker. The two panels interleave — pick a date, pick
   a time, then the small print — which needs the left panel to dissolve
   into the same flex column via display:contents. */
@media (max-width: 720px) {
  .body-wrap {
    flex-direction: column;
    background: var(--white);
    padding: 1.25rem 1.1rem 2rem;
    gap: 1.5rem;
  }
  .left-panel { display: contents; }
  .service-block   { order: 1; }
  .dur-block       { order: 2; }
  .mini-cal        { order: 3; }
  .right-panel     { order: 4; padding: 0; }
  .me-block        { order: 5; margin-top: 0; }
  .tz-pill         { order: 6; }

  .top-bar { padding: .7rem 1.1rem; }
  .service-title { font-size: 1.75rem; line-height: 1.2; }
  .service-blurb { font-size: 13.5px; }
  .service-hours { font-size: .82rem; }
  /* The toggle sits right beneath and already states the length */
  .service-meta { display: none; }

  /* The month grid is the date picker now, so it gets real tap targets */
  .mini-cal-grid    { gap: 3px; }
  .mini-day         { font-size: .95rem; }
  .mini-dn          { font-size: .72rem; padding-bottom: .45rem; }
  .mini-month-label { font-size: 1.02rem; }
  .mini-nav         { font-size: 1.2rem; padding: .45rem .7rem; }
  .mini-cal-header  { margin-bottom: .75rem; }
  /* One day is selected here, not a week — make the selection unmistakable */
  .mini-day.in-week { background: var(--navy); color: var(--white); font-weight: 500; }

  .dur-btn { padding: .75rem; font-size: .88rem; min-height: 46px; }

  /* Day navigation sits directly above the times it controls */
  .week-nav {
    gap: .5rem;
    margin-bottom: 1rem;
    padding-bottom: .85rem;
    border-bottom: 1.5px solid var(--cream-dark);
    justify-content: space-between;
  }
  .week-arrow { width: 2.6rem; height: 2.6rem; font-size: 1.05rem; }
  .week-arrow:disabled { opacity: .28; pointer-events: none; }
  .week-label { flex: 1; text-align: center; font-size: 1.18rem; }

  .week-grid.day-view { display: block; }
  .week-grid.day-view .day-header { display: none; }
  .week-grid.day-view .day-col { gap: 0; }
  .slot-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: .55rem;
  }
  .slot-list .day-empty { grid-column: 1 / -1; padding: 1.25rem 0; font-size: .85rem; }
  .week-grid.day-view .slot-btn,
  .week-grid.dur-30.day-view .slot-btn,
  .week-grid.dur-60.day-view .slot-btn {
    min-height: 48px;
    padding: .55rem .4rem;
    font-size: .95rem;
    flex-direction: column;
    /* Stacked already: wrapping here would spill into a second COLUMN, which
       is what flex-wrap means once the direction turns. */
    flex-wrap: nowrap;
    gap: 1px;
  }
  /* flex-basis is the height in a column, so the row-case 100% must stand down */
  .week-grid.day-view .slot.clash::after { flex-basis: auto; }
  .slot.clash::after { font-size: 9px; margin-top: 1px; }

  /* 16px or iOS zooms the whole page in on focus */
  input[type=text], input[type=email], textarea { font-size: 16px; max-width: none; }
  .btn-primary { width: 100%; padding: .95rem 1rem; font-size: .95rem; }
  .form-slot-label { font-size: 1.25rem; margin-bottom: 1.35rem; }
  .back-btn { min-height: 44px; }
  .error-msg, .confirm-detail { max-width: none; }
  .confirm-view { padding-top: 0; }
  .confirm-icon { font-size: 2rem; margin-bottom: .5rem; }
  .confirm-title { font-size: 1.7rem; }
  .btn-ghost { min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
  .mt2 { margin-top: .75rem; }

  .me-btn { min-height: 48px; }

  /* Filling in the form, or reading the confirmation: the date controls above
     it have done their job and would otherwise push the fields off screen. */
  html:not(.choosing) .dur-block,
  html:not(.choosing) .mini-cal,
  html:not(.choosing) .me-block,
  html:not(.choosing) .service-blurb,
  html:not(.choosing) .service-hours { display: none; }
}


/* ── Setup banner: shown while a calendar is still unauthorised ────── */
.setup-banner {
  max-width: 1100px;
  margin: 1rem auto 0;
  width: calc(100% - 4rem);
  padding: .85rem 1.1rem;
  background: rgba(201,162,39,.10);
  border: 1px solid rgba(201,162,39,.34);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-soft);
}
.setup-banner strong { color: var(--text); font-weight: 500; }
.setup-banner a {
  color: var(--navy-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.setup-banner a:hover { color: var(--gold); }


/* ── Embedded at takemetoarcadia.com/booking ───────────────────────
   The host page supplies the wordmark, the heading and the background,
   so the widget drops its own chrome and lets the page show through. */
html.is-embed, .is-embed body { height: auto; }   /* so the frame can measure content, not viewport */
.is-embed body { background: transparent; }
.is-embed .top-bar { display: none; }
.is-embed .shell { min-height: 0; }
/* The host page draws the frame — hairline, radius, shadow — so the widget
   does not draw a second one inside it. */
.is-embed .body-wrap {
  background: var(--white);
  border: 0;
  border-radius: 0;
}
.is-embed .setup-banner { width: 100%; margin: 0 0 1rem; }
/* The host page already carries the wordmark directly above this frame, so
   repeating it here just says Arcadia twice in the same eyeline. */
.is-embed .service-host { display: none; }


/* ── "Check against my calendar" ───────────────────────────────────── */
.me-block { margin-top: 1.25rem; }
.hidden { display: none !important; }
.me-btn {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  width: 100%; padding: .7rem 1rem; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--navy); background: var(--white);
  border: 1px solid var(--cream-dark); border-radius: var(--radius);
  transition: border-color .25s, background .25s;
}
.me-btn:hover { border-color: var(--gold); background: rgba(201,162,39,.06); }
.me-g {
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  font-family: Georgia, serif; font-size: 11px; line-height: 1;
}
.me-note { margin: .6rem 0 0; font-size: 11.5px; line-height: 1.65; color: var(--tan); }
.me-on {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-soft); margin-top: .2rem;
}
.me-dot { width: 7px; height: 7px; border-radius: 50%; background: #4E7A4E; }
.me-off {
  margin-left: auto; padding: 0; cursor: pointer;
  background: none; border: none; font-size: 11.5px; color: var(--tan);
  text-decoration: underline; text-underline-offset: 3px;
}
.me-off:hover { color: var(--navy); }

/* When a slot lands on a different date in the visitor's own timezone, the
   time alone would be misleading, so the date rides along with it. */
.slot-day { font-size: .82em; color: var(--tan); }

/* A slot the visitor is busy for stays visible but reads as a clash. The
   caption always takes a line of its own rather than crowding the time. */
.slot.clash { opacity: .42; }
.slot.clash::after {
  content: 'busy for you'; display: block;
  /* Its own full-width line in either direction: flex-basis governs the row
     case, width/align-self the column case a phone puts it in. Without the
     latter it takes its max-content width and spills out of the button. */
  flex-basis: 100%; width: 100%; min-width: 0; align-self: stretch;
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tan); margin-top: 3px; text-align: center;
  white-space: normal;   /* the button is nowrap; this line must be free to wrap */
}
.slot.mutual { border-color: rgba(78,122,78,.55); }


/* Conversation blurb under the title */
.service-blurb {
  margin: .55rem 0 0; font-size: 12.5px; line-height: 1.7; color: var(--text-soft);
}
/* One length on offer: it is a statement, not a choice, so it should not wear
   the filled navy of a live control — full width on a phone that reads as a
   button you are meant to press. */
.dur-toggle-wrap.single { background: var(--cream); border-color: var(--cream-dark); }
.dur-toggle-wrap.single .dur-btn,
.dur-toggle-wrap.single .dur-btn.active {
  width: 100%;
  cursor: default;
  pointer-events: none;
  background: transparent;
  color: var(--text-soft);
  letter-spacing: .03em;
}
