/* Matches nadia-automates.ca: palette, serif headings, system sans body. */
:root {
  --bg: #ffffff;
  --ink: #1b1a3a;
  --muted: #57577a;
  --line: #d6d6ea;
  --mark: #d3c4f7;
  --soft: #f5f1fd;
  --blue: #2c47c9;
  --purple: #6a3fc9;
  --teal: #0e7378;
  --teal-dark: #0a5a5e;
  --link: #2c47c9;
  --error: #a3262f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
.wrap, main { max-width: 44rem; margin: 0 auto; padding: 0 1rem; }
main { padding-bottom: 2.5rem; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
p { overflow-wrap: anywhere; }

/* Site header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.375rem; color: var(--ink); text-decoration: none; }
.back { font-size: 0.9375rem; }
footer { padding: 1.5rem 0 3rem; color: var(--muted); font-size: 0.9375rem; border-top: 1px solid var(--line); }
footer p { margin: 0 0 0.4rem; }

/* Headings and text */
.intro { padding: 3rem 0 1.5rem; }
.eyebrow { margin: 0 0 0.5rem; color: var(--teal); font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.04em; }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.5rem, 9vw, 3.75rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 1.25rem; }
h1 mark { background: none; color: var(--purple); padding: 0; }
h2 { font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; margin: 0 0 1rem; }
h3 { font-family: var(--serif); font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }
.sub { font-size: 1.25rem; max-width: 34rem; margin: 0 0 1rem; }
.muted { color: var(--muted); }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; color: var(--muted); }
.facts li::before { content: "✓ "; color: var(--teal); font-weight: 700; }
section { border-top: 1px solid var(--line); padding: 2rem 0; }
.note { margin: 1.5rem 0 0; padding-left: 1rem; border-left: 4px solid var(--purple); }
ol.steps { margin: 0; padding-left: 1.4rem; }
ol.steps li { margin: 0 0 0.6rem; padding-left: 0.3rem; }
ol.steps li::marker { font-family: var(--serif); font-weight: 700; }

/* Forms */
label { display: block; font-weight: 600; margin-top: 1rem; }
input, textarea {
  display: block; width: 100%; max-width: 30rem; margin-top: 0.35rem;
  padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 4px;
  font: inherit; color: var(--ink); background: #fff;
}
input:hover, textarea:hover { border-color: var(--muted); }
textarea { min-height: 100px; }
button {
  font: inherit; font-weight: 600; border: 0; border-radius: 4px;
  padding: 0.8rem 2rem; background: var(--teal); color: #fff; cursor: pointer;
  margin: 1rem 0.25rem 0.5rem 0;
}
button:hover { background: var(--teal-dark); }
button:disabled { opacity: 0.6; cursor: progress; }

/* Time slots */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.5rem; margin: 1.25rem 0; color: var(--muted); }
.slots.message { display: block; }
.slots button.slot {
  margin: 0; padding: 0.7rem 0.5rem; background: #fff; color: var(--ink);
  border: 1px solid var(--line); font-weight: 600;
}
.slots button.slot:hover { border-color: var(--purple); background: var(--soft); }
.slots button.slot[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
#booking { margin-top: 1rem; padding: 1.5rem; background: var(--soft); border: 2px solid var(--purple); border-radius: 6px; }
#booking input, #booking textarea { max-width: none; }
#selected { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; margin: 0; }
#message { font-weight: 600; color: var(--teal-dark); }
#message:empty { display: none; }

@media (max-width: 30rem) {
  .intro { padding-top: 2rem; }
  button { width: 100%; }
  .slots button.slot { width: auto; }
}

/* Photo next to the intro line, like the website's About section */
.meet { display: flex; gap: 1.25rem; align-items: center; margin: 0 0 1rem; }
.photo { flex: 0 0 auto; width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; background: var(--line); }
.meet .sub { margin: 0; }

/* Month calendar (booking page): dates in the 14-day window are buttons */
.picker { display: grid; gap: 1.5rem 2.5rem; margin-top: 0.5rem; }
@media (min-width: 40rem) { .picker { grid-template-columns: minmax(17rem, 1fr) 1fr; } }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.month-head h3 { margin: 0; }
.month-head button.icon { margin: 0; width: auto; }
.month-head button.icon:disabled { visibility: hidden; }
.month-week, .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 0.2rem; }
.month-week { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.25rem; }
.month-grid.message { display: block; color: var(--muted); }
.month-grid > span, .month-grid button.day {
  aspect-ratio: 1; display: grid; place-items: center; margin: 0; padding: 0; width: 100%;
  border-radius: 50%; font-size: 1rem; position: relative;
}
.month-grid > span.out { color: #b9b9cf; }
.month-grid button.day { background: none; color: #9a9ab5; font-weight: 400; border: 0; }
.month-grid button.day:disabled { cursor: default; opacity: 1; }
.month-grid button.day.open { color: var(--purple); font-weight: 700; background: var(--soft); }
.month-grid button.day.open::after { content: ""; position: absolute; bottom: 18%; width: 5px; height: 5px; border-radius: 50%; background: var(--purple); }
.month-grid button.day.open:hover { background: var(--mark); }
.month-grid button.day[aria-pressed="true"] { background: var(--purple); color: #fff; }
.month-grid button.day[aria-pressed="true"]::after { background: #fff; }
.month-note { font-size: 0.9375rem; margin: 0.5rem 0 0; }
.times h3 { margin-top: 0.4rem; }
.times .slots { margin-top: 0.75rem; }

.optional { font-weight: 400; color: var(--muted); }

@media (max-width: 30rem) {
  .meet { align-items: flex-start; }
  .photo { width: 4.5rem; height: 4.5rem; }
  .month-grid button.day { width: 100%; }
}

/* ---------- Admin ---------- */
body.admin main { max-width: 76rem; }
body.admin main > h1 { margin-top: 2rem; }
button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.secondary:hover { background: var(--soft); border-color: var(--purple); }
button.icon { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 0.35rem 0.9rem; font-size: 1.3rem; line-height: 1.2; border-radius: 50%; }
button.icon:hover { background: var(--soft); }
details.manual { margin-top: 1.5rem; }
details.manual summary { cursor: pointer; color: var(--link); font-weight: 600; }

/* Week calendar (Google Calendar style) */
.cal-toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cal-toolbar button { margin: 0; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.cal-toolbar h3 { margin: 0 0 0 0.75rem; font-size: 1.5rem; }
.cal-legend { list-style: none; padding: 0; margin: 0.75rem 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.9375rem; color: var(--muted); }
.cal-legend .sw { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 3px; vertical-align: -0.1rem; margin-right: 0.4rem; }
.sw.regular { background: #e3f1f1; border: 1px solid #b9dcdc; }
.sw.opening { background: var(--purple); }
.sw.business { background: var(--teal); }
.sw.personal { background: #8b8ba8; }
.cal-warning { color: var(--error); font-weight: 600; }
.cal { --gut: 4rem; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; user-select: none; -webkit-user-select: none; }
.cal-head, .cal-allday, .cal-grid { display: grid; grid-template-columns: var(--gut) repeat(7, minmax(5.5rem, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); }
.cal-dayhead { text-align: center; padding: 0.4rem 0 0.3rem; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; display: flex; flex-direction: column; align-items: center; }
.cal-dayhead strong { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; text-transform: none; letter-spacing: 0; }
.cal-dayhead.today { color: var(--purple); }
.cal-dayhead.today strong { background: var(--purple); color: #fff; }
.cal-allday { border-bottom: 1px solid var(--line); min-height: 1.75rem; }
.cal-allday .cal-gutter { font-size: 0.75rem; color: var(--muted); text-align: right; padding: 0.3rem 0.5rem 0 0; }
.cal-alldaycell { border-left: 1px solid var(--line); padding: 2px; display: flex; flex-direction: column; gap: 2px; }
.cal-chip { font-size: 0.78rem; line-height: 1.4; padding: 0 0.35rem; border-radius: 3px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.business { background: var(--teal); }
.cal-chip.personal { background: #8b8ba8; }
.cal-scroll { height: min(36rem, 70vh); overflow-y: auto; overflow-x: auto; }
.cal-grid { position: relative; height: calc(24 * 48px); }
.cal-hours { position: relative; }
.cal-hours span { position: absolute; right: 0.5rem; transform: translateY(-50%); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.cal-col {
  position: relative; border-left: 1px solid var(--line); cursor: cell; touch-action: pan-y;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(#eeeef7 1px, transparent 1px);
  background-size: 100% 48px, 100% 24px;
}
.cal-past { position: absolute; left: 0; right: 0; top: 0; background: rgba(245, 245, 250, 0.7); pointer-events: none; }
.cal-regular { position: absolute; left: 0; right: 0; background: rgba(14, 115, 120, 0.1); border-left: 3px solid rgba(14, 115, 120, 0.45); pointer-events: none; }
.cal-now { position: absolute; left: -1px; right: 0; height: 2px; background: #d93025; z-index: 4; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #d93025; }
.cal-block {
  position: absolute; z-index: 2; margin: 0; padding: 0.15rem 0.4rem; border-radius: 4px; overflow: hidden;
  font: inherit; font-size: 0.78rem; line-height: 1.3; text-align: left; color: #fff; border: 1px solid #fff;
  display: flex; flex-direction: column; align-items: flex-start; cursor: default;
}
.cal-block strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-block span { opacity: 0.9; white-space: nowrap; }
.cal-block.opening { background: var(--purple); cursor: pointer; }
.cal-block.opening:hover { background: #5a32b0; }
.cal-block.business { background: var(--teal); }
.cal-block.personal { background: #8b8ba8; }
.cal-select { position: absolute; left: 2px; right: 2px; z-index: 3; background: rgba(106, 63, 201, 0.25); border: 2px solid var(--purple); border-radius: 4px; font-size: 0.78rem; font-weight: 600; color: var(--ink); padding: 0.1rem 0.35rem; pointer-events: none; }
.cal-pop { position: fixed; z-index: 20; width: min(20rem, calc(100vw - 16px)); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(27, 26, 58, 0.22); padding: 1rem 1.1rem 0.6rem; }
.cal-pop p { margin: 0; white-space: pre-line; font-weight: 600; }
.cal-pop-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cal-pop-actions button { margin: 0.75rem 0 0.25rem; padding: 0.55rem 1.1rem; width: auto; }
@media (max-width: 30rem) { .cal-toolbar button, .cal-pop-actions button { width: auto; } }
.show-password { display: flex; align-items: center; gap: .4rem; font-weight: 400; margin: .5rem 0 1rem; }
.show-password input { width: auto; margin: 0; }
