/* Joule Coach. Colours and shapes from the Joule app (joule/frontend/src/styles.css),
   via the Joule Health website. When the Joule house style changes, update this file too. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/open-sans.woff2") format("woff2");
}

:root {
  --page: #daf4ff;
  --page-light: #eef9ff;
  --surface: #ffffff;
  --text: #1b2733;
  --text-muted: #5a6f80;
  --line: #e3eef5;
  --field-bg: #fbfdfe;
  --pink: #e8479f;
  --pink-dark: #cc2f85;
  --pink-soft: #fde9f3;
  --pink-border: #f3b6d6;
  --blue: #1f6fae;
  --deep: #1a3a5c;
  --red: #b03a3a;
  --red-soft: #f9e3e3;
  /* The Joule signature: three rounded corners, bottom right square. */
  --radius: 20px 20px 0 20px;
  --radius-small: 14px 14px 0 14px;
  --radius-mini: 10px 10px 0 10px;
  --shadow: 0 8px 28px rgba(28, 76, 110, 0.08);
  --shadow-high: 0 14px 40px rgba(28, 76, 110, 0.14);
  --max-width: 920px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font: 400 16px/1.6 "Open Sans", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }

a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; text-wrap: balance; }
.card h1 { font-size: clamp(24px, 4vw, 30px); letter-spacing: -0.02em; }
h2 { font-size: clamp(21px, 3vw, 26px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 8px; }
h3 { font-size: 19px; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 16px; }
.small { font-size: 13px; color: var(--text-muted); }
.center { text-align: center; }

/* Header */
.header-inner, .hero-inner, .content, .footer { width: 100%; max-width: var(--max-width); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 8px; }
.logo { height: 44px; width: auto; display: block; }
.language { display: flex; gap: 4px; background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 4px; }
.language button {
  font: 600 13px "Open Sans", sans-serif; color: var(--text-muted); background: none; border: 0;
  border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 32px;
}
.language button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(28, 76, 110, 0.12); }

/* Hero */
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center; padding-top: 28px; padding-bottom: 12px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-dark); margin-bottom: 10px; }
.lead { font-size: 18px; color: var(--text-muted); max-width: 46ch; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.facts li { display: flex; align-items: center; gap: 14px; }
.facts svg {
  flex: none; width: 44px; height: 44px; padding: 10px; border-radius: var(--radius-mini);
  background: var(--surface); stroke: var(--pink); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round;
  box-shadow: var(--shadow);
}
.facts span { display: grid; line-height: 1.35; }
.facts strong { font-size: 16px; }
.facts small { font-size: 14px; color: var(--text-muted); }
/* The ONVZ price is a reason to book: its own line, in bold. */
.facts .fact-onvz { font-weight: 700; color: var(--text); }
.price-old { color: var(--text-muted); font-weight: 400; }
.hero-image { position: relative; }
.hero-illustration { width: 100%; height: auto; display: block; }
.star { position: absolute; height: auto; animation: float 6s ease-in-out infinite; }
.star-a { width: 54px; top: -4%; right: 4%; }
.star-b { width: 38px; bottom: 6%; left: -2%; animation-delay: -2s; }
.star-c { width: 26px; top: 18%; left: 8%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-8px) rotate(8deg); } }

.content { padding-top: 12px; padding-bottom: 120px; }

/* Steps */
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 16px auto 24px; max-width: 640px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); position: relative; }
.steps li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: rgba(255, 255, 255, 0.9); margin-right: 4px; }
.steps span {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.8); font-weight: 700; font-size: 14px;
}
.steps b { font-weight: 600; white-space: nowrap; }
.steps button {
  font: inherit; color: inherit; background: none; border: 0; padding: 4px 6px 4px 0; margin: 0;
  display: flex; align-items: center; gap: 10px; border-radius: 999px; cursor: pointer;
}
.steps button:disabled { cursor: default; }
.steps button:not(:disabled):hover b { text-decoration: underline; text-underline-offset: 3px; }
.steps button:not(:disabled):hover span { box-shadow: 0 0 0 3px var(--pink-border); }
.steps li[aria-current="step"] { color: var(--text); }
.steps li[aria-current="step"] span { background: var(--pink); color: #fff; box-shadow: 0 4px 10px rgba(232, 71, 159, 0.3); }
.steps li.done span { background: var(--surface); color: var(--pink-dark); }
.steps li.done::after { background: var(--pink-border); }

.section-header { margin-bottom: 20px; }
.section-header p { color: var(--text-muted); margin: 0; }

/* Card */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 44px; max-width: 700px; margin: 0 auto; }
.illustration { display: block; width: 120px; height: auto; margin: 0 auto 16px; }
#screen-result h1, #screen-result > p { text-align: center; }

/* Coach cards */
.coaches { display: grid; gap: 20px; margin-bottom: 24px; }
.coach {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 2px solid transparent; transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.coach.open { border-color: var(--pink-border); box-shadow: var(--shadow-high); }
.coach-header { display: grid; grid-template-columns: 132px 1fr; gap: 24px; padding: 24px; }
.coach-photo {
  width: 132px; height: 132px; object-fit: cover; display: block;
  border-radius: var(--radius); background: var(--page-light);
}
.coach-info { display: grid; gap: 10px; align-content: start; min-width: 0; }
.coach-name-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.coach-role { font-size: 14px; font-weight: 600; color: var(--pink-dark); }
.coach-about { margin: 0; color: var(--text); font-size: 15px; line-height: 1.55; }
.labels { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.labels li { font-size: 13px; font-weight: 600; background: var(--page-light); color: var(--deep); border-radius: 999px; padding: 4px 12px; }
/* Placeholder until the coach's organisation supplies the real text. */
.labels li.placeholder { background: none; border: 1px dashed var(--text-muted); color: var(--text-muted); }
.quote.placeholder { color: var(--text-muted); font-style: italic; }
.quote {
  margin: 4px 0 0; padding: 12px 16px 12px 44px; position: relative;
  background: var(--pink-soft); border-radius: var(--radius-small); font-size: 15px; line-height: 1.5; color: var(--text);
}
.quote::before {
  content: "\201C"; position: absolute; left: 12px; top: 2px;
  font-size: 44px; line-height: 1; font-weight: 800; color: var(--pink);
}
.coach-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 4px; }
.coach-meta { font-size: 13px; color: var(--text-muted); display: grid; line-height: 1.45; }
.coach-meta b { color: var(--text); font-weight: 600; }
.toggle {
  font: 700 15px "Open Sans", sans-serif; color: var(--pink-dark); background: var(--pink-soft);
  border: 0; border-radius: var(--radius-small); padding: 11px 18px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: background 0.15s ease;
}
.toggle:hover { background: #fbd8ea; }
.toggle svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.4; fill: none; transition: transform 0.2s ease; }
.toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Week view with times */
.slot-picker { border-top: 1px solid var(--line); padding: 20px 24px 24px; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.week-nav strong { font-size: 15px; }
.arrow {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
}
.arrow:hover:not([disabled]) { border-color: var(--pink-border); }
.arrow[disabled] { opacity: 0.35; cursor: default; }
.arrow svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; fill: none; }
.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.day-column { display: grid; gap: 6px; align-content: start; }
.day-header { text-align: center; padding: 6px 0 8px; line-height: 1.25; }
.day-header b { display: block; font-size: 13px; text-transform: capitalize; }
.day-header small { font-size: 12px; color: var(--text-muted); }
.time-slot {
  font: 600 14px "Open Sans", sans-serif; color: var(--text); cursor: pointer; width: 100%;
  background: var(--field-bg); border: 2px solid var(--line); border-radius: var(--radius-mini); padding: 9px 4px;
  font-variant-numeric: tabular-nums; transition: border-color 0.15s ease, background 0.15s ease;
}
.time-slot:hover { border-color: var(--pink-border); }
.time-slot[aria-checked="true"] { border-color: var(--pink); background: var(--pink); color: #fff; }
/* The day of the chosen time gets a pink line under its header. */
.day-header { border-bottom: 3px solid transparent; border-radius: 2px; }
.day-column.selected .day-header { border-bottom-color: var(--pink); }
.day-column.selected .day-header b, .day-column.selected .day-header small { color: var(--pink-dark); }
.none { text-align: center; color: #a8b7c3; font-size: 14px; padding: 8px 0; }
.week-empty { font-size: 14px; color: var(--text-muted); margin: 12px 0 0; }

/* Fixed selection bar at the bottom */
.selection-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--surface); box-shadow: 0 -8px 30px rgba(28, 76, 110, 0.14);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.selection-bar-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.selection-bar img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-mini); flex: none; }
.selection-bar-text { flex: 1; display: grid; line-height: 1.35; min-width: 0; }
.selection-bar-text strong { font-size: 15px; }
.selection-bar-text span { font-size: 14px; color: var(--text-muted); }
.selection-bar .primary { padding: 13px 32px; }

/* Chosen coach above the form and summary */
.selection { display: flex; align-items: center; gap: 14px; background: var(--page-light); border-radius: var(--radius-small); padding: 12px 14px; margin-bottom: 24px; }
.selection img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-mini); flex: none; }
.selection span { display: grid; line-height: 1.4; }
.selection strong { font-size: 15px; }
.selection small { font-size: 14px; color: var(--text-muted); }
.selection-large { margin: 20px 0 0; }
.selection-large img { width: 64px; height: 64px; }

/* Form */
form { display: grid; gap: 16px; margin-top: 8px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
label { font-weight: 700; font-size: 14px; }
.optional { font-weight: 400; color: var(--text-muted); }
.field small { font-size: 13px; color: var(--text-muted); }
input[type="text"], input[type="email"], input[type="tel"] {
  font: inherit; color: var(--text); width: 100%;
  border: 2px solid var(--line); border-radius: var(--radius-small); background: var(--field-bg); padding: 12px 14px;
}
input:focus { border-color: var(--blue); outline: none; }
input[aria-invalid="true"] { border-color: var(--red); }

/* Buttons */
.buttons { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap-reverse; }
.buttons-center { justify-content: center; flex-wrap: wrap; }
.primary {
  font: 700 16px "Open Sans", sans-serif; border: 0; border-radius: var(--radius-small);
  padding: 15px 36px; cursor: pointer; display: inline-flex; justify-content: center;
  background: var(--pink); color: #fff; box-shadow: 0 4px 12px rgba(232, 71, 159, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.primary:hover:not([disabled]) { background: var(--pink-dark); transform: translateY(-1px); }
.primary[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.link-button { font: 600 15px "Open Sans", sans-serif; background: none; border: 0; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px 0; }

.notice { background: var(--surface); border-radius: var(--radius-small); padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.error { background: var(--red-soft); color: var(--red); border-radius: var(--radius-small); padding: 12px 16px; margin: 0; font-size: 14px; }

/* Review and result */
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 16px 0 20px; padding: 20px; border: 2px solid var(--line); border-radius: var(--radius-small); }
.summary dt { color: var(--text-muted); font-size: 14px; }
.summary dd { margin: 0; font-weight: 600; }
.terms h2 { font-size: 17px; margin-top: 4px; }
.terms ul { padding-left: 20px; margin: 0 0 20px; font-size: 15px; }
.terms li { margin-bottom: 6px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--pink); }
.secure { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 14px 0 0; }
.secure svg { width: 16px; height: 16px; stroke: var(--text-muted); stroke-width: 2; fill: none; }

.calendar-links { margin-top: 24px; text-align: center; }
.calendar-links-title { font-weight: 700; margin-bottom: 12px; }
.calendar-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.calendar-button {
  font-weight: 600; font-size: 14px; text-decoration: none; color: var(--pink-dark);
  background: var(--pink-soft); border-radius: var(--radius-small); padding: 10px 16px;
}
.calendar-button:hover { background: #fbd8ea; }

.spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--pink); border-radius: 50%; margin: 8px auto 20px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Test payment (development only): a deliberately different colour, so nobody mistakes it for Stripe. */
.test-banner { background: #faeed2; color: #8a5d12; font-weight: 700; text-align: center; padding: 10px 16px; font-size: 14px; }

.footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 24px; font-size: 13px; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.footer-link { font: inherit; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Cookie consent for Google Analytics */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); box-shadow: 0 -8px 30px rgba(28, 76, 110, 0.18);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.cookie-banner-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; flex: 1 1 360px; font-size: 14px; }
.cookie-banner strong { display: block; font-size: 15px; margin-bottom: 2px; }
.cookie-buttons { display: flex; align-items: center; gap: 16px; }
.cookie-buttons .primary { padding: 11px 24px; }
body.with-bar .footer { padding-bottom: 96px; }

@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
  .hero-image { order: -1; max-width: 340px; margin: 0 auto; }
  .lead { font-size: 17px; }
}

@media (max-width: 600px) {
  .card { padding: 28px 20px; }
  .row { grid-template-columns: 1fr; }
  .steps b { display: none; }
  .steps li[aria-current="step"] b { display: inline; }
  .coach-header { grid-template-columns: 76px 1fr; gap: 14px; padding: 18px; }
  .coach-photo { width: 76px; height: 76px; border-radius: var(--radius-small); }
  .coach-about, .labels, .quote, .coach-footer { grid-column: 1 / -1; }
  .coach-info { display: contents; }
  .coach-name-row { flex-direction: column; gap: 2px; align-self: center; }
  .toggle { width: 100%; justify-content: center; }
  .slot-picker { padding: 16px 12px 18px; }
  .week { gap: 4px; }
  .time-slot { font-size: 13px; padding: 9px 0; }
  .day-header b { font-size: 12px; }
  .buttons .primary { width: 100%; }
  .buttons { justify-content: center; }
  .secure { justify-content: center; }
  .summary { grid-template-columns: 1fr; gap: 2px; }
  .summary dd { margin-bottom: 10px; }
  .selection-bar .primary { padding: 13px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .spinner { animation: spin 2s linear infinite !important; }
}

/* A message under one form field */
.field-error { color: var(--red); font-weight: 600; }

/* Suggestion for a typo in the email address: a hint, never a block */
.suggestion { color: var(--text); }
.suggestion .link-button { font-size: 13px; padding: 0; color: var(--blue); font-weight: 700; }

/* "Je afspraak" */
.secondary {
  font: 700 16px "Open Sans", sans-serif; border: 0; border-radius: var(--radius-small);
  padding: 15px 30px; cursor: pointer; background: var(--pink-soft); color: var(--pink-dark);
}
.secondary:hover { background: #fbd8ea; }
.danger {
  font: 700 16px "Open Sans", sans-serif; border: 0; border-radius: var(--radius-small);
  padding: 15px 30px; cursor: pointer; background: var(--red); color: #fff;
}
.danger:hover { background: #962f2f; }
.danger[disabled], .primary[disabled] { opacity: 0.45; cursor: not-allowed; }
.manage-link { text-align: center; margin: 24px 0 0; }
.manage-link .primary { text-decoration: none; }
#screen-manage > h1, #screen-manage > p { text-align: center; }
.manage-step { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.manage-step h2 { font-size: 19px; }
#manage-picker .slot-picker { border-top: 0; padding: 8px 0 0; }

