/* SafeSpace Cuddles — warm earthy wellness aesthetic */

:root {
  --brown-deep:    #2c1a0e;
  --brown-mid:     #5c3d25;
  --brown-warm:    #8b5e3c;
  --cream:         #f5efe6;
  --cream-warm:    #ede0ce;
  --sand:          #d4b896;
  --orange-muted:  #c8722a;
  --orange-soft:   #e8956d;
  --green-sage:    #7a8c6e;
  --text-main:     #2c1a0e;
  --text-muted:    #7a6254;
  --text-light:    #a89282;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-warm: 0 4px 24px rgba(44, 26, 14, 0.12);
  --shadow-lift: 0 8px 40px rgba(44, 26, 14, 0.18);
  --transition: 0.22s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Satoshi', sans-serif;
  background: var(--cream);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────────────────────────── */

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 500; line-height: 1.2; }
h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brown-warm); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange-muted); }

/* ── Layout helpers ──────────────────────────────────────────────────────────── */

.container { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 900px; margin: 0 auto; padding: 0 20px; }

.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }

/* ── Navigation ──────────────────────────────────────────────────────────────── */

nav {
  background: var(--brown-deep);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.nav-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  color: var(--cream);
  letter-spacing: -0.01em;
}

.nav-brand span { color: var(--orange-soft); }

.nav-links { display: flex; gap: 8px; align-items: center; }

.nav-btn {
  background: none;
  border: 1px solid rgba(245,239,230,0.25);
  color: var(--cream);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: 'Satoshi', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
}
.nav-btn:hover { background: rgba(245,239,230,0.1); border-color: rgba(245,239,230,0.5); }
.nav-btn.active { background: var(--brown-warm); border-color: var(--brown-warm); }
.nav-btn-accent { background: var(--orange-muted) !important; border-color: var(--orange-muted) !important; }
.nav-btn-accent:hover { background: var(--orange-soft) !important; }

/* ── Buttons ──────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Satoshi', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--brown-warm);
  color: var(--cream);
}
.btn-primary:hover:not(:disabled) { background: var(--brown-mid); transform: translateY(-1px); box-shadow: var(--shadow-warm); }

.btn-accent {
  background: var(--orange-muted);
  color: #fff;
}
.btn-accent:hover:not(:disabled) { background: #b86425; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,114,42,0.3); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--brown-warm);
  color: var(--brown-warm);
}
.btn-outline:hover:not(:disabled) { background: var(--cream-warm); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
}
.btn-ghost:hover { color: var(--text-main); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a93226; }
.btn-success { background: var(--green-sage); color: #fff; }
.btn-success:hover:not(:disabled) { background: #657a55; }

/* ── Cards ────────────────────────────────────────────────────────────────────── */

.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-warm);
  border: 1px solid rgba(212,184,150,0.3);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lift); }

.card-sm { padding: 16px; }

/* ── Forms ────────────────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }

label.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--cream);
  border: 1.5px solid var(--sand);
  border-radius: var(--radius-sm);
  font-family: 'Satoshi', sans-serif;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brown-warm);
  box-shadow: 0 0 0 3px rgba(139,94,60,0.12);
}
textarea { resize: vertical; min-height: 100px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a6254' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer; }

/* ── Modals ───────────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,26,14,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(44,26,14,0.3);
}

.modal-icon { font-size: 2.5rem; margin-bottom: 16px; }
.modal h2 { margin-bottom: 8px; }
.modal-tagline { color: var(--brown-warm); font-style: italic; font-family: 'Fraunces', serif; margin-bottom: 20px; }

.modal-body {
  background: var(--cream-warm);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.modal-body p { margin-bottom: 10px; }

.checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
  cursor: pointer;
  font-size: 0.92rem;
}
.checkbox-label input { margin-top: 3px; accent-color: var(--brown-warm); flex-shrink: 0; }

.rules-list { padding-left: 20px; }
.rules-list li { margin-bottom: 10px; font-size: 0.92rem; }

/* ── Page sections ────────────────────────────────────────────────────────────── */

.page { min-height: calc(100vh - 60px); padding: 40px 0 80px; }

/* ── Hero ─────────────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(160deg, var(--brown-deep) 0%, var(--brown-mid) 60%, var(--brown-warm) 100%);
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content { max-width: 560px; margin: 0 auto; text-align: center; position: relative; }

.hero-eyebrow {
  display: inline-block;
  background: rgba(232,149,109,0.2);
  color: var(--orange-soft);
  border: 1px solid rgba(232,149,109,0.3);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 { color: var(--cream); margin-bottom: 16px; }
.hero-tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--orange-soft);
  margin-bottom: 20px;
}
.hero p { color: rgba(245,239,230,0.8); font-size: 1.05rem; margin-bottom: 36px; }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Specialist card ─────────────────────────────────────────────────────────── */

.specialist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.specialist-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-warm);
  border: 1px solid rgba(212,184,150,0.3);
  cursor: pointer;
  transition: all var(--transition);
}
.specialist-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.specialist-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--cream-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--sand);
}

.specialist-photo-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(145deg, var(--cream-warm), var(--sand));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.specialist-info { padding: 16px 20px 20px; }
.specialist-name { font-family: 'Fraunces', serif; font-size: 1.15rem; margin-bottom: 4px; }

.specialist-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.stars { color: #e8956d; }

.specialist-rate {
  font-weight: 600;
  color: var(--brown-warm);
  font-size: 1rem;
  margin-bottom: 8px;
}

.specialist-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.location-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.location-tag {
  background: var(--cream-warm);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ── Booking form ─────────────────────────────────────────────────────────────── */

.booking-summary {
  background: linear-gradient(135deg, var(--brown-deep), var(--brown-mid));
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--cream);
  margin-bottom: 24px;
}

.booking-summary h3 { font-family: 'Fraunces', serif; color: var(--cream); margin-bottom: 12px; }

.price-breakdown { margin-top: 16px; }
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
  color: rgba(245,239,230,0.8);
  border-bottom: 1px solid rgba(245,239,230,0.1);
}
.price-row:last-child { border-bottom: none; font-size: 1.05rem; font-weight: 600; color: var(--cream); }
.price-row .price-val { color: var(--cream); }

/* ── Session type chips ───────────────────────────────────────────────────────── */

.session-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.session-chip {
  padding: 10px 18px;
  border: 1.5px solid var(--sand);
  border-radius: var(--radius-sm);
  background: var(--cream);
  cursor: pointer;
  font-family: 'Satoshi', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  color: var(--text-main);
}
.session-chip:hover { border-color: var(--brown-warm); }
.session-chip.selected { background: var(--brown-warm); border-color: var(--brown-warm); color: var(--cream); }

/* ── Dashboard ────────────────────────────────────────────────────────────────── */

.dashboard-header {
  background: linear-gradient(135deg, var(--brown-deep), var(--brown-mid));
  color: var(--cream);
  padding: 40px 20px;
  text-align: center;
}
.dashboard-header h2 { color: var(--cream); }
.dashboard-header p { color: rgba(245,239,230,0.7); }

.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--cream-warm);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-item {
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-item:hover { color: var(--text-main); }
.tab-item.active { color: var(--brown-warm); border-bottom-color: var(--brown-warm); }

/* ── Booking status badges ────────────────────────────────────────────────────── */

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-pending   { background: #fef3c7; color: #92400e; }
.status-accepted  { background: #d1fae5; color: #065f46; }
.status-declined  { background: #fee2e2; color: #991b1b; }
.status-completed { background: #dbeafe; color: #1e40af; }
.status-cancelled { background: #f3f4f6; color: #6b7280; }

/* ── Booking item ─────────────────────────────────────────────────────────────── */

.booking-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(212,184,150,0.4);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: #fff;
  transition: all var(--transition);
}
.booking-item:hover { box-shadow: var(--shadow-warm); }

.booking-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.booking-details { flex: 1; }
.booking-title { font-weight: 600; margin-bottom: 4px; }
.booking-meta { font-size: 0.85rem; color: var(--text-muted); }
.booking-price { font-weight: 600; color: var(--brown-warm); }

/* ── Profile setup ────────────────────────────────────────────────────────────── */

.setup-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}
.setup-step {
  flex: 1;
  height: 4px;
  background: var(--cream-warm);
  border-radius: 2px;
  transition: background var(--transition);
}
.setup-step.done { background: var(--brown-warm); }
.setup-step.active { background: var(--orange-muted); }

/* ── Photo upload ─────────────────────────────────────────────────────────────── */

.photo-upload-area {
  border: 2px dashed var(--sand);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--cream);
}
.photo-upload-area:hover { border-color: var(--brown-warm); background: var(--cream-warm); }
.photo-upload-area.has-photo { border-style: solid; border-color: var(--brown-warm); }

.photo-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ── Stars rating input ───────────────────────────────────────────────────────── */

.stars-input { display: flex; gap: 4px; }
.star-btn {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sand);
  transition: color var(--transition), transform 0.1s;
  padding: 2px;
}
.star-btn:hover, .star-btn.selected { color: #e8956d; }
.star-btn:active { transform: scale(1.2); }

/* ── Toast ────────────────────────────────────────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.toast {
  background: var(--brown-deep);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(44,26,14,0.25);
  animation: slideUp 0.25s ease;
  max-width: 360px;
  text-align: center;
}
.toast.success { background: var(--green-sage); }
.toast.error { background: #c0392b; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section headers ──────────────────────────────────────────────────────────── */

.section-header {
  margin-bottom: 28px;
}
.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--text-muted); }

/* ── Availability grid ────────────────────────────────────────────────────────── */

.availability-grid { display: flex; flex-direction: column; gap: 8px; }

.avail-day {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.avail-day-name {
  width: 90px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.avail-day input[type="checkbox"] { accent-color: var(--brown-warm); }
.avail-times { display: flex; gap: 8px; flex: 1; align-items: center; }
.avail-times input[type="time"] { flex: 1; padding: 6px 8px; font-size: 0.85rem; }
.avail-times span { font-size: 0.8rem; color: var(--text-muted); }

/* ── Empty state ──────────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Fraunces', serif; color: var(--text-main); margin-bottom: 8px; }

/* ── Review card ──────────────────────────────────────────────────────────────── */

.review-card {
  border: 1px solid rgba(212,184,150,0.4);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #fff;
}
.review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.reviewer-name { font-weight: 600; font-size: 0.92rem; }
.review-date { font-size: 0.8rem; color: var(--text-light); }
.review-text { font-size: 0.9rem; color: var(--text-muted); }

/* ── Mobile responsive ────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .specialist-grid { grid-template-columns: 1fr; }
  .modal { padding: 28px 20px; }
  .booking-item { flex-direction: column; }
}

/* ── Spinner ──────────────────────────────────────────────────────────────────── */

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(139,94,60,0.2);
  border-top-color: var(--brown-warm);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
}

/* ── Profile header ───────────────────────────────────────────────────────────── */

.profile-hero {
  background: linear-gradient(160deg, var(--brown-deep), var(--brown-mid));
  padding: 40px 20px;
  color: var(--cream);
}

.profile-photo-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(245,239,230,0.3);
  background: var(--brown-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 16px;
  overflow: hidden;
}

.profile-name { font-family: 'Fraunces', serif; color: var(--cream); text-align: center; margin-bottom: 8px; }
.profile-rating-lg { text-align: center; color: rgba(245,239,230,0.8); margin-bottom: 16px; }

/* ── Rate display ─────────────────────────────────────────────────────────────── */

.rate-display {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.rate-amount { font-size: 1.5rem; font-weight: 700; font-family: 'Fraunces', serif; }
.rate-period { font-size: 0.85rem; color: var(--text-muted); }

/* ── Form section dividers ────────────────────────────────────────────────────── */

.form-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin: 24px 0 12px;
}
