/**
 * Customer-facing site: page wrapper + booking sheets + success screen.
 * The actual marketing page content (hero, sections, footer — same markup
 * at every breakpoint) lives in assets/css/marketing.css; this file now
 * only owns the outer wrapper and the booking-flow overlay components.
 */

body.customer-body {
  background: var(--color-bg);
  min-height: 100dvh;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  background: var(--color-bg);
  overflow-x: hidden;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--space-6) 0 var(--space-4);
}
.section-heading h2 { font-size: var(--text-xl); }
.section-heading .link { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); font-weight: 700; color: var(--color-primary); }
.section-heading .link .icon { width: 14px; height: 14px; stroke: none; fill: var(--color-gold); }

/* ---- Service cards — base reset; the real image-tile design (also used,
   with .mkt-service-card added, in the unified services section) lives in
   marketing.css since it owns the grid container too. ---- */

.service-card {
  display: block;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

/* ---- List rows (applications / service types inside sheets) ---- */

.option-list { display: flex; flex-direction: column; gap: var(--space-3); }

.option-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  text-align: left;
  min-height: 72px;
  transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.option-row.is-selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
.option-row .option-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.option-row .option-icon img { width: 100%; height: 100%; object-fit: cover; }
.option-row .option-body { flex: 1; min-width: 0; }
.option-row .option-title { font-weight: 700; font-size: var(--text-base); }
.option-row .option-desc { font-size: var(--text-xs); color: var(--color-text-secondary); margin-top: 2px; }
.option-row .option-meta { text-align: right; flex-shrink: 0; }
.option-row .option-price { font-weight: 700; font-family: var(--font-display); color: var(--color-text); }
.option-row .option-price-strike { font-size: var(--text-xs); color: var(--color-text-muted); text-decoration: line-through; }
.option-row .radio-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-border-strong);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--duration-fast) var(--ease-out);
}
.option-row.is-selected .radio-dot { border-color: var(--color-primary); }
.option-row .radio-dot::after {
  content: '';
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--color-primary);
  transform: scale(0);
  transition: transform var(--duration-fast) var(--ease-spring);
}
.option-row.is-selected .radio-dot::after { transform: scale(1); }

.booking-context {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
}
.booking-context .option-icon { width: 36px; height: 36px; }
.booking-context strong { display: block; font-size: var(--text-sm); }
.booking-context span { color: var(--color-text-secondary); font-size: var(--text-xs); }

/* ---- Success screen ---- */

.success-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6);
  max-width: var(--app-max-width);
  margin: 0 auto;
}
.success-check {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--color-success-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-6);
  animation: success-pop var(--duration-slow) var(--ease-spring);
}
.success-check svg { width: 48px; height: 48px; }
.success-check svg path {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: success-draw 500ms 250ms var(--ease-out) forwards;
}
@keyframes success-pop { from { transform: scale(0.4); opacity: 0; } }
@keyframes success-draw { to { stroke-dashoffset: 0; } }

.success-screen h1 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.success-screen p { color: var(--color-text-secondary); margin-bottom: var(--space-6); max-width: 320px; }
.reference-box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--color-border-strong);
  background: var(--color-surface);
  margin-bottom: var(--space-8);
  width: 100%;
}
.reference-box .ref-label { font-size: var(--text-xs); color: var(--color-text-muted); text-align: left; }
.reference-box .ref-value { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); letter-spacing: 0.02em; }
.success-actions { display: flex; flex-direction: column; gap: var(--space-3); width: 100%; }

/* ---- Misc ---- */

.step-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: var(--space-4); }
.step-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--color-border-strong); transition: background var(--duration-fast) var(--ease-out), width var(--duration-fast) var(--ease-out); }
.step-dots span.is-active { background: var(--color-primary); width: 18px; border-radius: var(--radius-pill); }

.file-drop {
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
}
.file-drop.has-file { border-style: solid; border-color: var(--color-primary); color: var(--color-primary); font-weight: 600; }

/* ---- Track booking page ---- */

.track-form-card { margin-top: var(--space-6); }
.track-result { margin-top: var(--space-6); }
.track-result .timeline { margin-top: var(--space-4); }

/* =========================================================
   Premium booking sheet (Urban Company style)
   Scoped to #sheetBookingForm so admin/shared forms are untouched.
   ========================================================= */

#sheetBookingForm.sheet {
  background: #ffffff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
#sheetBookingForm .sheet-body {
  padding: var(--space-3) var(--space-5);
}

/* ---- Sheet header: icon + title + subtitle left, close right ---- */

#sheetBookingForm .booking-header {
  border-bottom: none;
  padding: var(--space-1) var(--space-5) var(--space-3);
}
.booking-context {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  font-size: var(--text-sm);
}
.booking-context .option-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.booking-context .option-icon .icon { width: 22px; height: 22px; }
.booking-context strong { display: block; font-size: 17px; line-height: 1.25; color: var(--color-text); }
.booking-context div > span { color: var(--color-text-secondary); font-size: 12.5px; margin-top: 1px; }
.booking-price-note { display: block; color: var(--color-primary); font-weight: 600; font-size: 12px; margin-top: 2px; }
.booking-close {
  width: 32px;
  height: 32px;
  background: #f4f5f7;
  color: var(--color-text);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.booking-close:active { transform: scale(0.92); }

/* ---- Step pill ("Step 1 of 2") — sits at the right edge of the header,
   next to the service name, ahead of the close button. ---- */
.booking-step-pill {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-secondary);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ---- Fields: labels above inputs, clean rounded inputs ---- */

#sheetBookingForm .field {
  display: flex;
  flex-direction: column;
  margin-bottom: 9px;
}
#sheetBookingForm .field-label {
  position: static;
  order: -1;
  top: auto;
  left: auto;
  transform: none;
  pointer-events: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  transition: color var(--duration-fast) var(--ease-out);
}
#sheetBookingForm .field-input,
#sheetBookingForm .field-select,
#sheetBookingForm .field-textarea {
  min-height: 46px;
  padding: 0 14px;
  border: 1.5px solid #d8dde3;
  border-radius: 12px;
  background: #ffffff;
  font-size: 14px;
  color: var(--color-text);
  box-shadow: none;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
#sheetBookingForm .field-textarea {
  min-height: 84px;
  padding: 11px 14px;
  resize: vertical;
  line-height: 1.5;
}
#sheetBookingForm .field-input::placeholder,
#sheetBookingForm .field-textarea::placeholder { color: #9ca3af; }
#sheetBookingForm .field-input:focus,
#sheetBookingForm .field-select:focus,
#sheetBookingForm .field-textarea:focus {
  border-color: #0b7a33;
  border-width: 2px;
  box-shadow: 0 0 0 4px rgba(11, 122, 51, 0.1);
}
#sheetBookingForm .field-select {
  padding-right: 40px;
}
#sheetBookingForm .field-select-wrap::after {
  border-color: #6b7280;
  width: 9px;
  height: 9px;
}
#sheetBookingForm .field-label:focus ~ .field-label,
#sheetBookingForm .field-input:focus ~ .field-label,
#sheetBookingForm .field-input:not(:placeholder-shown) ~ .field-label,
#sheetBookingForm .field-textarea:focus ~ .field-label,
#sheetBookingForm .field-textarea:not(:placeholder-shown) ~ .field-label,
#sheetBookingForm .field-select-wrap:has(.field-select:focus) ~ .field-label,
#sheetBookingForm .field-select-wrap:has(.field-select.has-value) ~ .field-label {
  top: auto;
  transform: none;
  color: var(--color-text);
}
#sheetBookingForm .field-static-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
#sheetBookingForm .field-required { color: var(--color-error); }
#sheetBookingForm .field-help { font-size: 11.5px; margin-top: 3px; }
#sheetBookingForm .field-error-msg { font-size: 11.5px; margin-top: 3px; }
#sheetBookingForm .field.has-error .field-input,
#sheetBookingForm .field.has-error .field-select,
#sheetBookingForm .field.has-error .field-textarea {
  border-color: var(--color-error);
  border-width: 1.5px;
}

/* Two-column rows (Name+Phone, Email+Date, City+Area) inside the booking form */

#bookingNextBtn { margin-top: var(--space-2); }

/* Conditional field wrapper — see wireFieldDependencies() in customer.js. */
.mkt-field-wrapper.is-dependent-hidden { display: none; }

.booking-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.booking-col-grid .field { margin-bottom: 9px; }
.booking-col-grid .field-input,
.booking-col-grid .field-select { padding-left: 12px; padding-right: 12px; }

/* ---- Selection chips: pill, gray idle, green active ---- */

#sheetBookingForm .chip {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f4f5f7;
  color: #1f2937;
  font-weight: 600;
  font-size: 12.5px;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
#sheetBookingForm .chip:active { transform: scale(0.97); }
#sheetBookingForm .chip.is-selected {
  border-color: #0b7a33;
  background: #0b7a33;
  color: #ffffff;
}
#sheetBookingForm .chip-check {
  display: none;
  align-items: center;
  color: inherit;
}
#sheetBookingForm .chip-check .icon { width: 13px; height: 13px; }
#sheetBookingForm .chip.is-selected .chip-check { display: inline-flex; }
#sheetBookingForm .chip-group { gap: 8px; }
#sheetBookingForm .chip-icon { display: inline-flex; align-items: center; color: #6b7280; }
#sheetBookingForm .chip-icon .icon { width: 14px; height: 14px; }
#sheetBookingForm .chip.is-selected .chip-icon { color: inherit; }

/* ---- Price summary ---- */

#sheetBookingForm .option-row { border-color: #e5e7eb; }
#sheetBookingForm .option-price { color: #0b7a33; }

/* ---- File drop ---- */

#sheetBookingForm .file-drop { border-radius: 12px; border-color: #d8dde3; background: #fafbfc; }

/* ---- Trust badges ---- */

.booking-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.booking-trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1.5px solid #0b7a33;
  border-radius: 999px;
  color: #0b7a33;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(11, 122, 51, 0.04);
}
.booking-trust span .icon { width: 13px; height: 13px; }

/* ---- Sticky bottom CTA ---- */

#sheetBookingForm .booking-footer {
  border-top: 1px solid #f0f1f3;
  background: #ffffff;
  padding: 9px var(--space-5);
  padding-bottom: calc(9px + var(--safe-bottom));
}
.booking-cta {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  background: #f4b400;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(244, 180, 0, 0.3);
  transition: background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.booking-cta:hover { background: #e0a400; box-shadow: 0 10px 28px rgba(244, 180, 0, 0.4); }
.booking-cta:active { transform: scale(0.98); }

/* ---- Footer step nav: Back (step 2 only) sits beside Book Service ---- */
.booking-footer-actions { display: flex; align-items: center; gap: var(--space-3); }
.booking-footer-actions .booking-cta { flex: 1; width: auto; }
.booking-footer-actions #bookingBackBtn { flex: 0 0 auto; min-height: 50px; padding: 0 var(--space-4); }
.booking-footnote {
  margin: 7px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
}
