/**
 * Aivo Public Web Styles — v2 (Brand Identity redesign)
 * Mobile-first design. All values use CSS custom properties.
 */

/* ─── Brand Identity Tokens ────────────────────────────────────────── */

:root {
  /* Primary: Azul Noite */
  --primary: #0F2D52;
  --primary-variant: #1A4170;
  --on-primary: #FFFFFF;
  --primary-container: #D6E8F7;
  --on-primary-container: #0F2D52;

  /* Secondary: Azul SP */
  --secondary: #0891B2;
  --secondary-bright: #0EA5E9;
  --on-secondary: #FFFFFF;
  --secondary-container: #CDEEF7;
  --on-secondary-container: #014D63;

  /* Tertiary: Verde Receita */
  --tertiary: #059669;
  --on-tertiary: #FFFFFF;
  --tertiary-container: #D1FAE5;
  --on-tertiary-container: #065F46;

  /* Accent: Laranja SP */
  --accent: #F97316;
  --accent-container: #FEF3C7;
  --on-accent-container: #92400E;

  /* Error */
  --error: #DC2626;
  --error-container: #FEE2E2;
  --on-error-container: #991B1B;

  /* Warning */
  --warning: #D97706;
  --warning-container: #FEF3C7;
  --on-warning-container: #92400E;

  /* Surfaces */
  --background: #EBF2F9;
  --surface: #FFFFFF;
  --surface-variant: #E2EBF2;
  --on-surface: #0F2D52;
  --on-surface-variant: #4A6785;
  --on-surface-subtle: #7A9AB5;
  --outline: #CBD5E1;
  --outline-variant: #E2E8F0;

  /* Aurora */
  --aurora: linear-gradient(135deg, #0A1628 0%, #0F2D52 60%, #0891B2 100%);
  --glass-bg: rgba(255, 255, 255, 0.13);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-text: rgba(255, 255, 255, 0.9);
  --glass-subtitle: rgba(255, 255, 255, 0.55);
  --glass-muted: rgba(255, 255, 255, 0.4);

  /* Typography */
  --sans: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", monospace;

  /* Shapes */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-xxl: 32px;

  /* Elevation */
  --shadow-1: 0 1px 3px rgba(15, 45, 82, 0.08);
  --shadow-2: 0 2px 8px rgba(15, 45, 82, 0.10);
  --shadow-3: 0 4px 14px rgba(15, 45, 82, 0.12);
  --shadow-4: 0 8px 24px rgba(15, 45, 82, 0.14);
}

/* ─── Reset & Base ─────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  color: var(--on-surface);
  background-color: var(--background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--on-surface-variant);
}

/* ─── Typography ───────────────────────────────────────────────────── */

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--on-surface);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.125rem; }

/* ─── Skeleton Loading ─────────────────────────────────────────────── */

.skeleton-container {
  min-height: 100vh;
  background: var(--background);
}

.skeleton-cover {
  height: 200px;
  background: var(--aurora);
  position: relative;
}

.skeleton-identity {
  background: var(--surface);
  padding: var(--sp-xl) var(--sp-xl) var(--sp-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -36px;
  position: relative;
  z-index: 1;
}

.skeleton-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  margin-bottom: var(--sp-md);
}

.skeleton-line {
  height: 14px;
  border-radius: var(--radius-xs);
  margin-bottom: var(--sp-sm);
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w30 { width: 30%; }

.skeleton-tabs {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-xl);
  background: var(--surface);
  border-bottom: 1.5px solid var(--outline-variant);
}

.skeleton-tab {
  flex: 1;
  height: 32px;
  border-radius: var(--radius-xs);
}

.skeleton-cards {
  padding: var(--sp-lg) var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.skeleton-card {
  height: 80px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.shimmer {
  background: linear-gradient(90deg, var(--surface-variant) 25%, #f0f5fa 50%, var(--surface-variant) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
}

/* ─── Loading Screen (simple spinner fallback) ─────────────────────── */

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: var(--sp-lg);
  color: var(--on-surface-variant);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--outline-variant);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner.small {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Error Screen ─────────────────────────────────────────────────── */

.error-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-xl);
  background: var(--background);
}

.error-content {
  text-align: center;
  max-width: 360px;
}

.error-emoji {
  font-size: 3.5rem;
  margin-bottom: var(--sp-lg);
}

.error-content h2 {
  margin-bottom: var(--sp-sm);
  color: var(--on-surface);
}

.error-content p {
  margin-bottom: var(--sp-xl);
  color: var(--on-surface-variant);
}

/* ─── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
  min-height: 44px;
  padding: 10px 20px;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover { background-color: var(--primary-variant); }

.btn-secondary {
  background-color: var(--secondary);
  color: var(--on-secondary);
}

.btn-secondary:hover { background-color: var(--secondary-bright); }

.btn-outlined {
  background-color: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outlined:hover { background-color: rgba(15, 45, 82, 0.06); }

.btn-text {
  background: none;
  color: var(--secondary);
  padding: var(--sp-sm) var(--sp-md);
  font-weight: 500;
}

.btn-text:hover { background-color: rgba(8, 145, 178, 0.06); }

.btn-full { width: 100%; }

.btn-icon {
  background: none;
  border: none;
  color: var(--on-surface-variant);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;
}

.btn-icon:hover { background-color: rgba(0, 0, 0, 0.06); }

/* ─── Cover Hero ───────────────────────────────────────────────────── */

.cover-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--aurora);
}

.cover-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.cover-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10, 22, 40, 0.6) 100%);
  z-index: 1;
}

.cover-emoji {
  position: absolute;
  bottom: var(--sp-lg);
  right: var(--sp-xl);
  font-size: 88px;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
  line-height: 1;
}

.cover-top-bar {
  position: absolute;
  top: var(--sp-md);
  left: var(--sp-md);
  right: var(--sp-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.cover-actions {
  display: flex;
  gap: var(--sp-sm);
}

.glass-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--glass-text);
  cursor: pointer;
  transition: background 0.2s;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ─── Identity Section ─────────────────────────────────────────────── */

.identity-section {
  background: var(--surface);
  padding: 0 var(--sp-xl) var(--sp-lg);
  text-align: center;
  position: relative;
}

.identity-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1.5rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: -36px;
  box-shadow: var(--shadow-3);
  position: relative;
  z-index: 3;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: var(--sp-xs) 10px;
  border-radius: 6px;
  margin-top: var(--sp-sm);
}

.identity-section h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--on-surface);
  letter-spacing: -0.3px;
  margin: var(--sp-sm) 0 var(--sp-xs);
}

.identity-category {
  color: var(--on-surface-variant);
  font-size: 0.8125rem;
  margin-bottom: var(--sp-sm);
}

.identity-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
}

.meta-rating {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.875rem;
}

.meta-count {
  font-size: 0.75rem;
  color: var(--secondary);
}

/* ─── Tabs ─────────────────────────────────────────────────────────── */

.tabs-nav {
  display: flex;
  background: var(--surface);
  border-bottom: 1.5px solid var(--outline-variant);
  padding: 0 var(--sp-xl);
  position: sticky;
  top: 0;
  z-index: 10;
}

.tabs-nav .tab {
  flex: 1;
  text-align: center;
  padding: 10px var(--sp-xs);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--on-surface-variant);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.tabs-nav .tab.active {
  color: var(--on-surface);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
  padding: 0;
  padding-bottom: var(--sp-sm);
}

.tab-panel.active {
  display: block;
}

/* ─── Service Cards ────────────────────────────────────────────────── */

.services-list {
  padding: var(--sp-lg) var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.service-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}

.service-card .badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 3px var(--sp-sm);
  border-radius: 6px;
  margin-bottom: var(--sp-sm);
  margin-right: var(--sp-xs);
}

.badge-hot {
  background: var(--accent-container);
  color: var(--on-accent-container);
}

.badge-promo {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.badge-new {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}

.svc-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-md);
}

.svc-body {
  flex: 1;
  min-width: 0;
}

.svc-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: var(--sp-xs);
}

.svc-desc {
  font-size: 0.6875rem;
  color: var(--on-surface-variant);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.svc-meta {
  font-size: 0.6875rem;
  color: var(--on-surface-subtle);
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.svc-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

.svc-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--on-surface);
}

.btn-book-service {
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: var(--sp-sm) 14px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-book-service:hover { background: var(--primary-variant); }

/* ─── Rating Hero ──────────────────────────────────────────────────── */

.rating-hero {
  display: flex;
  gap: var(--sp-xl);
  padding: var(--sp-xl);
  background: var(--surface);
  margin: var(--sp-lg) var(--sp-xl) 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
}

.rating-left {
  text-align: center;
  min-width: 80px;
}

.rating-big {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--on-surface);
  line-height: 1;
}

.rating-stars {
  color: var(--accent);
  font-size: 0.875rem;
  letter-spacing: 2px;
  margin: var(--sp-xs) 0;
}

.rating-total {
  font-size: 0.6875rem;
  color: var(--on-surface-variant);
}

.rating-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.dist-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  width: 12px;
  text-align: right;
}

.dist-track {
  flex: 1;
  height: 6px;
  background: var(--surface-variant);
  border-radius: 3px;
  overflow: hidden;
}

.dist-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.dist-fill-5 { background: var(--tertiary); }
.dist-fill-4 { background: var(--secondary); }
.dist-fill-3 { background: var(--accent); }
.dist-fill-2 { background: var(--warning); }
.dist-fill-1 { background: var(--error); }

.dist-count {
  font-size: 0.625rem;
  color: var(--on-surface-subtle);
  width: 20px;
}

/* ─── Review Cards ─────────────────────────────────────────────────── */

.reviews-list {
  padding: var(--sp-lg) var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.review-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-1);
}

.review-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-sm);
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-weight: 700;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-info {
  flex: 1;
  min-width: 0;
}

.review-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--on-surface);
}

.review-service-name {
  font-size: 0.6875rem;
  color: var(--on-surface-variant);
}

.review-date {
  font-size: 0.6875rem;
  color: var(--on-surface-subtle);
  flex-shrink: 0;
}

.review-stars {
  margin-bottom: var(--sp-sm);
  color: var(--accent);
  font-size: 0.8125rem;
  letter-spacing: 1px;
}

.review-text {
  font-size: 0.875rem;
  color: var(--on-surface);
  line-height: 1.5;
  margin: 0;
}

.review-response {
  margin-top: var(--sp-md);
  padding: var(--sp-md);
  background: var(--surface-variant);
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--primary);
}

.response-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  margin-bottom: var(--sp-xs);
}

.review-response p {
  font-size: 0.8125rem;
  color: var(--on-surface);
  line-height: 1.5;
  margin: 0;
}

/* ─── Tab Info: Trust Stats ────────────────────────────────────────── */

.trust-stats {
  display: flex;
  justify-content: space-around;
  padding: var(--sp-xl);
  background: var(--surface);
  margin: var(--sp-lg) var(--sp-xl) 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
}

.trust-stat {
  text-align: center;
}

.trust-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--on-surface);
  line-height: 1;
}

.trust-stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  margin-top: var(--sp-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Tab Info: Hours ──────────────────────────────────────────────── */

.info-section-card {
  background: var(--surface);
  margin: var(--sp-md) var(--sp-xl) 0;
  border-radius: var(--radius-sm);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-1);
}

.info-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: var(--sp-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hours-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--outline-variant);
  font-size: 0.8125rem;
}

.hours-row:last-child { border-bottom: none; }

.hours-row.hours-today {
  background: var(--primary-container);
  margin: 0 calc(var(--sp-lg) * -1);
  padding: var(--sp-sm) var(--sp-lg);
  border-radius: var(--radius-xs);
  border-bottom: none;
}

.hours-day {
  font-weight: 600;
  color: var(--on-surface);
}

.hours-time {
  color: var(--on-surface-variant);
}

.hours-closed {
  color: var(--error);
  font-style: italic;
  font-size: 0.75rem;
}

.hours-open-badge {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--tertiary);
  margin-left: var(--sp-sm);
}

/* ─── Tab Info: Contact ────────────────────────────────────────────── */

.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
  padding: var(--sp-sm) 0;
  text-decoration: none;
}

a.contact-row:hover { color: var(--secondary); }

/* ─── Sticky Bottom Bar ────────────────────────────────────────────── */

.sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  padding: var(--sp-md) var(--sp-xl);
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
  box-shadow: 0 -2px 12px rgba(15, 45, 82, 0.1);
  z-index: 20;
}

.btn-book-now {
  flex: 1;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: var(--sp-md) var(--sp-xl);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-3);
  transition: background 0.2s;
  min-height: 48px;
}

.btn-book-now:hover { background: var(--primary-variant); }

.btn-share-sm {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--surface-variant);
  border: none;
  font-size: 1.125rem;
  color: var(--on-surface-variant);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-share-sm:hover { background: var(--outline); }

/* ─── Empty State ──────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: var(--sp-xxl) var(--sp-lg);
  color: var(--on-surface-subtle);
  font-size: 0.875rem;
}

/* ─── Footer ───────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: var(--sp-xxl) var(--sp-lg) 100px;
  background: var(--surface);
  margin-top: var(--sp-sm);
  color: var(--on-surface-subtle);
  font-size: 0.8125rem;
}

.footer-logo {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.footer-cta { margin-top: var(--sp-sm); }

.footer-cta a {
  color: var(--secondary);
  font-weight: 500;
}

/* ─── Booking Modal ────────────────────────────────────────────────── */

.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.booking-modal.hidden { display: none; }

.booking-modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--sp-xl) var(--sp-lg) var(--sp-xxl);
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
}

.modal-header h2 {
  font-size: 1.125rem;
  color: var(--on-surface);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--on-surface-variant);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.modal-close:hover { background-color: var(--surface-variant); }

/* ─── Step Indicator ───────────────────────────────────────────────── */

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--sp-xl);
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--outline-variant);
  color: var(--on-surface-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.step-dot.active {
  background: var(--primary);
  color: var(--on-primary);
}

.step-dot.completed {
  background: var(--secondary);
  color: var(--on-secondary);
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--outline-variant);
}

/* ─── Calendar ─────────────────────────────────────────────────────── */

.calendar-container { user-select: none; }

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-md);
}

.calendar-month-label {
  font-weight: 600;
  font-size: 1rem;
  text-transform: capitalize;
  color: var(--on-surface);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-xs);
}

.calendar-header { margin-bottom: var(--sp-xs); }

.calendar-day-name {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--on-surface-subtle);
  padding: var(--sp-xs) 0;
}

.calendar-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  border-radius: var(--radius-xs);
  cursor: default;
}

.calendar-day {
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.15s;
}

.calendar-day:hover:not(.disabled):not(.selected) {
  background-color: var(--primary-container);
}

.calendar-day.today { border: 2px solid var(--primary); }

.calendar-day.selected {
  background-color: var(--primary);
  color: var(--on-primary);
}

.calendar-day.disabled {
  color: var(--outline);
  cursor: not-allowed;
}

.calendar-cell.empty { cursor: default; }

/* ─── Time Slots ───────────────────────────────────────────────────── */

.selected-date {
  font-size: 0.875rem;
  color: var(--on-surface-variant);
  margin-bottom: var(--sp-lg);
  text-transform: capitalize;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

.btn-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px var(--sp-sm);
  border: 1.5px solid var(--outline-variant);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--on-surface);
  cursor: pointer;
  min-height: 44px;
  transition: all 0.15s;
}

.btn-slot:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-container);
}

.btn-slot:active {
  background-color: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

/* ─── Booking Summary ──────────────────────────────────────────────── */

.booking-summary {
  background: var(--surface-variant);
  border-radius: var(--radius-sm);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-xl);
  font-size: 0.875rem;
  color: var(--on-surface);
}

.booking-summary p { margin-bottom: var(--sp-xs); }
.booking-summary p:last-child { margin-bottom: 0; }

/* ─── Form ─────────────────────────────────────────────────────────── */

.form-group { margin-bottom: var(--sp-lg); }

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--on-surface);
  margin-bottom: 6px;
}

.optional {
  font-weight: 400;
  color: var(--on-surface-subtle);
}

.form-input {
  width: 100%;
  padding: var(--sp-md);
  border: 1.5px solid var(--outline-variant);
  border-radius: var(--radius-xs);
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--on-surface);
  background: var(--surface);
  transition: border-color 0.2s;
  outline: none;
  min-height: 44px;
}

.form-input:focus { border-color: var(--primary); }

.form-input::placeholder { color: var(--on-surface-subtle); }

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

.error-message {
  background: var(--error-container);
  color: var(--error);
  font-size: 0.8125rem;
  padding: var(--sp-md);
  border-radius: var(--radius-xs);
  margin-top: var(--sp-md);
}

/* ─── Booking Loading ──────────────────────────────────────────────── */

.booking-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 10;
  color: var(--on-surface-variant);
  font-size: 0.875rem;
}

/* ─── Success State ────────────────────────────────────────────────── */

.success-state {
  text-align: center;
  padding: var(--sp-lg) 0;
}

.success-emoji {
  font-size: 3.5rem;
  margin-bottom: var(--sp-lg);
  animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-state h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-sm);
  color: var(--on-surface);
}

.success-state p {
  color: var(--on-surface-variant);
  margin-bottom: var(--sp-xl);
}

.success-state .btn { margin-bottom: var(--sp-sm); }

/* ─── Toast ────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--sp-md) var(--sp-xl);
  border-radius: var(--radius-xs);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 2000;
  transition: bottom 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-4);
}

.toast.show { bottom: 88px; }

/* ─── Service Mode Badge ───────────────────────────────────────────── */

.service-mode-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: 6px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  margin-top: var(--sp-sm);
}

/* ─── Landing Page ─────────────────────────────────────────────────── */

.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-xxl) var(--sp-xl);
  background: linear-gradient(180deg, var(--surface) 0%, var(--background) 100%);
}

.landing-logo {
  width: 80px;
  height: 80px;
  margin-bottom: var(--sp-xl);
}

.landing-page h1 {
  font-size: 1.75rem;
  margin-bottom: var(--sp-md);
}

.landing-page p {
  color: var(--on-surface-variant);
  max-width: 360px;
  margin-bottom: var(--sp-xxl);
  font-size: 1rem;
  line-height: 1.6;
}

.landing-footer {
  margin-top: auto;
  padding-top: 48px;
  color: var(--on-surface-subtle);
  font-size: 0.75rem;
}

/* ─── 404 Page ─────────────────────────────────────────────────────── */

.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-xxl) var(--sp-xl);
}

.page-404 h1 {
  font-size: 4rem;
  font-weight: 700;
  color: var(--outline);
  margin-bottom: var(--sp-sm);
}

.page-404 h2 { margin-bottom: var(--sp-sm); }

.page-404 p {
  color: var(--on-surface-variant);
  margin-bottom: var(--sp-xl);
}

/* ─── Desktop / Tablet Adaptations ─────────────────────────────────── */

@media (min-width: 640px) {
  .cover-hero { height: 240px; }

  .booking-modal-content {
    max-width: 480px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    max-height: 85vh;
  }

  .booking-modal { align-items: center; }

  .time-slots { grid-template-columns: repeat(4, 1fr); }

  .sticky-bottom-bar {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

@media (min-width: 768px) {
  .profile-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .landing-page h1 { font-size: 2.5rem; }

  .landing-page p {
    font-size: 1.125rem;
    max-width: 480px;
  }
}
