/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #18BAB5;
  --teal-hover: #14a09b;
  --teal-light: #e8f9f9;
  --white: #ffffff;
  --error: #c0392b;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-light: #718096;
  --border: #e2e8f0;
  --bg-light: #f7fafc;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --radius: 16px;
}

body {
  font-family: 'Open Sans', 'Helvetica Neue', sans-serif;
  background: #f0f4f8;
  color: var(--text-primary);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ===== Progress Bar ===== */
.progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  z-index: 100;
}
.progress-fill {
  height: 100%;
  background: var(--teal);
  transition: width 0.4s ease;
  width: 0%;
}

/* ===== Back Button ===== */
.back-btn {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  z-index: 99;
  transition: border-color 0.2s, color 0.2s;
}
.back-btn.visible { display: flex; }
.back-btn:hover { border-color: var(--teal); color: var(--teal); }

/* ===== Form Container ===== */
.form-container {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 40px;
}

/* ===== Steps Wrapper ===== */
.steps-wrapper {
  width: 100%;
  max-width: 480px;
}

/* ===== Step Visibility ===== */
.step { display: none; }
.step.active { display: block; }

/* ===== Step Content ===== */
.step-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px 28px;
  margin-top: 8px;
}

/* ===== Step Header ===== */
.step-header { margin-bottom: 12px; }
.step-header h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}
.step-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Welcome Step ===== */
.step[data-step="welcome"] .step-content {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

/* ===== Logo ===== */
.logo { margin-bottom: 12px; }
.logo a { text-decoration: none; }
.logo-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal);
  display: block;
  line-height: 1;
}
.logo-sub {
  display: block;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-top: 4px;
}

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.welcome-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.welcome-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-light);
  border-radius: 20px;
  padding: 4px 10px;
  margin-bottom: 14px;
}

/* ===== Buttons ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: var(--teal-hover); transform: translateY(-1px); }

.btn-cherry {
  background: #3db87a;
  color: #fff;
}
.btn-cherry:hover:not(:disabled) { background: #2ea368; transform: translateY(-1px); }

/* ===== Service Cards ===== */
.service-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-light);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}
.service-card:hover {
  border-color: var(--teal);
  background: var(--teal-light);
}
.service-card.selected {
  border-color: var(--teal);
  background: var(--teal-light);
}

.service-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  border: 1.5px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}
.service-card:hover .service-card-icon,
.service-card.selected .service-card-icon {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.service-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.service-card:hover .service-card-title,
.service-card.selected .service-card-title {
  color: var(--teal);
}

/* ===== Calendar ===== */
.datetime-picker { margin-bottom: 4px; }

.calendar {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-month {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cal-nav {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.cal-nav:hover { border-color: var(--teal); color: var(--teal); }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0 6px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cal-day:hover:not(.disabled):not(.selected):not(.empty) {
  background: var(--teal-light);
  color: var(--teal);
}
.cal-day.today:not(.selected) { color: var(--teal); font-weight: 700; }
.cal-day.selected { background: var(--teal); color: var(--white); font-weight: 700; }
.cal-day.disabled { color: var(--border); cursor: default; }
.cal-day.empty { cursor: default; }

/* ===== Time Slots ===== */
.time-slots {
  margin-bottom: 8px;
}
.time-slots h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.time-btn {
  padding: 10px 4px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-light);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.time-btn:hover { border-color: var(--teal); background: var(--teal-light); color: var(--teal); }
.time-btn.selected { border-color: var(--teal); background: var(--teal); color: var(--white); }

/* ===== Field Error ===== */
.field-error {
  display: block;
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 6px;
  min-height: 0;
}

/* ===== Input Groups ===== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.field { display: flex; flex-direction: column; }

.field input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-light);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus { border-color: var(--teal); background: var(--white); }
.field input::placeholder { color: var(--text-light); }

/* ===== Confirm Summary ===== */
.summary {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 4px;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.summary-row:last-child { border-bottom: none; }
.summary-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.summary-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* ===== Done / Confirmation Step ===== */
.confirmation-step { text-align: center; }

.checkmark-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.checkmark-path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.5s ease forwards 0.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.confirm-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.confirm-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.confirm-details {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ===== Cherry Info Box (Phone Step) ===== */
.cherry-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}
.cherry-info-logo {
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  object-fit: contain;
}
.cherry-info-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
  font-weight: 600;
}

/* ===== Cherry Prompt (Done Screen) ===== */
.cherry-prompt {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  margin-bottom: 12px;
}

.cherry-logo-img {
  height: 20px;
  object-fit: contain;
  margin-bottom: 6px;
}

.cherry-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.cherry-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
}

/* ===== Cherry iframe step ===== */
.iframe-step-content {
  padding: 0 !important;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 600px;
}

.cherry-iframe {
  display: block;
  width: 100%;
  min-height: 600px;
  border: 0;
}

/* ===== Consent / Fine Print ===== */
.consent-text {
  font-size: 0.68rem;
  color: var(--text-light);
  line-height: 1.45;
  margin-top: 8px;
}
.consent-text a { color: var(--teal); }

.privacy-link {
  font-size: 0.68rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 8px;
}
.privacy-link a { color: var(--teal); text-decoration: none; }
.privacy-link a:hover { text-decoration: underline; }

/* ===== Path Cards ===== */
.path-cards {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px auto 16px;
}

.path-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  min-height: 60px;
  cursor: pointer;
  text-align: left;
  font-family: 'Open Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}

.path-card:hover {
  border-color: var(--teal);
  background: var(--teal-light);
}

.path-card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
}

.path-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.path-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.path-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 520px) {
  body { background: var(--white); }
  .form-container { padding: 16px 0 32px; }
  .step-content { border-radius: 0; box-shadow: none; }
  .steps-wrapper { max-width: 100%; }
  .time-grid { grid-template-columns: repeat(3, 1fr); }
}
