/* =====================================================================
   W BOOKING SYSTEM — design tokens shared with the W Photography visual
   language (same fonts/palette), but this stylesheet is written fresh for
   this project and shares no code with the other two.
===================================================================== */
:root {
  --ink: #18120F;
  --ink-soft: #4A3F38;
  --muted: #786C62;
  --paper: #FAF7F2;
  --paper-deep: #F1EAE0;
  --line: #E4DBCC;
  --accent: #B6301D;
  --accent2: #E2536F;
  --accent-deep: #8C2415;
  --accent-tint: #F4E3DC;
  --cream: #FFFDF9;
  --ok: #3A6B4C;

  --font-display: 'Fraunces', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Grotesk', sans-serif;

  --container-w: 720px;
  --ease: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }
/* Guarantee [hidden] always wins, even against a class that sets its own
   display (flex/grid) — same specificity as the UA [hidden] rule, so
   whichever comes later in the cascade would otherwise win by accident. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }

/* Desktop gets real width instead of one narrow column squeezed onto every
   screen size — client and admin get their own breakpoints since they need
   different amounts of room. */
@media (min-width: 860px) {
  .booking-page .container { max-width: 900px; }
}
@media (min-width: 1000px) {
  .admin-page .container, .site-header-inner { max-width: 1180px; }
}

a { color: var(--accent-deep); }

/* HEADER */
.site-header { padding: 28px 0 8px; text-align: center; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-word { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.08em; font-size: 14px; }

/* STEPS */
.booking-steps { display: flex; justify-content: center; gap: 28px; margin: 28px 0 36px; }
.booking-step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.booking-step.is-active, .booking-step.is-done { color: var(--ink); }
.booking-step-num {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.booking-step.is-active .booking-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.booking-step.is-done .booking-step-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.booking-step-label { display: none; }
@media (min-width: 560px) { .booking-step-label { display: inline; } }

.booking-panel { display: none; }
.booking-panel.is-active { display: block; }

.booking-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 5vw, 38px); margin: 0 0 6px; }
.booking-subtitle { font-family: var(--font-display); font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.booking-lead { color: var(--muted); margin: 0 0 4px; }
.step-kicker { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); margin: 0 0 4px; }

/* SERVICE LIST */
.service-list { display: flex; flex-direction: column; gap: 16px; margin: 18px 0; }
@media (min-width: 700px) {
  .service-list { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
.service-block { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--cream); }
.service-block.is-selectable { cursor: pointer; transition: border-color 0.18s var(--ease), background 0.18s var(--ease); }
.service-block.is-selectable:hover { border-color: var(--accent); }
.service-block.is-selectable.is-selected { border-color: var(--accent); background: var(--accent-tint); }
.service-info .package-price { display: inline-block; margin-top: 8px; font-family: var(--font-mono); font-size: 13px; color: var(--accent-deep); }
.service-info .package-price.is-free { color: var(--ok); }
.service-block-head { display: flex; gap: 14px; align-items: flex-start; }
.service-media {
  width: 56px; height: 56px; border-radius: 12px; flex: none; overflow: hidden;
  background: var(--paper-deep); display: flex; align-items: center; justify-content: center;
  color: var(--accent-deep);
}
.service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-media .monogram { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.service-info h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 4px; }
.service-info p { color: var(--muted); font-size: 14px; margin: 0; }

.package-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.package-btn {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; text-align: left;
  background: var(--paper); cursor: pointer; font-family: var(--font-body); min-width: 140px;
}
.package-btn:hover { border-color: var(--accent); }
.package-btn.is-selected { border-color: var(--accent); background: var(--accent-tint); }
.package-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.package-price { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--accent-deep); }
.package-price.is-free { color: var(--ok); }

/* CALENDAR */
.booking-calendar { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--cream); margin: 18px 0; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-head button { background: none; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }
.calendar-month-label { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 14px; cursor: pointer; border: 1px solid transparent;
}
.calendar-day.is-empty { visibility: hidden; }
.calendar-day.is-disabled { color: var(--line); cursor: not-allowed; }
.calendar-day.has-slots { border-color: var(--line); }
.calendar-day.has-slots:hover { border-color: var(--accent); }
.calendar-day.is-selected { background: var(--accent); color: #fff; }

.step2-grid { display: flex; flex-direction: column; }
.step2-grid .booking-calendar { max-width: 420px; }

.time-slots { margin: 18px 0; }
.time-slots-title { font-family: var(--font-display); font-size: 17px; margin: 0 0 10px; }
.time-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.time-slot {
  padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--cream);
  font-family: var(--font-mono); font-size: 13px; cursor: pointer; text-align: center;
}
.time-slot:hover { border-color: var(--accent); }
.time-slot.is-selected { background: var(--accent); border-color: var(--accent); color: #fff; }

/* FORM */
.booking-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.booking-form input, .booking-form textarea, .booking-form select {
  font-family: var(--font-body); font-size: 15px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--cream); color: var(--ink); width: 100%;
}
.booking-form .full { grid-column: 1 / -1; }
/* dynamic fields render as siblings of the grid, so they flow into its
   columns exactly like the hardcoded name/email inputs do */
#dynamicFields { display: contents; }
.dyn-field-select { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; }

/* SUMMARY / POLICY */
.booking-summary { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--cream); margin: 18px 0; font-size: 14px; }
.booking-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.booking-summary dt { color: var(--muted); }
.booking-summary dd { margin: 0; text-align: right; }
.policy-box { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--paper-deep); font-size: 13px; margin: 18px 0; }
.policy-box .box-title { font-family: var(--font-display); font-size: 16px; margin: 0 0 8px; }

.step4-grid { display: flex; flex-direction: column; }
.step4-col { display: flex; flex-direction: column; }
@media (min-width: 700px) {
  .step4-grid { flex-direction: row; align-items: flex-start; gap: 24px; }
  .step4-col { flex: 1; min-width: 0; }
}
.policy-ack { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; cursor: pointer; }

#card-container { margin: 14px 0; }

/* BUTTONS */
.btn { font-family: var(--font-body); font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 10px; border: none; cursor: pointer; }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-deep); }
.btn-solid:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.booking-next { margin-top: 10px; }
.booking-back { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 6px 0; }

.booking-error { color: var(--accent-deep); font-size: 14px; margin: 10px 0 0; }
.booking-loading { color: var(--muted); font-size: 14px; }

.confirmation-box { text-align: center; padding: 40px 0; }
.confirmation-box h1 { font-family: var(--font-display); font-size: 30px; }
.confirmation-icon { font-size: 40px; margin-bottom: 8px; }

.booking-page { padding-bottom: 80px; }

/* CUSTOM DROPDOWN — replaces native <select> everywhere */
.wdd { position: relative; display: inline-block; font-family: var(--font-body); width: 100%; }
.wdd-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream);
  cursor: pointer; font-family: inherit; font-size: 15px; color: var(--ink); text-align: left;
}
.wdd-trigger:hover { border-color: var(--accent); }
.wdd.is-open .wdd-trigger { border-color: var(--accent); }
.wdd-chevron { width: 14px; height: 14px; flex: none; color: var(--muted); transition: transform 0.15s var(--ease); }
.wdd.is-open .wdd-chevron { transform: rotate(180deg); }
.wdd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 100%;
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(24, 18, 15, 0.14); padding: 6px; z-index: 30;
  max-height: 260px; overflow-y: auto;
}
.wdd-option {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  border: none; background: none; cursor: pointer; font-family: inherit; font-size: 14px; color: var(--ink);
}
.wdd-option:hover { background: var(--paper-deep); }
.wdd-option.is-selected { background: var(--accent-tint); color: var(--accent-deep); font-weight: 600; }

/* TOGGLE SWITCH — replaces plain checkboxes for on/off settings */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-body); font-size: 14px; color: var(--ink-soft); user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line); transition: background 0.18s var(--ease); }
.toggle .thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(24, 18, 15, 0.25); transition: transform 0.18s var(--ease); }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track .thumb { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* PROPOSAL PAGE (public, no login) */
.proposal-page { padding-bottom: 80px; }
.proposal-card { border: 1px solid var(--line); border-radius: 18px; background: var(--cream); padding: 30px 32px; margin: 24px 0; box-shadow: 0 12px 34px rgba(24, 18, 15, 0.07); }
@media (min-width: 640px) { .proposal-card { padding: 38px 44px; } }
.client-kicker { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }
.box-title { font-family: var(--font-display); font-size: 17px; margin: 0 0 14px; }

.proposal-lineitems { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--paper); margin: 22px 0; }
.li-row { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; }
.li-row + .li-row { border-top: 1px solid var(--line); }
.li-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 15.5px; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--ink-soft); }

.proposal-deposit-box {
  border: 1.5px dashed var(--accent); background: var(--accent-tint); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 24px; font-size: 13.5px; color: var(--accent-deep); line-height: 1.5;
}

.proposal-sign-section { border-top: 1px solid var(--line); padding-top: 22px; }
.proposal-field-label { display: block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.proposal-input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream);
  font-family: var(--font-body); font-size: 15px; color: var(--ink); margin-bottom: 16px; resize: vertical;
}
.proposal-input:focus { outline: none; border-color: var(--accent); }
.link-btn { display: block; margin: 12px auto 0; background: none; border: none; color: var(--muted); font-family: var(--font-body); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 6px; }
.link-btn:hover { color: var(--accent-deep); }

.proposal-changes-form { border-top: 1px solid var(--line); padding-top: 22px; }
.proposal-changes-actions { display: flex; gap: 10px; justify-content: flex-end; }

.proposal-status-box { text-align: center; padding: 20px 0; font-size: 15px; color: var(--ink-soft); line-height: 1.6; }
