/* MDS Online Booking. Copyright (c) D3V Services Limited. */

.mdsb {
  --ink: #162b45;
  --ink-soft: #4a5d74;
  --blue: #179bd2;
  --blue-deep: #0f7bab;
  --blue-wash: #e8f5fb;
  --amber: #f2a900;
  --amber-wash: #fff6dc;
  --ground: #f9f9f9;
  --line: #dde3ea;
  --text: #505050;
  --card-shadow: 0 0 4px 4px rgba(34, 34, 34, .07);
  --paper: #ffffff;
  --danger: #b4322b;
  --ok: #1f8a4c;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: Lato, "Helvetica Neue", Arial, sans-serif;
  --display: Futura, "Trebuchet MS", Arial, sans-serif;

  /* Matches driveschool.co.nz: Lato body, Futura uppercase display headings. */
  font-family: var(--font);
  color: var(--text);
  max-width: 1180px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.mdsb *, .mdsb *::before, .mdsb *::after { box-sizing: border-box; }
:where(.mdsb) :is(button, input, select, textarea) { font: inherit; color: inherit; }
.mdsb :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mdsb [tabindex="-1"]:focus { outline: none; }
.mdsb-boot { padding: 48px 0; color: var(--ink-soft); text-align: center; }
.mdsb [hidden] { display: none !important; }

/* ---------- Stepper ---------- */
.mdsb-steps { display: flex; gap: 0; margin: 0 0 28px; padding: 0; list-style: none; position: relative; }
.mdsb-steps::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; background: var(--blue);
  width: var(--progress, 0%); transition: width .5s var(--ease);
}
.mdsb-steps li {
  flex: 1; padding: 0 0 12px; border-bottom: 3px solid var(--line); color: var(--ink-soft);
  font-size: 14px; text-transform: uppercase; font-weight: 700; display: flex; gap: 8px; align-items: baseline;
}
.mdsb-steps li b { font-size: 13px; font-weight: 700; color: #b8c3cf; transition: color .3s; }
.mdsb-steps li[aria-current="step"] { color: var(--ink); }
.mdsb-steps li[aria-current="step"] b, .mdsb-steps li.is-done b { color: var(--blue); }

/* ---------- Step panes ---------- */
.mdsb-pane { animation: mdsb-in .45s var(--ease) both; }
.mdsb-pane.is-back { animation-name: mdsb-in-back; }
@keyframes mdsb-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes mdsb-in-back { from { opacity: 0; transform: translateX(-24px); } }
.mdsb h2 { font-family: var(--display); font-size: 38px; line-height: 1.15; margin: 0 0 8px; font-weight: 700; text-transform: uppercase; color: var(--ink); }
/* Card titles as on the course pages: Lato bold uppercase with the blue bar. */
.mdsb h3 { font-family: var(--font); font-size: 20px; line-height: 1.2; margin: 0 0 14px; font-weight: 700; text-transform: uppercase; color: var(--ink); border-left: 6px solid var(--blue); padding-left: 14px; }
.mdsb-summary h3, .mdsb-side-head h3 { border-left: 0; padding-left: 0; }
.mdsb-lede { margin: 0 0 24px; color: var(--text); max-width: 62ch; }

/* ---------- Filters ---------- */
.mdsb-filters { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-bottom: 18px; }
.mdsb-branches { display: flex; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; background: var(--paper); }
.mdsb-branches button {
  flex: 1 1 auto; border: 0; background: none; padding: 11px 14px; cursor: pointer; font-size: 15px; white-space: nowrap;
  border-right: 2px solid var(--ink); transition: background .2s, color .2s; font-weight: 700; text-transform: uppercase; font-size: 14px; color: var(--ink);
}
.mdsb-branches button:hover { background: var(--ground); }
.mdsb-branches button:last-child { border-right: 0; }
.mdsb-branches button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mdsb-select, .mdsb input[type=text], .mdsb input[type=email], .mdsb input[type=tel], .mdsb input[type=date], .mdsb textarea {
  width: 100%; border: 1px solid #c9d2dc; border-radius: 3px; padding: 11px 12px; background: var(--paper); color: var(--ink); margin: 0;
  transition: border-color .2s, box-shadow .2s;
}
.mdsb-select:focus, .mdsb input:focus, .mdsb textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); outline: none; }

/* ---------- Calendar ---------- */
.mdsb-board { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.mdsb-cal { background: var(--paper); border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); }
.mdsb-cal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mdsb-cal-title { font-family: var(--display); font-size: 24px; font-weight: 700; text-transform: uppercase; color: var(--ink); min-width: 10ch; }
.mdsb-cal-title span { color: var(--blue); }
.mdsb-nav { display: flex; gap: 6px; }
.mdsb-nav button {
  width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 3px; background: var(--paper); color: var(--ink);
  cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .15s;
}
.mdsb-nav button:hover:not(:disabled) { background: var(--ground); }
.mdsb-nav button:active:not(:disabled) { transform: scale(.94); }
.mdsb-nav button:disabled { opacity: .35; cursor: default; }
.mdsb-nav svg { width: 18px; height: 18px; }

.mdsb-dow, .mdsb-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mdsb-dow div { padding: 8px 0; text-align: center; font-size: 13px; font-weight: 700; text-transform: uppercase; color: #fff; background: var(--ink); }
.mdsb-viewport { position: relative; overflow: hidden; }
.mdsb-grid { transition: transform .45s var(--ease), opacity .45s var(--ease); }
.mdsb-grid.is-leaving-next { transform: translateX(-8%); opacity: 0; }
.mdsb-grid.is-leaving-prev { transform: translateX(8%); opacity: 0; }
.mdsb-grid.is-entering-next { transform: translateX(8%); opacity: 0; transition: none; }
.mdsb-grid.is-entering-prev { transform: translateX(-8%); opacity: 0; transition: none; }
.mdsb-grid.is-loading .mdsb-day { color: var(--line); }

.mdsb-day {
  min-height: 92px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 6px 6px 8px; background: var(--paper); text-align: left; cursor: default; position: relative;
  display: flex; flex-direction: column; gap: 3px; border-top: 0; border-left: 0; border-radius: 0;
}
.mdsb-day:nth-child(6n) { border-right: 0; }
.mdsb-day.is-out { background: var(--ground); }
.mdsb-day.is-out .mdsb-num { color: #b3bdc8; }
.mdsb-day .mdsb-num { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1; padding: 4px 4px 2px; font-variant-numeric: tabular-nums; }
.mdsb-day.is-today .mdsb-num { color: var(--blue); }
.mdsb-day.is-today .mdsb-num::after { content: ""; display: block; width: 14px; height: 2px; background: var(--blue); margin-top: 3px; }
.mdsb-day.has-sessions { cursor: pointer; transition: background .2s; }
.mdsb-day.has-sessions:hover { background: var(--blue-wash); }
.mdsb-day[aria-pressed="true"] { background: var(--blue-wash); box-shadow: inset 0 0 0 2px var(--blue); }
.mdsb-tick {
  display: block; font-size: 11.5px; line-height: 1.25; padding: 2px 5px; border-left: 3px solid var(--c, var(--blue));
  background: color-mix(in srgb, var(--c, var(--blue)) 12%, white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: mdsb-tick .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms);
}
.mdsb-tick.is-full { opacity: .45; text-decoration: line-through; }
.mdsb-more { font-size: 11.5px; color: var(--ink-soft); padding-left: 5px; }
@keyframes mdsb-tick { from { opacity: 0; transform: translateY(4px); } }

/* ---------- Day panel (sessions) ---------- */
.mdsb-side { position: sticky; top: 100px; }
.mdsb-side-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.mdsb-side-head h3 { margin: 0; }
.mdsb-link { background: none; border: 0; color: var(--blue-deep); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.mdsb-sessions { display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow: auto; padding: 2px; }
.mdsb-empty { padding: 28px 20px; background: var(--ground); border-radius: 10px; color: var(--ink-soft); text-align: center; }

.mdsb-session {
  border-left: 6px solid var(--c, var(--blue)); border-radius: 10px; background: var(--ground); box-shadow: var(--card-shadow);
  padding: 16px 16px 14px; margin: 4px; display: grid; gap: 8px; animation: mdsb-rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms);
}
@keyframes mdsb-rise { from { opacity: 0; transform: translateY(10px); } }
.mdsb-session-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.mdsb-session-name { font-weight: 700; font-size: 16px; line-height: 1.25; text-transform: uppercase; color: var(--ink); }
.mdsb-session-meta { font-size: 14px; color: var(--ink-soft); }
.mdsb-price { font-weight: 700; font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.mdsb-price small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-soft); text-align: right; }
.mdsb-session .mdsb-btn { justify-self: start; }

/* The seat map: one block per seat. Taken seats are solid, free ones open. */
.mdsb-seats { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.mdsb-seat {
  width: 12px; height: 14px; border-radius: 3px 3px 2px 2px; border: 1.5px solid var(--ink); background: var(--ink);
  transition: background .3s var(--ease), border-color .3s, transform .3s var(--ease);
}
.mdsb-seat.is-free { background: transparent; border-color: var(--blue); }
.mdsb-seat.is-yours { background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.mdsb-seats-label { font-size: 13px; color: var(--ink-soft); margin-left: 6px; }
.mdsb-seats.is-low .mdsb-seat.is-free { border-color: var(--amber); }
.mdsb-seats.is-low .mdsb-seats-label { color: #8a6100; font-weight: 600; }
.mdsb-seats .mdsb-seat { animation: mdsb-seat .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
.mdsb-seats-dark .mdsb-seat { background: #6d819a; border-color: #6d819a; }
.mdsb-seats-dark .mdsb-seat.is-free { background: transparent; border-color: #8fd3f0; }
.mdsb-seats-dark .mdsb-seat.is-yours { background: var(--blue); border-color: #8fd3f0; }
.mdsb-seats-dark .mdsb-seats-label { color: #c9d6e5; }
.mdsb-seats-dark.is-low .mdsb-seats-label { color: var(--amber); }
@keyframes mdsb-seat { from { opacity: 0; transform: scale(.4); } }

/* ---------- Buttons ---------- */
.mdsb-btn {
  border: 2px solid var(--ink); border-radius: 3px; padding: 10px 20px; font-weight: 700; text-transform: uppercase; line-height: 1.4; cursor: pointer; background: var(--ink); color: #fff;
  transition: background .2s, transform .15s, box-shadow .2s; display: inline-flex; gap: 8px; align-items: center; justify-content: center;
  text-decoration: none; font-size: 16px;
}
.mdsb-btn:hover:not(:disabled) { background: var(--blue); border-color: var(--blue); color: #fff; }
.mdsb-btn:active:not(:disabled) { transform: translateY(1px); }
.mdsb-btn:disabled { background: #b9c6d3; border-color: #b9c6d3; cursor: not-allowed; }
.mdsb-btn.is-ghost { background: transparent; color: var(--ink); }
.mdsb-btn.is-ghost:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: #fff; }
.mdsb-btn.is-small { padding: 6px 16px; font-size: 14px; }
.mdsb-btn.is-busy { position: relative; color: transparent !important; }
.mdsb-btn.is-busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid #fff; border-right-color: transparent;
  border-radius: 50%; animation: mdsb-spin .7s linear infinite;
}
.mdsb-btn.is-ghost.is-busy::after { border-color: var(--ink); border-right-color: transparent; }
@keyframes mdsb-spin { to { transform: rotate(360deg); } }
.mdsb-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- Wizard layout ---------- */
.mdsb-wizard { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.mdsb-summary { position: sticky; top: 100px; background: var(--ink); color: #fff; border-radius: 10px; padding: 24px; }
.mdsb-summary h3 { color: #fff; font-family: var(--display); font-size: 20px; }
.mdsb-summary .mdsb-total span { text-transform: uppercase; font-weight: 700; font-size: 13px; color: #a9bad0; }
.mdsb-summary .mdsb-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.15); font-size: 15px; }
.mdsb-summary .mdsb-line span:first-child small { display: block; color: #a9bad0; font-size: 13px; }
.mdsb-summary .mdsb-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font-size: 15px; }
.mdsb-summary .mdsb-total strong { font-size: 28px; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.mdsb-summary .mdsb-total strong.is-updating { opacity: .4; }
.mdsb-summary .mdsb-note { color: #a9bad0; font-size: 13px; margin: 10px 0 0; }

.mdsb-block { border-radius: 10px; padding: 28px; margin-bottom: 18px; background: var(--ground); box-shadow: var(--card-shadow); }
.mdsb-choice {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 3px; cursor: pointer; transition: border-color .2s, background .2s; margin-bottom: 8px; background: var(--paper);
}
.mdsb-choice:hover { border-color: var(--blue); }
.mdsb-choice:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.mdsb-choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.mdsb-choice input { width: 20px; height: 20px; accent-color: var(--blue); margin: 0; }
.mdsb-choice-title { font-weight: 700; color: var(--ink); }
.mdsb-choice-sub { font-size: 14px; color: var(--ink-soft); }

.mdsb-who { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.mdsb-who label {
  border: 2px solid var(--line); border-radius: 10px; padding: 18px; cursor: pointer; display: grid; gap: 4px; background: var(--ground); transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.mdsb-who label:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.mdsb-who input { position: absolute; opacity: 0; pointer-events: none; }
.mdsb-who strong { font-size: 17px; text-transform: uppercase; color: var(--ink); }
.mdsb-who span { font-size: 14px; color: var(--ink-soft); }

.mdsb-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.mdsb-field { display: grid; gap: 5px; }
.mdsb-field.is-wide { grid-column: 1 / -1; }
.mdsb-field label { font-size: 14px; font-weight: 700; color: var(--ink); }
.mdsb-field label small { font-weight: 400; color: var(--ink-soft); }
.mdsb-field.has-error input { border-color: var(--danger); }
.mdsb-field .mdsb-err { color: var(--danger); font-size: 13px; }

.mdsb-student { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; animation: mdsb-rise .35s var(--ease) both; }
.mdsb-student-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mdsb-student-head strong { font-size: 15px; text-transform: uppercase; color: var(--ink); }
.mdsb-student .mdsb-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.mdsb-alert { padding: 12px 14px; border-radius: 3px; margin: 0 0 16px; font-size: 15px; border-left: 4px solid; }
.mdsb-alert.is-error { background: #fbeceb; border-color: var(--danger); color: #6e1a15; }
.mdsb-alert.is-info { background: var(--blue-wash); border-color: var(--blue); }
.mdsb-alert.is-warn { background: var(--amber-wash); border-color: var(--amber); color: #5c4300; }
.mdsb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.mdsb-check { display: flex; gap: 10px; align-items: start; font-size: 15px; }
.mdsb-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); flex: none; }

/* ---------- Done ---------- */
.mdsb-done-head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-bottom: 28px; }
.mdsb-tickmark { width: 64px; height: 64px; }
.mdsb-tickmark circle { fill: none; stroke: var(--ok); stroke-width: 3; stroke-dasharray: 190; stroke-dashoffset: 190; animation: mdsb-draw .6s var(--ease) forwards; }
.mdsb-tickmark path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: mdsb-draw .4s .45s var(--ease) forwards; }
@keyframes mdsb-draw { to { stroke-dashoffset: 0; } }
.mdsb-ref { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .04em; color: var(--ink); }

.mdsb-licence { border-radius: 10px; padding: 28px; margin-bottom: 18px; background: var(--ground); box-shadow: var(--card-shadow); }
.mdsb-licence-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.mdsb-licence-head strong { font-size: 18px; text-transform: uppercase; color: var(--ink); }
.mdsb-licence-state { font-size: 14px; color: var(--ink-soft); }
.mdsb-licence-state.is-ok { color: var(--ok); font-weight: 600; }
.mdsb-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.mdsb-tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--ink-soft); font-size: 15px; }
.mdsb-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue); font-weight: 600; }
.mdsb-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; max-width: 560px; }
.mdsb-shot {
  position: relative; aspect-ratio: 85.6 / 54; border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center;
  text-align: center; cursor: pointer; overflow: hidden; background: var(--paper); transition: border-color .2s, background .2s; padding: 8px;
}
.mdsb-shot:hover { border-color: var(--blue); background: var(--blue-wash); }
.mdsb-shot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mdsb-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: mdsb-in .35s var(--ease) both; }
.mdsb-shot span { font-size: 14px; color: var(--ink-soft); pointer-events: none; }
.mdsb-shot svg { width: 30px; height: 30px; display: block; margin: 0 auto 6px; color: var(--blue); }
.mdsb-shot.has-image { border-style: solid; border-color: var(--ok); }

/* Licence step after booking: big enough to find. Upload, text a link or do it later read as three clear choices. */
.mdsb-licence-intro { margin: 32px 0 22px; padding: 24px 28px; border-radius: 10px; background: var(--blue-wash); border: 2px solid var(--blue); }
.mdsb .mdsb-licence-intro h3 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 12px; }
.mdsb-licence-intro p { margin: 0; font-size: 19px; line-height: 1.5; color: var(--ink); max-width: 62ch; }
.mdsb-licence-head strong { font-size: 22px; }
.mdsb-licence-state { font-size: 17px; }
.mdsb-licence .mdsb-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border: 0; margin-bottom: 20px; }
.mdsb-licence .mdsb-tabs button { padding: 16px 10px; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; }
.mdsb-licence .mdsb-tabs button:hover { background: var(--blue-wash); }
.mdsb-licence .mdsb-tabs button[aria-selected="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.mdsb-licence .mdsb-lede { font-size: 18px; }
.mdsb-licence .mdsb-shot span { font-size: 18px; font-weight: 700; color: var(--ink); }
.mdsb-licence .mdsb-shot small { font-size: 15px; font-weight: 400; }
@media (max-width: 560px) {
  .mdsb-licence-intro { padding: 20px; }
  .mdsb-licence-intro p { font-size: 18px; }
  .mdsb-licence .mdsb-tabs { grid-template-columns: 1fr; }
  .mdsb-licence .mdsb-shots { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .mdsb-board, .mdsb-wizard { grid-template-columns: 1fr; }
  .mdsb-side, .mdsb-summary { position: static; }
  .mdsb-summary { order: -1; }
}
@media (max-width: 640px) {
  .mdsb h2 { font-size: 28px; }
  .mdsb-block, .mdsb-licence { padding: 20px; }
  .mdsb-filters, .mdsb-who, .mdsb-fields, .mdsb-student .mdsb-fields, .mdsb-shots { grid-template-columns: 1fr; }
  .mdsb-steps li { font-size: 0; }
  .mdsb-steps li b { font-size: 13px; }
  .mdsb-steps li[aria-current="step"] { font-size: 13px; }
  .mdsb-day { min-height: 52px; padding: 4px 2px; align-items: center; }
  .mdsb-day .mdsb-tick, .mdsb-more { display: none; }
  .mdsb-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
  .mdsb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--blue)); }
  .mdsb-cal-title { font-size: 18px; }
  .mdsb-sessions { max-height: none; }
}
@media (min-width: 641px) { .mdsb-dots { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .mdsb *, .mdsb *::before, .mdsb *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ---------- Page hero, matching the site's course pages ---------- */
.mdsb-hero {
  position: relative; width: 100vw; margin-left: calc(50% - 50vw); min-height: 290px; display: flex; align-items: center;
  overflow: hidden; background: #162b45; color: #fff;
}
.mdsb-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; margin: 0; max-width: none; }
.mdsb-hero::after { content: ""; position: absolute; inset: 0; background: #162b4599; }
.mdsb-hero-in { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 60px 20px; }
.mdsb-hero h1 {
  font-family: Futura, "Trebuchet MS", Arial, sans-serif; font-weight: 700; text-transform: uppercase; color: #fff;
  font-size: clamp(34px, 5vw, 50px); line-height: 1.15; margin: 0 0 10px;
}
.mdsb-crumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-family: Futura, "Trebuchet MS", Arial, sans-serif; text-transform: uppercase; font-size: 15px; }
.mdsb-crumbs li { display: flex; gap: 8px; align-items: center; margin: 0; }
.mdsb-crumbs a { color: #fff; text-decoration: none; }
.mdsb-crumbs a:hover { color: #179bd2; }
.mdsb-crumbs span { color: #179bd2; }
.mdsb-section { padding: 80px 20px; }
.mdsb-setup { max-width: 1180px; margin: 40px auto; padding: 0 20px; }
@media (max-width: 640px) { .mdsb-section { padding: 40px 16px; } .mdsb-hero { min-height: 200px; } }

/* Organisation ID: find box, then the found organisation */
.mdsb-org { background: var(--blue-wash); box-shadow: inset 0 0 0 2px var(--blue), var(--card-shadow); }
.mdsb-org-lede { margin: 0 0 16px; font-size: 17px; font-weight: 600; color: var(--ink); }
.mdsb-org-find { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.mdsb-org-find .mdsb-field { flex: 1 1 240px; margin: 0; }
.mdsb-org-find label { font-weight: 700; }
.mdsb .mdsb-org-find input { text-transform: uppercase; letter-spacing: .12em; font-family: ui-monospace, Consolas, monospace; font-size: 20px; font-weight: 700; padding-top: 12px; padding-bottom: 12px; background: #fff; border-width: 2px; }
.mdsb .mdsb-org-find input::placeholder { color: #9fb0c2; font-weight: 600; }
.mdsb-org-find .mdsb-btn { padding-top: 14px; padding-bottom: 14px; }
.mdsb-org.is-found { background: var(--ground); box-shadow: var(--card-shadow); border-left: 6px solid var(--blue); }
.mdsb-org h3 { margin-bottom: 14px; }
.mdsb-org-mode { margin-bottom: 18px; }
.mdsb-org-mode + .mdsb-err { display: block; margin: -8px 0 14px; }
.mdsb-org-help { margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); }
.mdsb-org-help a { color: var(--blue-deep); font-weight: 700; }
.mdsb-org-code { display: inline-block; margin-top: 6px; font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 16px; letter-spacing: .12em; color: var(--blue-deep); }
.mdsb-org-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }

/* Manage my bookings */
.mdsb-alert.is-ok { background: #e9f6ee; border-color: var(--ok); color: #14532d; }
.mdsb-account .mdsb-pane { max-width: 860px; margin: 0 auto; }
.mdsb-signin { max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.mdsb-signin .mdsb-field { margin: 0; }
.mdsb-how { margin-top: 28px; }
.mdsb-how h3 { margin-top: 0; }
.mdsb-how ol { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 14px; }
.mdsb-how li { counter-increment: how; position: relative; padding-left: 44px; }
.mdsb-how li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-wash); color: var(--ink); font-weight: 900; display: flex; align-items: center; justify-content: center; }
.mdsb-how strong { color: var(--ink); }
.mdsb-self { margin: 10px 0 2px; }
.mdsb input[readonly] { background: var(--ground); color: var(--ink-soft); }
.mdsb-code { font-size: 28px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.mdsb-account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.mdsb-booking .mdsb-session-top { align-items: flex-start; }
.mdsb-status { flex: none; padding: 3px 10px; border-radius: 3px; background: var(--blue-wash); color: var(--ink); font-size: 13px; font-weight: 700; }
.mdsb-booking-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 12px; }
.mdsb-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.mdsb-panel .mdsb-field { margin: 10px 0; }
.mdsb-move-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.mdsb-btn.is-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.mdsb-btn.is-disabled { opacity: .5; pointer-events: none; }
.mdsb-history { margin: 0; padding: 0; list-style: none; }
.mdsb-history li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mdsb-history span { grid-column: 1; color: var(--ink-soft); font-size: 14px; }
.mdsb-history em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-weight: 700; font-size: 14px; }
.mdsb-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; margin: 0 0 16px; }
.mdsb-details dt { font-size: 13px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.mdsb-details dd { margin: 2px 0 0; overflow-wrap: anywhere; }
/* Licence on file: a server blurred preview with an "On file" badge over it */
.mdsb-shot .mdsb-shot-onfile { filter: saturate(.7); transform: scale(1.06); }
.mdsb-shot .mdsb-shot-badge { position: relative; z-index: 1; padding: 6px 12px; border-radius: 3px; background: rgba(22, 43, 69, .82); color: #fff; font-weight: 700; line-height: 1.3; }
.mdsb-shot .mdsb-shot-badge small { font-weight: 400; color: #d6e2ee; }

/* Course requirements: licence notice at course selection, checkboxes before confirming */
.mdsb-licence-note a { color: inherit; font-weight: 700; }
.mdsb-session-req { color: #8a5a00; font-weight: 700; }
.mdsb-req { padding: 12px 14px; border: 2px solid var(--line); border-radius: 8px; background: var(--ground); margin-top: 8px; }
.mdsb-req:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
