/* ═══════════════════════════════════════════════════════════
   FREQ BOOKING — MINIMAL & CLEAN STYLESHEET
   Sleek mobile-first design, crystal clear typography,
   zero clutter, rich black-to-royal-blue aesthetic.
═══════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* ── Colors ── */
  --bg-black:        #000000;
  --bg-deep:         #000517;
  --bg-royal:        #000e38;

  --surface-1:       rgba(255, 255, 255, 0.035);
  --surface-2:       rgba(255, 255, 255, 0.065);
  --surface-hover:   rgba(255, 255, 255, 0.1);

  --border:          rgba(255, 255, 255, 0.08);
  --border-focus:    rgba(96, 165, 250, 0.5);

  --accent:          #3b82f6;
  --accent-bright:   #60a5fa;
  --accent-glow:     rgba(59, 130, 246, 0.25);

  --text-1:          #ffffff;
  --text-2:          #cbd5e1;
  --text-3:          #818cf8;
  --text-muted:      #94a3b8;
  --text-error:      #ef4444;

  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       14px;
  --radius-full:     9999px;

  --trans:           0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-slow:      0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 15px;
}

body {
  min-height: 100vh;
  background-color: var(--bg-black);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
  position: relative;
}

/* Background gradient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 110% 70% at 50% 115%, rgba(0, 45, 210, 0.4) 0%, transparent 65%),
    radial-gradient(ellipse 70% 50% at 20% 100%, rgba(0, 20, 150, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #000000 0%, #000416 45%, #00092c 100%);
  z-index: 0;
  pointer-events: none;
}

#app {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════
   HEADER & NAVIGATION
═══════════════════════════════════════════════════════════ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topnav .logo-img {
  height: 32px;
  width: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.nav-center {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════
   WIZARD CONTAINER
═══════════════════════════════════════════════════════════ */
.wizard-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}
.step-indicator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--surface-2);
  z-index: 1;
  transform: translateY(-50%);
}
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  z-index: 2;
  transition: var(--trans);
}
.step-dot.active {
  border-color: var(--accent);
  color: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-glow);
}
.step-dot.completed {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   SCREENS (STEPS)
═══════════════════════════════════════════════════════════ */
.step-screen {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}
.step-screen.active {
  display: block;
}

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

.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}
.step-desc {
  color: var(--text-2);
  text-align: center;
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════
   CARDS & GRIDS
═══════════════════════════════════════════════════════════ */
.service-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 600px; /* Prevent layout shift on mobile while fetching */
}
@media (min-width: 480px) {
  .service-cards {
    grid-template-columns: repeat(3, 1fr);
    min-height: 230px; /* Prevent layout shift on desktop while fetching */
  }
}

.card-btn {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  color: var(--text-1);
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  outline: none;
}
.card-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-focus);
}
.card-btn.selected {
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 20px var(--accent-glow);
}

.card-icon {
  color: var(--accent-bright);
}
.card-title {
  font-weight: 600;
  font-size: 1.1rem;
}
.card-price {
  font-size: 0.9rem;
  color: var(--text-3);
  margin-top: auto;
}

/* ═══════════════════════════════════════════════════════════
   DATE / TIME SELECTION
═══════════════════════════════════════════════════════════ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.date-btn {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  color: var(--text-1);
  cursor: pointer;
  transition: var(--trans);
  outline: none;
}
.date-btn:hover { background: var(--surface-2); }
.date-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.date-day { font-size: 0.8rem; color: var(--text-2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.date-btn.selected .date-day { color: rgba(255,255,255,0.8); }
.date-num { font-size: 1.2rem; font-weight: 700; }

.time-slots {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.time-slots.active {
  display: grid;
}
.time-btn {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--trans);
}
.time-btn:hover { background: var(--surface-2); color: var(--text-1); }
.time-btn.selected {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* ═══════════════════════════════════════════════════════════
   FORMS & INPUTS
═══════════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-1);
  font-size: 1rem;
  transition: var(--trans);
  outline: none;
}
.form-input::placeholder {
  color: var(--text-muted);
}
.form-input:focus {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input option, .form-input optgroup {
  background-color: #000416; /* Dark background so white text is visible */
  color: #fff;
}
.form-error {
  color: var(--text-error);
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}
.os-cards {
  display: flex;
  gap: 12px;
}
.os-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-1);
  cursor: pointer;
  transition: var(--trans);
  outline: none;
  font-size: 1rem;
}
.os-btn:hover {
  background: var(--surface-2);
}
.os-btn.selected {
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}
.btn {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--trans);
  outline: none;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn-primary:hover {
  background: var(--accent-bright);
}
.btn-primary:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface-1);
  color: var(--text-1);
}

/* ═══════════════════════════════════════════════════════════
   SUCCESS
═══════════════════════════════════════════════════════════ */
.success-wrap {
  text-align: center;
  padding: 40px 0;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.summary-box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  margin-bottom: 32px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child {
  border-bottom: none;
}
.summary-label { color: var(--text-muted); }
.summary-val { font-weight: 600; text-align: right; }
