/* ============================================
   Medspa Marketing Recommender — Global Styles
   Warm, clean girl aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg: #FAF7F4;
  --surface: #FFFFFF;
  --surface-tint: #F5EEE9;
  --accent: #C4838A;
  --accent-light: #EDD8DA;
  --accent-dark: #A66069;
  --sage: #8FAF9F;
  --sage-light: #D8EBE4;
  --gold: #C9A96E;
  --gold-light: #F2E6CE;
  --text-primary: #2C2420;
  --text-secondary: #7A6B65;
  --text-muted: #B0A09A;
  --border: #EAE0DC;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.09);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }

p { color: var(--text-secondary); }

/* ---- Layout ---- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.container {
  width: 100%;
  max-width: 640px;
}

/* ---- Brand chip ---- */
.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

/* ---- Landing Textarea ---- */
.goal-textarea {
  width: 100%;
  min-height: 120px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--surface);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  box-shadow: var(--shadow);
  margin-top: 32px;
}

.goal-textarea::placeholder { color: var(--text-muted); }
.goal-textarea:focus { border-color: var(--accent); }

/* ---- Buttons ---- */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 20px;
  letter-spacing: 0.02em;
}

.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: var(--accent-light); color: var(--accent); cursor: not-allowed; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.btn-secondary:hover { border-color: var(--accent); background: var(--accent-light); }

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 18px 32px;
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.2s;
  margin-top: 16px;
  letter-spacing: 0.01em;
}

.btn-ghost:hover { border-color: var(--accent); }

/* ---- Quick chips ---- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.chip {
  padding: 10px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Progress dots ---- */
.progress {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.progress-dot {
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--border);
  transition: all 0.3s;
}

.progress-dot.active { background: var(--accent); width: 28px; }
.progress-dot.inactive { width: 20px; }
.progress-dot.done { background: var(--accent-light); width: 20px; }

/* ---- Selection cards ---- */
.treatment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
}

.treatment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.treatment-card:hover { border-color: var(--accent); }

.treatment-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.treatment-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.treatment-card-emoji { font-size: 1.3rem; }

.check-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  color: white;
  font-size: 0.8rem;
}

.treatment-card.selected .check-circle {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---- Custom input ---- */
.custom-input {
  width: 100%;
  padding: 18px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  box-shadow: var(--shadow);
}

.custom-input::placeholder { color: var(--text-muted); }
.custom-input:focus { border-color: var(--accent); }

/* ---- Bottom nav row ---- */
.bottom-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

/* ---- Slider section ---- */
.slider-section {
  margin: 28px 0;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.slider-label { font-size: 0.9rem; color: var(--text-secondary); }
.slider-value { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }

.slider {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 3px white, 0 0 0 4px var(--accent-light);
  transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.discount-summary {
  padding: 16px 20px;
  background: var(--surface-tint);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 20px;
}

.discount-summary strong { color: var(--text-primary); }

/* ---- Client volume slider ---- */
.volume-number {
  text-align: center;
  margin: 28px 0 8px;
}

.volume-number .big-num {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.volume-number .unit {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.slider-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ---- Results page ---- */
.result-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sage-light);
  color: var(--sage);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.result-description {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 20px 0;
  box-shadow: var(--shadow);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  border-radius: var(--radius);
  text-align: center;
  gap: 8px;
}

.metric-card.pink { background: var(--accent-light); }
.metric-card.sage { background: var(--sage-light); }
.metric-card.gold { background: var(--gold-light); }

.metric-icon { font-size: 1.2rem; }

.metric-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.pro-tip {
  display: flex;
  gap: 12px;
  padding: 18px 20px;
  background: var(--surface-tint);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 16px 0;
  border: 1px solid var(--border);
}

.pro-tip-icon { flex-shrink: 0; font-size: 1.1rem; }
.pro-tip strong { color: var(--text-primary); }

/* ---- Runner-up cards ---- */
.runner-ups {
  margin-top: 16px;
}

.runner-up-card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-top: 12px;
  box-shadow: var(--shadow);
}

.runner-up-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.runner-up-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.runner-up-metrics {
  display: flex;
  gap: 20px;
}

.runner-up-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.runner-up-metric .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.runner-up-metric .value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---- Loading state ---- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---- Skeleton loaders ---- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-tint) 25%, var(--border) 50%, var(--surface-tint) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .page { padding: 32px 16px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metrics-grid .metric-card:last-child { grid-column: span 2; }
}
