/* Booking pages. Colours and type come from main.css */

.booking-help { margin-left: auto; color: var(--navy); text-decoration: none; font-size: var(--step--1); }
.booking-help strong { white-space: nowrap; }
@media (max-width: 520px) { .booking-help__q { display: none; } .booking-help { font-size: var(--step-0); } }

.booking { background: var(--concrete); padding-block: clamp(2rem, 5vw, 3.5rem) var(--section); }
.booking__inner { max-width: 44rem; }
.booking h1 { font-size: var(--step-3); margin-bottom: 0.3em; }
.booking__intro { color: var(--steel); margin-bottom: 2rem; }

/* Each numbered step sits on a white panel */
.b-step { background: var(--white); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); margin-bottom: 1rem; }
.b-step h2 { font-size: var(--step-2); display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1.25rem; }
.b-step__num { color: var(--blue); }
.b-step fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.b-label { display: block; font-weight: 600; margin: 1.25rem 0 0.4rem; padding: 0; }
.b-step > .b-label:first-of-type, .b-step fieldset:first-of-type > .b-label { margin-top: 0; }
.b-hint { margin: 0.35rem 0 0; font-size: var(--step--1); color: var(--steel); }
.b-error { margin: 0.35rem 0 0; font-size: var(--step--1); font-weight: 600; color: #B42318; min-height: 0; }
.b-error:empty { display: none; }
.b-error--form { margin-top: 0.75rem; }
.b-loading { color: var(--steel); margin: 0; }

.b-input {
  width: 100%; font: inherit; color: var(--navy);
  padding: 0.75rem 0.9rem; min-height: 3rem;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.b-input:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.b-input[aria-invalid="true"], .plate[aria-invalid="true"] { border-color: #B42318; }

.plate--form { width: 100%; max-width: 20rem; display: block; }
.plate--form:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Radio rows: test type and payment */
.b-options { display: grid; gap: 0.6rem; margin-top: 1.5rem; }
.b-option {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.25rem 0.9rem; align-items: center;
  padding: 0.9rem 1rem; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.b-option:hover { border-color: #AEB8CC; }
.b-option:has(input:checked) { border-color: var(--blue); background: #F2F5FD; }
.b-option input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--blue); }
.b-option__main { display: grid; }
.b-option__title { font-weight: 600; }
.b-option__desc { font-size: var(--step--1); color: var(--steel); }
.b-option__price { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: var(--step-1); font-variant-numeric: tabular-nums; }

/* Day strip: scrolls sideways on phones */
.date-strip { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.25rem 0.1rem 0.6rem; scroll-snap-type: x proximity; }
.date-pill { position: relative; flex: 0 0 auto; scroll-snap-align: start; }
.date-pill input, .time-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.date-pill span {
  display: grid; justify-items: center; min-width: 4.25rem; padding: 0.55rem 0.5rem;
  border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; line-height: 1.25;
}
.date-pill b { font-weight: 600; }
.date-pill small { font-size: var(--step--1); color: var(--steel); }
.date-pill input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.date-pill input:checked + span small { color: #C9D2E8; }
.date-pill input:focus-visible + span, .time-pill input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.times-fieldset { margin-top: 0.5rem !important; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.5rem; }
.time-pill { position: relative; }
.time-pill span {
  display: block; text-align: center; padding: 0.65rem 0.25rem; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius); font-variant-numeric: tabular-nums;
}
.time-pill span:hover, .date-pill span:hover { border-color: #AEB8CC; }
.time-pill input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); font-weight: 600; }

/* Summary and payment button */
.b-summary { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); margin-top: 1.5rem; }
.b-summary__line { font-size: var(--step-1); line-height: 1.45; margin-bottom: 0.75rem; }
.b-summary__small { font-size: var(--step--1); color: #C9D2E8; }
.b-summary .b-error { color: var(--yellow); }
.b-submit { width: 100%; margin: 0.5rem 0 0.75rem; }
.b-submit[disabled] { background: #3A4A75; border-color: #3A4A75; color: #C9D2E8; cursor: not-allowed; }

/* Result pages (confirmed / cancelled) */
.result { background: var(--white); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); }
.result dl { margin: 0 0 1.5rem; }
.result dl div { display: grid; grid-template-columns: minmax(8rem, 40%) 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.result dt { color: var(--steel); }
.result dd { margin: 0; font-weight: 600; }
.result__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.site-footer--slim { padding-block: 1.5rem; }
.site-footer--slim p { max-width: none; margin-bottom: 0.3rem; }

/* Opt-in checkboxes */
.b-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: start; margin-top: 1.25rem; cursor: pointer; }
.b-check input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--blue); }
.b-check small { display: block; font-size: var(--step--1); color: var(--steel); }

/* Manage your booking */
.m-card { margin-bottom: 1rem; }
.m-card dl { margin-bottom: 1rem; }
.m-cal { margin: 0; color: var(--steel); }
.m-cal a { font-weight: 600; }
.m-section h2 { margin-bottom: 1rem; }
.m-note { color: var(--steel); margin: 0 0 1rem; }
.m-wide { width: 100%; margin-top: 1rem; }
.m-confirm { margin-top: 0.5rem; padding: 1rem; border: 2px solid #F3C1BC; background: #FEF3F2; border-radius: var(--radius); }
.m-confirm p { margin-bottom: 0.75rem; }
.m-btn-danger { background: #B42318; border-color: #B42318; color: var(--white); }
.m-btn-danger:hover { background: #912018; border-color: #912018; color: var(--white); }

/* MOT status from the DVSA, under the registration */
.b-mot { margin: 0.75rem 0 0; padding: 0.7rem 0.9rem; font-size: var(--step--1); line-height: 1.5; color: var(--steel); background: var(--concrete); border-left: 4px solid var(--line); border-radius: var(--radius); animation: rise 0.35s ease both; }
.b-mot p { margin: 0; max-width: none; }
.b-mot__head { color: var(--navy); }
.b-mot--valid { border-left-color: #1E7A34; }
.b-mot--valid strong { color: #1E7A34; }
.b-mot--expired { border-left-color: #B42318; }
.b-mot--expired strong { color: #B42318; }
.b-mot__tip { margin-top: 0.35rem !important; }

/* Feedback when choosing a day, a time or an option */
.date-pill span, .time-pill span, .b-option { transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
.date-pill input:checked + span, .time-pill input:checked + span { animation: pop 0.25s ease; }
.date-pill span:active, .time-pill span:active, .b-option:active { transform: scale(0.97); }
.b-step { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.b-step:nth-of-type(2) { animation-delay: 0.06s; }
.b-step:nth-of-type(3) { animation-delay: 0.12s; }
.b-step:nth-of-type(4) { animation-delay: 0.18s; }
.b-summary__line { transition: color 0.2s ease; }

/* Months above the days, now that bookings go up to a year ahead */
.month-tabs { display: flex; gap: 0.4rem; overflow-x: auto; margin: 0 0 0.6rem; padding: 0.15rem 0.1rem 0.35rem; scrollbar-width: none; }
.month-tabs::-webkit-scrollbar { display: none; }
.month-tab {
  flex: 0 0 auto; padding: 0.45rem 0.85rem; border: 2px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--navy); font: 600 var(--step--1)/1.1 var(--font-body); cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.month-tab:hover { border-color: #AEB8CC; }
.month-tab[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.month-tab:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
