/* file: assets/css/bookings.css */
/**
 * Selfcare Diagnostics - Bookings & Multi-Patient Live Tracking CSS
 * Features:
 * - Direct Tracking Display (Zero search input)
 * - Horizontal Patient Name Selector Chips (Customer + Family Members)
 * - 3D Glassmorphism Cards with Emerald Theme
 * - Interactive Vertical Timeline Stepper with Pulse Animation
 * - Responsive Mobile Bottom Navigation
 */

:root {
  --primary-green: #078866;
  --dark-green: #045D49;
  --deep-green: #033F33;
  --light-green: #35C39A;
  --primary-pink: #E4005A;
  --bg-main: #F4FBF9;
  --text-main: #10231E;
  --text-muted: #536E66;
  --white: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.96);
  --glass-border: rgba(7, 136, 102, 0.2);
  --radius-md: 14px;
  --shadow-3d: 0 16px 40px rgba(3, 63, 51, 0.08), 0 4px 10px rgba(7, 136, 102, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  padding-bottom: 110px;
  min-height: 100vh;
}

.main-container {
  padding: 14px 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-3d);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--glass-border);
}

.header-logo {
  height: 38px;
  object-fit: contain;
}

.live-status-pill {
  font-size: 11px;
  font-weight: 800;
  color: #059669;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* =========================================================================
   PATIENT SELECTOR CHIPS (Name-wise show aaganum)
   ========================================================================= */
.patient-selector-section {
  padding: 14px 16px;
  margin-bottom: 14px;
}

.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title-wrap h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--dark-green);
}

.section-title-wrap p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.add-member-mini-btn {
  background: transparent;
  border: 1px solid rgba(7, 136, 102, 0.3);
  color: var(--primary-green);
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.patient-chips-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.patient-chips-scroll::-webkit-scrollbar {
  display: none;
}

/* Individual Patient Chip */
.patient-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid rgba(7, 136, 102, 0.2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.patient-chip .chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(7, 136, 102, 0.1);
  color: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.patient-chip .chip-info {
  display: flex;
  flex-direction: column;
}

.patient-chip .chip-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
}

.patient-chip .chip-relation {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Active Selected Chip */
.patient-chip.active {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  border-color: var(--dark-green);
  box-shadow: 0 4px 14px rgba(7, 136, 102, 0.3);
  transform: translateY(-1px);
}

.patient-chip.active .chip-avatar {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.patient-chip.active .chip-name {
  color: #ffffff;
}

.patient-chip.active .chip-relation {
  color: #A7F3D0;
}

/* =========================================================================
   SUB-NAVIGATION IF PATIENT HAS MULTIPLE BOOKINGS
   ========================================================================= */
.bookings-subnav-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.booking-subtab {
  padding: 6px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(7, 136, 102, 0.2);
  font-size: 11px;
  font-weight: 700;
  color: var(--dark-green);
  cursor: pointer;
  white-space: nowrap;
}

.booking-subtab.active {
  background: var(--dark-green);
  color: #ffffff;
}

/* =========================================================================
   BOOKING META DETAILS CARD
   ========================================================================= */
.booking-meta-card {
  padding: 16px 18px;
  margin-bottom: 14px;
}

.meta-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.meta-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.meta-id-val {
  font-size: 14.5px;
  color: var(--dark-green);
  font-weight: 900;
}

.meta-mode-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
}

.meta-mode-badge.home-mode {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.meta-mode-badge.lab-mode {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.meta-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-block span {
  font-size: 10.5px;
  color: var(--text-muted);
  display: block;
}

.info-block strong {
  font-size: 12.5px;
  color: var(--text-main);
  font-weight: 700;
}

.location-banner {
  background: #F9FAFB;
  border: 1px solid rgba(7, 136, 102, 0.15);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-main);
  display: flex;
  gap: 6px;
  align-items: center;
}

/* =========================================================================
   LIVE TRACKING STEPPER
   ========================================================================= */
.stepper-card {
  padding: 16px 18px;
  margin-bottom: 14px;
}

.stepper-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stepper-title-row h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--dark-green);
}

.step-update-time {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.vertical-stepper {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 28px;
}

.step-item {
  position: relative;
  padding-bottom: 24px;
}

.step-item:last-child {
  padding-bottom: 0;
}

/* Connecting Line */
.step-item::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 16px;
  bottom: -4px;
  width: 2.5px;
  background: #E5E7EB;
}

.step-item:last-child::before {
  display: none;
}

.step-item.completed::before {
  background: var(--primary-green);
}

/* Step Node Circle */
.step-node {
  position: absolute;
  left: -28px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E5E7EB;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.step-item.completed .step-node {
  background: var(--primary-green);
  color: #ffffff;
}

.step-item.active .step-node {
  background: #2563EB;
  color: #ffffff;
  animation: pulseNode 1.5s infinite;
}

@keyframes pulseNode {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.step-content strong {
  display: block;
  font-size: 12.5px;
  color: var(--text-main);
  font-weight: 800;
}

.step-item.pending .step-content strong {
  color: #9CA3AF;
}

.step-content p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.step-time-badge {
  font-size: 9.5px;
  color: #047857;
  font-weight: 700;
  margin-top: 3px;
  display: inline-block;
}

/* =========================================================================
   TESTS SUMMARY
   ========================================================================= */
.tests-summary-card {
  padding: 14px 16px;
  margin-bottom: 14px;
}

.tests-summary-card h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--dark-green);
  margin-bottom: 8px;
}

.booked-tests-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.test-summary-row:last-child {
  border-bottom: none;
}

/* =========================================================================
   WHATSAPP SUPPORT ACTION
   ========================================================================= */
.support-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, #ECFDF5, #F0FDF4);
  border: 1px solid #A7F3D0;
}

.support-details strong {
  font-size: 12.5px;
  color: #065F46;
  display: block;
}

.support-details p {
  font-size: 10.5px;
  color: #047857;
  margin-top: 2px;
}

.whatsapp-support-btn {
  background: #25D366;
  color: #ffffff;
  border: none;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transition: transform 0.12s ease;
}

.whatsapp-support-btn:active {
  transform: scale(0.96);
}

/* =========================================================================
   EMPTY STATE (When patient has no active bookings)
   ========================================================================= */
.empty-state-card {
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state-icon {
  font-size: 42px;
}

.empty-state-card h3 {
  font-size: 16px;
  color: var(--dark-green);
}

.empty-state-card p {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 290px;
  line-height: 1.4;
}

.empty-action-btns {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.action-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.action-btn.primary-btn {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  color: #ffffff;
}

.action-btn.secondary-btn {
  background: #ffffff;
  color: var(--dark-green);
  border: 1px solid var(--primary-green);
}

/* =========================================================================
   5-TAB FIXED BOTTOM NAVIGATION
   ========================================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  justify-content: space-around;
  padding: 10px 4px calc(8px + env(safe-area-inset-bottom)) 4px;
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.04);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: #6B7280;
  font-size: 10.5px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.nav-icon {
  font-size: 19px;
  line-height: 1;
}

.nav-item.active {
  color: var(--primary-green);
  font-weight: 800;
}
