/*
 * Visitor app on top of base.css: one column, one step per screen,
 * mobile-first (spec §8). No menu, no side bars; the logo sits on top.
 */
@import url('/assets/base.css');

body { background: #fff; }
.app { max-width: 38rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.app-logo { display: block; width: 9rem; height: auto; margin: 0 auto 1.5rem; }

/* Stepper: four numbered dots joined by a line; done steps get a check and link back. */
/* Same space above (under the logo) as below (above the heading). */
.stepper { margin: 1.75rem 0; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: flex; }
.stepper li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; min-width: 0; }
.stepper li + li::before {
  content: ''; position: absolute; top: 1rem; right: calc(50% + 1.25rem); left: calc(-50% + 1.25rem);
  height: 2px; background: var(--line);
}
.stepper li.done + li::before, .stepper li.done + li.current::before { background: var(--green-900); }
.stepper .dot {
  width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); color: var(--muted); background: #fff; font-weight: 700; font-size: .9rem; position: relative; z-index: 1;
}
.stepper .label { font-size: .85rem; color: var(--muted); }
.stepper li.current .dot { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.stepper li.current .label { color: var(--green-900); font-weight: 700; }
.stepper li.done .dot { border-color: var(--green-900); color: transparent; }
.stepper li.done .dot::after {
  content: ''; position: absolute; width: .4rem; height: .75rem; border-right: 2px solid var(--green-900); border-bottom: 2px solid var(--green-900);
  transform: translateY(-.1rem) rotate(45deg);
}
.stepper li.done .label { color: var(--green-900); }
.stepper button { all: unset; display: flex; flex-direction: column; align-items: center; gap: .35rem; cursor: pointer; }
.stepper button:hover .label { text-decoration: underline; }
.stepper button:focus-visible { outline: 2px solid var(--green-900); outline-offset: 3px; }
/* Phone: only the current step keeps its label. */
@media (max-width: 30rem) { .stepper li:not(.current) .label { display: none; } }
h1 { color: var(--green-900); font-size: 1.75rem; line-height: 1.25; font-weight: var(--strong); margin: 0 0 1rem; }
h2 { color: var(--green-800); font-size: 1.1rem; font-weight: 700; margin: 0 0 .75rem; }
.lead { white-space: pre-line; margin: 0 0 1.5rem; }
.note { white-space: pre-line; }

/* Fields: label above the control. */
.app .field { margin-bottom: 1.1rem; }
.app .field > label { font-weight: var(--strong); }
.app .field .hint { margin-top: .3rem; }
.app .field .field-error { color: var(--error); font-size: .9rem; margin: .3rem 0 0; }
.app .field.invalid input, .app .field.invalid textarea, .app .field.invalid .dropdown-toggle { border-color: var(--error); background: var(--error-bg); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: 0 .75rem; }
.pair.postcode { grid-template-columns: 7rem minmax(0, 1fr); }
@media (max-width: 24rem) { .pair { grid-template-columns: 1fr; } }

/* Field groups as sections with a line above. */
.group { border: 0; padding: 1.25rem 0 0; margin: 1.25rem 0 0; border-top: 1px solid var(--green-100); min-width: 0; }
.group:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.group > legend { float: left; width: 100%; color: var(--green-800); font-weight: 700; font-size: 1.1rem; padding: 0 0 .75rem; }
.group > legend + * { clear: both; }

/* Choice cards: particulier / zakelijk. */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.1rem; }
.choice-card { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--field); padding: .8rem 1rem; cursor: pointer; margin: 0; }
.choice-card:has(input:checked) { border-color: var(--green-900); background: var(--green-50); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--green-900); }
.check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; margin: 0 0 1.1rem; }
.check input { margin-top: .15rem; flex: none; }

/* Actions at the bottom of each step: back as a text link on the left, the
   main button on the right. On a phone the main button spans the width and
   the back link sits centred under it. */
.actions-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--green-100); }
.actions-row > :only-child.back { margin-right: auto; }
.actions-row > :only-child:not(.back) { margin-left: auto; }
.actions-row button[type=submit], .actions-row .primary { padding: .85rem 1.5rem; }
.actions-row .back { padding: .5rem 0; display: inline-flex; align-items: center; gap: .45rem; }
/* Arrow to the left, drawn in CSS (no icon font, no text symbol). */
.actions-row .back::before {
  content: ''; flex: none; width: .45rem; height: .45rem;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
@media (max-width: 34rem) {
  .actions-row { flex-direction: column-reverse; align-items: stretch; gap: .5rem; }
  .actions-row button[type=submit], .actions-row .primary { width: 100%; }
  .actions-row .back { align-self: center; }
}

.box { border: 1px solid var(--green-100); background: var(--green-50); padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.box.warn { border-color: #f1d6d3; background: var(--error-bg); }
.box > :last-child { margin-bottom: 0; }
.phone { font-weight: 700; color: var(--green-900); white-space: nowrap; }
.app .error:empty { min-height: 0; margin: 0; }

/* Step 3: one line per day, the date left and a button per slot right;
   no calendar widget, no dropdown. */
.day-list { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid var(--green-100); }
.day-list li { display: flex; align-items: center; gap: .75rem; padding: .55rem .5rem; border-bottom: 1px solid var(--green-100); }
.day-list li:hover { background: var(--green-50); }
.day-name { flex: 1; min-width: 0; }
/* Phone: the date on its own line, the two buttons side by side under it. */
@media (max-width: 30rem) {
  .day-list li { flex-wrap: wrap; gap: .4rem .5rem; }
  .day-name { flex-basis: 100%; }
  .day-slots { width: 100%; }
  .day-slots .slot-button { flex: 1; min-width: 0; }
}
.day-slots { display: flex; gap: .5rem; flex: none; }
.slot-button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 7.5rem; min-height: 3.1rem;
  padding: .45rem .75rem; background: #fff; color: var(--green-900); border: 2px solid var(--green-900);
  text-transform: none; letter-spacing: 0; font-size: 1.15rem; line-height: 1.2; white-space: nowrap;
}
.slot-button:hover { background: var(--green-50); border-color: var(--green-900); }
.slot-button small { font-size: .75rem; font-weight: 400; white-space: nowrap; }
.slot-button small:empty { display: none; }
.slot-button[aria-pressed='true'] { background: var(--green-900); color: #fff; }
.slot-button:disabled { border-color: var(--line); color: var(--muted); background: #f6f6f6; opacity: 1; cursor: not-allowed; }

/* Step 4: summary */
.summary { border: 1px solid var(--green-100); margin: 0 0 1.5rem; }
.summary > div { padding: .9rem 1.1rem; border-bottom: 1px solid var(--green-100); }
.summary > div:last-child { border-bottom: 0; }
.summary h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 400; margin: 0 0 .3rem; }
.summary p { margin: 0; white-space: pre-line; }
.summary .when { font-size: 1.15rem; color: var(--green-900); font-weight: var(--strong); }
