/* =============================================
   BOOKING.CSS — Pearlhaus Dental
   Full-screen split layout, app-like booking
   Teal left panel, white form right panel
   ============================================= */

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

:root {
  --teal: #2a9d8f;
  --teal-light: #52b5a9;
  --teal-pale: #e8f7f5;
  --teal-dark: #1a6b62;
  --dark: #1a2e2b;
  --white: #ffffff;
  --off: #f8fffe;
  --text: #1d3430;
  --muted: #6b8f8a;
  --border: #d4ecea;
  --gold: #e9c46a;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; height: 100%; }
body { font-family: var(--font-body); overflow-x: hidden; height: 100%; background: var(--dark); }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 52px;
  background: rgba(26,46,43,0.96); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(42,157,143,0.2);
}
.nav-logo {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 700;
  color: var(--white); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo em { font-style: italic; color: var(--teal-light); font-weight: 400; }
.logo-icon { color: var(--teal-light); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.55); text-decoration: none;
  font-size: 0.85rem; font-weight: 500; transition: color 0.3s;
}
.nav-links a:hover { color: var(--teal-light); }
.nav-cta {
  background: rgba(42,157,143,0.2); color: var(--teal-light);
  border: 1px solid rgba(42,157,143,0.4);
  padding: 9px 20px; border-radius: 50px;
  font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: all 0.3s;
  display: flex; align-items: center; gap: 8px;
}
.nav-cta:hover { background: var(--teal); color: white; border-color: var(--teal); }
.hamburger {
  display: none; background: none; border: none;
  color: var(--white); font-size: 1.3rem; cursor: pointer;
}
.mobile-menu {
  position: fixed; inset: 0; background: var(--dark);
  z-index: 2000; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transform: translateX(100%); transition: transform 0.4s;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu ul li { margin: 16px 0; }
.mobile-menu ul li a {
  font-family: var(--font-display); font-size: 1.8rem;
  color: var(--white); text-decoration: none;
}
.close-menu {
  position: absolute; top: 24px; right: 32px;
  background: none; border: none; color: var(--white);
  font-size: 1.5rem; cursor: pointer;
}

/* BOOKING MAIN */
.booking-main {
  display: grid; grid-template-columns: 420px 1fr;
  min-height: 100vh; padding-top: 65px;
}

/* LEFT PANEL */
.booking-left {
  background: linear-gradient(160deg, var(--dark) 0%, var(--teal-dark) 100%);
  position: sticky; top: 65px; height: calc(100vh - 65px);
  overflow-y: auto;
}
.bl-inner {
  padding: 52px 44px;
  min-height: 100%;
  display: flex; flex-direction: column; gap: 36px;
}
.bl-logo {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  color: var(--white); display: flex; align-items: center; gap: 8px;
}
.bl-logo i { color: var(--teal-light); }
.bl-logo em { font-style: italic; color: var(--teal-light); font-weight: 400; }
.booking-left h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700; line-height: 1.15; color: var(--white);
}
.booking-left h1 em { font-style: italic; color: var(--teal-light); font-weight: 400; }
.bl-sub { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.55); }

.booking-info { display: flex; flex-direction: column; gap: 18px; }
.bi-item {
  display: flex; align-items: flex-start; gap: 14px;
}
.bi-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  background: rgba(42,157,143,0.2); color: var(--teal-light);
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.bi-item strong { display: block; font-size: 0.8rem; color: var(--white); margin-bottom: 2px; }
.bi-item span { display: block; font-size: 0.77rem; color: rgba(255,255,255,0.45); line-height: 1.4; }

.bl-trust { display: flex; flex-direction: column; gap: 10px; }
.blt-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8rem; color: rgba(255,255,255,0.6);
}
.blt-item i { color: var(--teal-light); font-size: 0.8rem; }

.bl-testi {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 20px;
  margin-top: auto;
}
.bt-stars { margin-bottom: 10px; }
.bt-stars i { color: var(--gold); font-size: 0.8rem; }
.bl-testi p {
  font-family: var(--font-display); font-style: italic;
  font-size: 0.88rem; line-height: 1.6; color: rgba(255,255,255,0.75); margin-bottom: 8px;
}
.bl-testi span { font-size: 0.72rem; color: rgba(255,255,255,0.35); }

/* RIGHT PANEL */
.booking-right {
  background: var(--off);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 52px 64px;
}
.booking-form-wrap {
  width: 100%; max-width: 620px;
}

/* PROGRESS */
.progress-bar {
  display: flex; align-items: center; gap: 0; margin-bottom: 44px;
}
.pb-step {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.pb-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--border); color: var(--muted);
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.pb-step span { font-size: 0.78rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pb-step.active .pb-dot { background: var(--teal); color: white; }
.pb-step.active span { color: var(--teal); font-weight: 600; }
.pb-step.done .pb-dot { background: var(--teal-dark); color: white; }
.pb-step.done .pb-dot::before { content: '✓'; }
.pb-line { flex: 1; height: 2px; background: var(--border); margin: 0 12px; }

/* FORM STEPS */
.form-step { display: none; animation: stepIn 0.4s ease; }
.form-step.active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.form-step h2 {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 700;
  color: var(--dark); margin-bottom: 8px;
}
.step-sub { font-size: 0.87rem; color: var(--muted); margin-bottom: 28px; line-height: 1.6; }

/* SERVICE SELECT */
.service-select-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px;
}
.ss-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 18px 14px; text-align: center;
  cursor: pointer; transition: all 0.25s;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.ss-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.ss-card.selected { border-color: var(--teal); background: var(--teal-pale); box-shadow: 0 0 0 3px rgba(42,157,143,0.15); }
.ss-card i { font-size: 1.4rem; color: var(--teal); }
.ss-card strong { font-size: 0.82rem; color: var(--dark); font-weight: 600; }
.ss-card span { font-size: 0.7rem; color: var(--muted); }

/* DOCTOR SELECT */
.doctor-select { margin-bottom: 24px; }
.doctor-select label {
  display: block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.doc-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-pill {
  background: var(--white); border: 1.5px solid var(--border);
  color: var(--text); padding: 8px 16px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: all 0.25s; font-family: var(--font-body);
}
.doc-pill:hover { border-color: var(--teal); color: var(--teal); }
.doc-pill.active { background: var(--teal); border-color: var(--teal); color: white; }

/* MINI CALENDAR */
.calendar-mini {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 20px; margin-bottom: 24px;
}
.cm-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cm-header span { font-weight: 700; font-size: 0.9rem; color: var(--dark); }
.cm-nav {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 6px 10px; border-radius: 8px; font-size: 0.85rem;
  transition: all 0.2s;
}
.cm-nav:hover { background: var(--teal-pale); color: var(--teal); }
.cm-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-bottom: 8px;
}
.cm-days span { text-align: center; font-size: 0.7rem; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cm-dates { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cd-day, .cd-empty {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; border-radius: 50%; cursor: pointer;
}
.cd-day.avail { color: var(--text); transition: all 0.2s; }
.cd-day.avail:hover { background: var(--teal-pale); color: var(--teal); }
.cd-day.selected { background: var(--teal) !important; color: white !important; }
.cd-day.disabled { color: var(--border); cursor: not-allowed; }
.cd-day.limited { color: var(--gold); }
.cd-empty { pointer-events: none; }

/* TIME GRID */
.time-picker { margin-bottom: 28px; }
.time-picker label {
  display: block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.time-picker label span { color: var(--teal); text-transform: none; letter-spacing: 0; }
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tg-slot {
  padding: 12px; border-radius: 10px; text-align: center;
  font-size: 0.85rem; font-weight: 600;
  font-family: var(--font-body); cursor: pointer; transition: all 0.2s; border: none;
}
.tg-slot.avail { background: var(--white); color: var(--teal); border: 1.5px solid var(--border); }
.tg-slot.avail:hover { border-color: var(--teal); background: var(--teal-pale); }
.tg-slot.selected { background: var(--teal) !important; color: white !important; border-color: var(--teal) !important; }
.tg-slot.taken { background: #f5f5f5; color: #ccc; text-decoration: line-through; cursor: not-allowed; }

/* PATIENT FORM */
.booking-summary {
  background: var(--teal-pale); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  margin-bottom: 24px; display: flex; gap: 20px; flex-wrap: wrap;
}
.bs-item {
  display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 200px;
}
.bs-item i { color: var(--teal); margin-top: 2px; }
.bs-item strong { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.bs-item span { font-size: 0.87rem; color: var(--dark); font-weight: 600; }

.patient-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-group { display: flex; flex-direction: column; gap: 6px; }
.pf-group label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.pf-group input, .pf-group textarea {
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text); padding: 12px 15px;
  font-family: var(--font-body); font-size: 0.88rem;
  border-radius: 10px; outline: none; transition: border-color 0.3s;
}
.pf-group input:focus, .pf-group textarea:focus {
  border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,157,143,0.1);
}
.pf-group textarea { resize: vertical; min-height: 80px; }
.radio-row { display: flex; gap: 20px; }
.radio-opt {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.87rem; color: var(--text); cursor: pointer;
}
.radio-opt input { accent-color: var(--teal); width: 16px; height: 16px; }
.pf-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.78rem; color: var(--muted); line-height: 1.6;
}
.pf-check input { accent-color: var(--teal); margin-top: 2px; flex-shrink: 0; }

/* STEP NAV */
.step-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.next-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--teal); color: white;
  padding: 13px 28px; border-radius: 50px;
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(42,157,143,0.3);
}
.next-btn:hover:not(:disabled) { background: var(--dark); transform: translateY(-1px); }
.next-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.confirm-btn { background: #27ae60; box-shadow: 0 4px 16px rgba(39,174,96,0.3); }
.confirm-btn:hover { background: #1e8449; }
.back-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1.5px solid var(--border);
  color: var(--muted); padding: 12px 22px; border-radius: 50px;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all 0.3s;
}
.back-btn:hover { border-color: var(--teal); color: var(--teal); }

/* SUCCESS */
.success-step { text-align: center; padding: 20px 0; }
.success-anim { margin-bottom: 28px; }
.success-circle {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, #27ae60, #1e8449);
  color: white; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  animation: popIn 0.5s ease;
  box-shadow: 0 8px 32px rgba(39,174,96,0.3);
}
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
.success-details {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 20px;
  margin: 24px auto; max-width: 400px; text-align: left;
}
.sd-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.sd-row:last-child { border-bottom: none; }
.sd-row i { color: var(--teal); width: 20px; text-align: center; }
.sd-row span { font-size: 0.87rem; color: var(--text); }
.success-actions { display: flex; gap: 16px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.btn-teal-block {
  background: var(--teal); color: white;
  padding: 13px 28px; border-radius: 50px;
  font-size: 0.88rem; font-weight: 700;
  text-decoration: none; transition: all 0.3s;
  display: inline-block;
}
.btn-teal-block:hover { background: var(--dark); }
.btn-ghost-block {
  border: 1.5px solid var(--border); color: var(--text);
  padding: 13px 28px; border-radius: 50px;
  font-size: 0.88rem; font-weight: 500;
  text-decoration: none; transition: all 0.3s;
  display: inline-block;
}
.btn-ghost-block:hover { border-color: var(--teal); color: var(--teal); }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .nav { padding: 14px 32px; }
  .nav-links { display: none; }
  .hamburger { display: block; }
  .booking-main { grid-template-columns: 1fr; }
  .booking-left { position: static; height: auto; }
  .bl-inner { padding: 40px 32px; }
  .booking-right { padding: 40px 32px; }
}
@media (max-width: 640px) {
  .bl-inner { padding: 32px 24px; }
  .booking-right { padding: 32px 24px; }
  .service-select-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-row { grid-template-columns: 1fr; }
  .time-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-bar { gap: 4px; }
  .pb-step span { display: none; }
  .pb-line { margin: 0 6px; }
}
