/* ============================================================
 * smilecitas — booking flow
 * Mobile-first: fullscreen 5 steps. Desktop ≥ 760px: centered card.
 * Design tokens: theme Smile (see FRONT_FLOW.md §1).
 * ============================================================ */

.smc {
  --bg: #F1EAE2;
  --cream: #FAF7F2;
  --surface: #FFFFFF;
  --ink: #241F1D;
  --ink-2: #6B6360;
  --ink-3: #9A928B;
  --line: #E3D8CC;
  --line-2: #EFE6DB;
  --burgundy: #6B2C2C;
  --burgundy-deep: #501F1F;
  --champagne: #B8924F;
  --ok: #2E5C3F;
  --okbg: #E8F0E5;
  --err: #B33A3A;
  --f-display: "Playfair Display", Georgia, serif;
  --f-body: "Inter", -apple-system, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  font-family: var(--f-body);
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
}

/* ===== TOP — progress + back ===== */
.smc__top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.smc__back {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex: 0 0 36px;
  transition: border-color .2s, color .2s;
}
.smc__back:hover { border-color: var(--champagne); color: var(--burgundy); }
.smc__progress {
  display: flex; gap: 6px; flex: 1; align-items: center;
}
.smc__progress i {
  flex: 1; height: 3px;
  background: var(--line);
  border-radius: 999px;
  transition: background .25s var(--ease);
}
.smc__progress i.is-on { background: var(--burgundy); }

/* ===== SHELL ===== */
.smc__shell {
  flex: 1;
  padding: 18px 18px 24px;
  overflow-y: auto;
}
.smc__step {
  max-width: 560px;
  margin: 0 auto;
  animation: smc-fade .25s var(--ease);
}
.smc__step[hidden] { display: none !important; }
@keyframes smc-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.smc__h {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(24px, 6vw, 30px);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 6px 0 6px;
  color: var(--ink);
}
.smc__h em { font-style: italic; color: var(--burgundy); }
.smc__lead {
  margin: 0 0 22px;
  font-size: 14.5px; line-height: 1.55;
  color: var(--ink-2);
}

/* ===== STEP 1 — occasions ===== */
.smc__occ { display: grid; gap: 12px; }
.smc__occ-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.smc__occ-card input { position: absolute; opacity: 0; pointer-events: none; }
.smc__occ-card:hover { border-color: var(--champagne); }
.smc__occ-card.is-on {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(107, 44, 44, .08);
}
.smc__occ-body h3 {
  font-family: var(--f-display); font-weight: 500;
  font-size: 19px; margin: 0 0 4px;
  color: var(--ink);
}
.smc__occ-body p {
  margin: 0; font-size: 13px; color: var(--ink-2);
}
.smc__occ-radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line);
  position: relative;
  transition: border-color .2s;
}
.smc__occ-card.is-on .smc__occ-radio {
  border-color: var(--burgundy);
}
.smc__occ-card.is-on .smc__occ-radio::after {
  content: "";
  position: absolute; inset: 4px;
  border-radius: 50%; background: var(--burgundy);
}
.smc__note {
  margin: 22px 0 0;
  padding: 14px 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px; color: var(--ink-2); line-height: 1.55;
}
.smc__note strong { color: var(--champagne); font-weight: 600; }

/* ===== STEP 2 — calendar ===== */
.smc__cal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 12px;
}
.smc__cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 12px;
}
.smc__cal-label {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: .01em;
  color: var(--ink);
  text-transform: capitalize;
}
.smc__cal-nav {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
}
.smc__cal-nav:hover { border-color: var(--champagne); color: var(--burgundy); }
.smc__cal-nav:disabled { opacity: .35; cursor: not-allowed; }
.smc__cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 11px; letter-spacing: .12em;
  color: var(--ink-3); font-weight: 600;
  text-align: center;
  padding: 6px 0 8px;
}
.smc__cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.smc__cal-day {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: 500 14px var(--f-body);
  color: var(--ink);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.smc__cal-day.is-blank { visibility: hidden; }
.smc__cal-day:hover:not(.is-dis):not(.is-on) { background: var(--cream); }
.smc__cal-day.is-on { background: var(--burgundy); color: #fff; }
.smc__cal-day.is-dis,
.smc__cal-day[aria-disabled="true"] {
  color: var(--ink-3);
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ===== STEP 3 — slots ===== */
.smc__slots { display: grid; gap: 22px; }
.smc__slot-group h4 {
  margin: 0 0 12px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--champagne); font-weight: 600;
}
.smc__slot-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.smc__slot {
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font: 500 14px var(--f-body);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s, border-color .2s;
}
.smc__slot:hover:not(.is-dis):not(.is-on) {
  border-color: var(--champagne);
}
.smc__slot.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.smc__slot.is-dis {
  color: var(--ink-3);
  text-decoration: line-through;
  cursor: not-allowed;
  background: var(--cream);
}
.smc__slots-empty {
  padding: 28px 16px; text-align: center;
  color: var(--ink-2); font-size: 14px;
  background: var(--cream);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* ===== STEP 4 — form ===== */
.smc__form { display: grid; gap: 16px; }
.smc__field { display: grid; gap: 6px; }
.smc__field-lbl {
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600; color: var(--ink-3);
}
.smc__field input,
.smc__field textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: 14.5px var(--f-body);
  color: var(--ink);
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s;
}
.smc__field textarea {
  height: auto;
  padding: 12px 14px;
  min-height: 88px;
  resize: vertical;
}
.smc__field input:focus,
.smc__field textarea:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 4px rgba(107, 44, 44, .08);
}
.smc__field-err {
  font-size: 12px;
  color: var(--err);
  min-height: 14px;
  font-weight: 500;
}

/* ===== STEP 5 — confirm ===== */
.smc__confirm {
  display: grid; gap: 12px; justify-items: center;
  padding-top: 8px;
}
.smc__check {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--okbg);
  color: var(--ok);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.smc__summary {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 10px;
}
.smc__summary dl { margin: 0; }
.smc__summary dt {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-3);
  margin: 12px 0 4px;
}
.smc__summary dt:first-child { margin-top: 0; }
.smc__summary dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink);
}
.smc__help {
  margin: 14px 0 0;
  font-size: 13px; color: var(--ink-2);
  text-align: center;
}
.smc__help a { color: var(--burgundy); text-decoration: underline; }

/* ===== FOOTER ===== */
.smc__foot {
  position: sticky; bottom: 0;
  display: grid; gap: 8px;
  padding: 14px 18px 20px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.smc__hint {
  margin: 0; font-size: 12.5px; color: var(--ink-2);
  text-align: center;
}
.smc__primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--burgundy);
  color: #FBF4EC;
  font: 600 13px var(--f-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.smc__primary:hover:not(:disabled) {
  background: var(--burgundy-deep);
}
.smc__primary:disabled {
  background: var(--ink-3);
  cursor: not-allowed;
  opacity: .65;
}

/* ===== Desktop ≥ 760px ===== */
@media (min-width: 760px) {
  .smc {
    background: var(--bg);
    min-height: auto;
    margin: 24px auto;
    width: min(680px, 92vw);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .35);
  }
  .smc__top { padding: 18px 26px; }
  .smc__shell { padding: 26px 26px 28px; }
  .smc__foot { padding: 18px 26px 22px; }
  .smc__h { font-size: 28px; }
  .smc__slot-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Accessibility */
.smc :focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .smc__step { animation: none; }
  .smc__progress i { transition: none; }
}
