/* =====================================================
   OHC — Booking Page Styles
   ===================================================== */

/* ─── NAV ─── */
.booking-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky; top: 0; z-index: var(--z-nav);
  box-shadow: var(--shadow-sm);
}
.brand-icon-sm {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #1B2E6B, #CC1414);
  border-radius: 8px;
}
.brand-name-dark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}

.booking-steps-mini {
  display: flex;
  align-items: center;
  gap: 4px;
}
.step-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-weight: 500;
  transition: var(--ease-fast);
}
.step-mini span {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-mini.active { color: var(--primary); background: var(--primary-xlight); }
.step-mini.active span { background: var(--primary); color: white; }
.step-mini.completed { color: var(--success); }
.step-mini.completed span { background: var(--success); color: white; }

@media(max-width:768px) { .booking-steps-mini { display: none; } }

/* ─── PROGRESS ─── */
.booking-progress {
  height: 3px;
  background: var(--border);
}
.booking-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
}

/* ─── MAIN LAYOUT ─── */
.booking-main { padding: var(--sp-xl) 0 var(--sp-3xl); }
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-xl);
  align-items: start;
}

/* ─── STEP CONTENT ─── */
.booking-step { animation: fadeIn 0.3s ease; }
.step-header { margin-bottom: var(--sp-xl); }
.step-header h2 { margin-bottom: 4px; }

/* Search */
.booking-search {
  position: relative;
}
.bs-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.booking-search .form-control { padding-left: 42px; }

/* Tests List */
.booking-tests-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.booking-test-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  transition: var(--ease);
  cursor: pointer;
}
.booking-test-row:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.booking-test-row.in-cart { border-color: var(--success); background: #F0FDF4; }

.btr-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--primary-xlight);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btr-icon svg { width: 20px; height: 20px; color: var(--primary); }
.btr-icon.accent { background: var(--accent-xlight); }
.btr-icon.accent svg { color: var(--accent); }
.btr-icon.success { background: #D1FAE5; }
.btr-icon.success svg { color: var(--success); }
.btr-icon.warning { background: #FEF3C7; }
.btr-icon.warning svg { color: var(--warning); }

.btr-info { flex: 1; }
.btr-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.btr-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-top: 4px;
  flex-wrap: wrap;
}
.btr-report { font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.btr-report svg { width: 10px; height: 10px; }

.btr-price-wrap { text-align: right; flex-shrink: 0; }
.btr-price { font-weight: 700; font-size: 1.05rem; color: var(--primary); }
.btr-mrp { font-size: 0.72rem; color: var(--text-muted); text-decoration: line-through; }

.btn-add-test {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-xlight);
  border: 2px solid var(--primary);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--ease);
  cursor: pointer;
}
.btn-add-test:hover, .btn-add-test.added { background: var(--success); border-color: var(--success); color: white; }
.btn-add-test svg { width: 16px; height: 16px; }

/* ─── FORM SECTIONS ─── */
.form-section {}
.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--border);
}
.form-section-title svg { width: 18px; height: 18px; color: var(--primary); }

/* Date Picker */
.date-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.date-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--ease);
  background: var(--surface);
}
.date-item:hover { border-color: var(--primary); background: var(--primary-xlight); }
.date-item.selected { border-color: var(--primary); background: var(--primary); color: white; }
.date-item.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.date-day { font-size: 0.65rem; color: inherit; opacity: 0.7; text-transform: uppercase; }
.date-num { font-weight: 700; font-size: 1rem; }
.date-item.selected .date-day { opacity: 0.8; color: rgba(255,255,255,0.8); }

/* Time Slots */
.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.time-slot {
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  text-align: center;
  cursor: pointer;
  transition: var(--ease);
  background: var(--surface);
}
.time-slot:hover { border-color: var(--primary); background: var(--primary-xlight); }
.time-slot.selected { border-color: var(--primary); background: var(--primary); color: white; }
.time-slot.unavailable { opacity: 0.4; cursor: not-allowed; background: var(--bg); pointer-events: none; }
.time-slot-time { font-weight: 700; font-size: 0.9rem; }
.time-slot-slots { font-size: 0.72rem; margin-top: 2px; opacity: 0.7; }

/* Patient Cards */
.patient-cards { display: flex; flex-direction: column; gap: var(--sp-lg); }
.patient-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
}
.patient-card-header { display: flex; align-items: center; justify-content: space-between; }

/* File Upload */
.file-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
  text-align: center;
  cursor: pointer;
  transition: var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.file-upload-zone:hover { border-color: var(--primary); background: var(--primary-xlight); color: var(--primary); }
.file-upload-zone svg { width: 28px; height: 28px; }

/* ─── PAYMENT ─── */
.order-summary {}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.order-row:last-child { border-bottom: none; }
.order-total { font-weight: 700; font-size: 1.05rem; color: var(--text); padding-top: var(--sp-sm); }

.coupon-section {}
.coupon-input .form-control { font-family: var(--font-tag); letter-spacing: 0.06em; text-transform: uppercase; }

.payment-methods { display: flex; flex-direction: column; gap: var(--sp-sm); }
.payment-option { cursor: pointer; }
.payment-option input[type="radio"] { display: none; }
.payment-card {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: var(--ease);
}
.payment-option input:checked + .payment-card {
  border-color: var(--primary);
  background: var(--primary-xlight);
}
.payment-card svg { width: 24px; height: 24px; color: var(--text-muted); flex-shrink: 0; }
.payment-option input:checked + .payment-card svg { color: var(--primary); }
.payment-card strong { display: block; font-size: 0.9rem; }
.payment-card p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }

/* ─── CART ─── */
.booking-cart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 80px;
}
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cart-header h4 { display: flex; align-items: center; gap: 8px; }
.cart-header h4 svg { width: 18px; height: 18px; color: var(--primary); }

.cart-items {
  padding: var(--sp-md);
  min-height: 120px;
  max-height: 360px;
  overflow-y: auto;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--sp-xl);
  color: var(--text-muted);
}
.cart-empty svg { width: 32px; height: 32px; opacity: 0.4; }

.cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: var(--sp-sm);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-name { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.cart-item-price { font-size: 0.85rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.cart-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-light);
  padding: 0;
  transition: var(--ease-fast);
}
.cart-item-remove:hover { color: var(--error); }
.cart-item-remove svg { width: 14px; height: 14px; }

.cart-summary {
  padding: var(--sp-md) var(--sp-lg);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.cart-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
}
.cart-total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.cart-home-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #D1FAE5;
  color: #065F46;
  border-radius: var(--r-md);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 8px;
}
.cart-home-badge svg { width: 14px; height: 14px; }

.cart-nav {
  padding: var(--sp-md) var(--sp-lg);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--sp-sm);
}

/* ─── SUCCESS MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: var(--z-modal);
  backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: fadeUp 0.3s ease;
}
.success-icon {
  width: 72px; height: 72px;
  background: #D1FAE5;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-lg);
}
.success-icon svg { width: 36px; height: 36px; color: var(--success); }

.success-details {
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  text-align: left;
}
.success-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
.success-row:last-child { border-bottom: none; }

/* Mobile Cart Toggle - Hidden by default */
.mobile-cart-toggle { display: none; width: 32px; height: 32px; padding: 0; background: var(--primary-xlight); color: var(--primary); border: 1px solid var(--primary-light); }
.mobile-cart-toggle:hover { background: var(--primary); color: white; }
.mobile-cart-toggle svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.cart-header { transition: background 0.3s ease; cursor: pointer; }

/* Responsive */
@media(max-width:1024px) {
  .booking-main { padding-bottom: 160px; }
  .booking-layout { grid-template-columns: 1fr; }
  .mobile-cart-toggle { display: flex; }
  
  .booking-cart {
    position: fixed;
    top: auto;
    bottom: 0; left: 0; right: 0;
    z-index: 99;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-height: 50vh;
    overflow-y: auto;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .booking-cart .cart-items { max-height: 120px; }
  
  /* Minimized state */
  .booking-cart.cart-minimized {
    max-height: 64px; /* Approx header height */
    overflow: hidden;
  }
  .booking-cart.cart-minimized .cart-header {
    background: var(--surface);
    border-bottom: none;
  }
  .booking-cart.cart-minimized #cartToggleBtn svg {
    transform: rotate(180deg); /* point up when minimized, so clicking expands */
  }
}
