/* ==========================================================================
   MaziClean — Booking flow + form controls
   Shared by booking.html, contact.html and the admin console.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */

.field { display: grid; gap: 0.45rem; }

.field > label,
.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--bone);
}

.field small { font-size: 0.78rem; color: var(--muted-dim); }

.field .req { color: var(--red-hot); }

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--bone);
  font-size: 0.95rem;
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
}

.textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }

.input::placeholder, .textarea::placeholder { color: var(--muted-dim); }

.input:hover, .select:hover, .textarea:hover { border-color: rgba(243,241,238,0.26); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--red-hot);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.14);
}

.input[aria-invalid='true'],
.select[aria-invalid='true'],
.textarea[aria-invalid='true'] {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A6A6AD' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 17px;
  padding-right: 2.6rem;
  cursor: pointer;
}

.select option { background: var(--surface); color: var(--bone); }

.field__err {
  font-size: 0.8rem;
  color: var(--bad);
  display: none;
}
.field.is-bad .field__err { display: block; }

.grid-2 { display: grid; gap: 1.1rem; }
@media (min-width: 620px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.grid-2 .span-2 { grid-column: 1 / -1; }

/* --------------------------------------------------------------------------
   Choice cards — radio/checkbox groups styled as selectable tiles
   -------------------------------------------------------------------------- */

.choices { display: grid; gap: 0.75rem; }

.choices--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.choices--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); }

.choice {
  position: relative;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--glass);
  cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
}

.choice:hover { border-color: rgba(243,241,238,0.28); transform: translateY(-2px); }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice__box {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.choice--check .choice__box { border-radius: 6px; }

.choice__box::after {
  content: '';
  width: 9px; height: 9px;
  border-radius: inherit;
  background: var(--ink);
  transform: scale(0);
  transition: transform var(--t-fast);
}

.choice--check .choice__box::after {
  width: 11px; height: 11px;
  border-radius: 2px;
  background: transparent;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) scale(0);
  margin-top: -3px;
  height: 9px; width: 5px;
}

.choice__text { min-width: 0; }
.choice__text b { display: block; font-size: 0.94rem; font-weight: 600; letter-spacing: -0.01em; }
.choice__text span { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }
.choice__text em { font-style: normal; color: var(--red-hot); font-family: var(--mono); font-size: 0.8rem; }

.choice:has(input:checked) {
  border-color: var(--red-hot);
  background: rgba(200, 16, 46, 0.08);
}

.choice:has(input:checked) .choice__box { background: var(--red-hot); border-color: var(--red-hot); }
.choice:has(input:checked) .choice__box::after { transform: scale(1); }
.choice--check:has(input:checked) .choice__box::after { transform: rotate(45deg) scale(1); }

.choice:has(input:focus-visible) { outline: 2px solid var(--red-hot); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Wizard shell
   -------------------------------------------------------------------------- */

.wizard {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

/* Grid items default to min-width:auto, which let the step rail's nowrap
   pills push the whole page wider than a phone. */
.wizard > * { min-width: 0; }

@media (min-width: 1060px) {
  .wizard { grid-template-columns: minmax(0, 1fr) 22.5rem; gap: 3rem; }
}

/* Step rail */
.steps {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 2rem;
  padding: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.steps::-webkit-scrollbar { display: none; }

.steps__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted-dim);
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}

.steps__item b {
  width: 20px; height: 20px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid currentColor;
}

.steps__item.is-done { color: var(--good); }
.steps__item.is-done b { background: var(--good); color: var(--ink); border-color: var(--good); }
.steps li { list-style: none; display: contents; }

.steps__item.is-now {
  color: var(--bone);
  border-color: var(--line-2);
  background: var(--glass-2);
}
.steps__item.is-now b { background: var(--red); color: #fff; border-color: var(--red); }

.step { display: none; }
.step.is-live { display: block; animation: stepIn 450ms var(--ease); }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.step__head { margin-bottom: 1.75rem; }
.step__head h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.038em; }
.step__head p  { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

.step__body { display: grid; gap: 1.75rem; }

.fieldset { display: grid; gap: 0.85rem; }
.fieldset > legend,
.fieldset__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bone);
  padding: 0;
}
.fieldset__title span { color: var(--muted-dim); font-weight: 400; }

.wizard__nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.wizard__nav .btn--primary { margin-left: auto; }

/* --------------------------------------------------------------------------
   Calendar
   -------------------------------------------------------------------------- */

.cal { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }

.cal__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.cal__month {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.cal__nav {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}
.cal__nav:hover:not([disabled]) { color: var(--red-hot); border-color: rgba(200,16,46,0.4); background: var(--glass-2); }
.cal__nav[disabled] { opacity: 0.3; cursor: not-allowed; }
.cal__nav svg { width: 15px; height: 15px; }

.cal__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0.6rem 0.5rem 0.2rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  text-align: center;
}

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 0.5rem;
}

.cal__day {
  position: relative;
  aspect-ratio: 1;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
  border: 1px solid transparent;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.cal__day--pad { visibility: hidden; }

.cal__day[data-open='yes']:hover { background: var(--glass-2); border-color: var(--line-2); }

/* Availability marker under the numeral */
.cal__day[data-open='yes']::after {
  content: '';
  position: absolute;
  bottom: 5px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--good);
}

.cal__day[data-open='no'] {
  color: var(--muted-dim);
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.cal__day.is-picked {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  border-color: transparent;
}
.cal__day.is-picked::after { background: rgba(255,255,255,0.75); }

.cal__day.is-today { border-color: var(--line-2); }

.cal__key {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.75rem;
  color: var(--muted-dim);
}

.cal__key span { display: inline-flex; align-items: center; gap: 0.4rem; }
.cal__key i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.cal__key i.off { background: var(--muted-dim); }

/* Time slots */
.slots { margin-top: 1.5rem; }

.slots__grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr));
}

.slot {
  position: relative;
  padding: 0.85rem 0.5rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--glass);
  text-align: center;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast), color var(--t-fast);
}

.slot small { display: block; font-size: 0.72rem; color: var(--muted-dim); margin-top: 0.15rem; }

.slot:hover { border-color: rgba(200,16,46,0.45); transform: translateY(-2px); color: var(--red-hot); }

.slot.is-picked {
  background: var(--red);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
.slot.is-picked small { color: rgba(255,255,255,0.85); }

/* Empty / loading states */
.state {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  text-align: center;
  padding: 2.5rem 1.25rem;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-2);
  color: var(--muted);
  font-size: 0.92rem;
}

.state svg { width: 26px; height: 26px; color: var(--muted-dim); }
.state b { color: var(--bone); font-weight: 600; }

.spinner {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--red-hot);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn .spinner { width: 15px; height: 15px; border-width: 1.5px; border-top-color: currentColor; }

/* --------------------------------------------------------------------------
   Summary rail — sticky quote panel
   -------------------------------------------------------------------------- */

.summary {
  position: sticky;
  top: 6.5rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  overflow: hidden;
}

.summary__head {
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.summary__head h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.028em;
  margin-right: auto;
}

.summary__body { padding: 1.35rem; display: grid; gap: 0.9rem; margin: 0; }

.summary__line {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.summary__line dt { color: var(--muted); flex: 1; min-width: 0; }
.summary__line dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.summary__line--sub dt, .summary__line--sub dd { font-size: 0.84rem; color: var(--muted-dim); }

.summary__total {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-top: 1px solid var(--line);
  background: var(--glass);
}

.summary__total dt { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--mono); }

.summary__total dd {
  margin: 0;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.summary__deposit {
  padding: 1rem 1.35rem;
  border-top: 1px dashed var(--line-2);
  background: rgba(200, 16, 46, 0.05);
  font-size: 0.85rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.summary__deposit strong { color: var(--red-hot); font-size: 0.95rem; }

.summary__note {
  padding: 0.9rem 1.35rem 1.25rem;
  font-size: 0.78rem;
  color: var(--muted-dim);
  line-height: 1.5;
}

.summary__empty { padding: 2rem 1.35rem; text-align: center; color: var(--muted-dim); font-size: 0.88rem; }

/* --------------------------------------------------------------------------
   Review step
   -------------------------------------------------------------------------- */

.review { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }

.review__row {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--ink);
  font-size: 0.92rem;
}

@media (min-width: 560px) { .review__row { grid-template-columns: 11rem minmax(0, 1fr); align-items: baseline; } }

.review__row dt { color: var(--muted-dim); font-size: 0.82rem; }
.review__row dd { margin: 0; }
.review__row dd b { font-weight: 600; }

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */

.alert {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--glass);
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert svg { width: 18px; height: 18px; flex: none; margin-top: 0.15rem; }
.alert b { display: block; margin-bottom: 0.15rem; }

.alert--bad  { border-color: rgba(255,107,107,0.35); background: rgba(255,107,107,0.08); color: #FFC4C4; }
.alert--warn { border-color: rgba(255,176,32,0.35);  background: rgba(255,176,32,0.08);  color: #FFD98F; }
.alert--good { border-color: rgba(74,222,128,0.35);  background: rgba(74,222,128,0.08);  color: #B4F0C9; }
.alert--info { border-color: rgba(200,16,46,0.3);   background: rgba(200,16,46,0.07);  color: #E9E7E3; }

.alert[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Success page
   -------------------------------------------------------------------------- */

.receipt {
  max-width: 40rem;
  margin-inline: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  overflow: hidden;
  background: var(--surface);
}

.receipt__top {
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  border-bottom: 1px dashed var(--line-2);
  position: relative;
}

.receipt__tick {
  width: 66px; height: 66px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(63, 207, 124, 0.12);
  border: 1px solid rgba(63, 207, 124, 0.4);
  color: var(--good);
}
.receipt__tick svg { width: 30px; height: 30px; }

.receipt__ref {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line-2);
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--red-hot);
}

.receipt__body { padding: clamp(1.5rem, 4vw, 2.25rem); display: grid; gap: 1rem; }

.receipt__line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.receipt__line:last-child { border-bottom: 0; padding-bottom: 0; }
.receipt__line dt { color: var(--muted); }
.receipt__line dd { margin: 0; text-align: right; font-weight: 500; }

.next-steps { display: grid; gap: 1rem; counter-reset: ns; }

.next-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  counter-increment: ns;
  font-size: 0.94rem;
  color: var(--muted);
}

.next-steps li::before {
  content: counter(ns);
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--red-hot);
}

.next-steps b { color: var(--bone); }
