/* --- Import Font Awesome for Icons (fallback if not already loaded by main page) --- */
/* Main page already loads Font Awesome 6.4.0, but this is a fallback */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* --- Modal Font Size Reset - Ensures Consistent Text Size Across Pages --- */
.modal-overlay,
.modal-overlay *,
.modal-content,
.modal-content *,
#customerInfoModal,
#customerInfoModal *,
#bookingBillModal,
#bookingBillModal * {
  /* Force consistent base font metrics */
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  
  /* Prevent font size inheritance from parent pages */
  font-size: inherit !important;
  line-height: inherit !important;
  
  /* Reset any potential text transformations */
  text-transform: none !important;
  font-variant: normal !important;
  font-style: normal !important;
}

/* --- Mobile First Responsive Modal Overlay --- */
.modal-overlay {
  display: none !important; /* Hidden by default - only show when explicitly opened */
  align-items: flex-start !important; /* Start from top for better mobile experience */
  justify-content: center !important;
  position: fixed !important;
  z-index: 1000 !important;
  left: 0 !important; 
  top: 0 !important; 
  width: 100vw !important; 
  height: 100vh !important;
  height: 100dvh !important; /* Use dynamic viewport height for mobile */
  background: rgba(99, 102, 241, 0.10) !important; /* Indigo overlay */
  transition: opacity 0.2s ease-in-out !important;
  backdrop-filter: blur(2px) !important;
  padding: 0.5rem !important; /* Add padding for mobile */
  padding-top: max(0.5rem, env(safe-area-inset-top)) !important; /* Account for notches */
  padding-bottom: max(6rem, env(safe-area-inset-bottom, 6rem)) !important; /* Account for gesture navigation */
  overflow-y: auto !important; /* Allow scrolling on mobile */
  -webkit-overflow-scrolling: touch !important; /* Smooth scrolling on iOS */
  box-sizing: border-box !important;
}

/* Mobile specific modal overlay improvements - NATURAL SCROLLING */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0.25rem !important;
    padding-top: max(0.25rem, env(safe-area-inset-top)) !important;
    padding-bottom: max(10rem, env(safe-area-inset-bottom, 10rem)) !important; /* Extra space for gesture nav */
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }
  
  .modal-content {
    margin: 0.25rem auto !important;
    max-height: calc(100vh - 20rem) !important; /* Sufficient space for mobile UI */
    max-height: calc(100dvh - 20rem) !important; /* Dynamic viewport */
    padding: 1rem 0.875rem 2rem 0.875rem !important; /* Extra bottom padding for button */
    
    /* Ensure scrollable content with natural button placement */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Form content flows naturally */
  .compact-form,
  #customerInfoForm {
    /* Remove any height constraints - let content flow naturally */
    max-height: none !important;
    overflow-y: visible !important;
    
    /* Natural spacing for last element (button) */
    padding-bottom: 1rem !important;
  }
  
  /* Professional confirm booking button - natural positioning */
  .gradient-btn,
  .compact-submit-btn {
    /* NO sticky positioning - natural document flow */
    position: relative !important;
    bottom: auto !important;
    
    /* Natural spacing */
    margin-top: 1.5rem !important;
    margin-bottom: 1rem !important; /* Space before modal edge */
    
    /* Professional button styling */
    padding: 1rem 1.5rem !important;
    font-size: 1.125rem !important;
    min-height: 56px !important;
    border-radius: 0.875rem !important;
    
    /* Elegant shadow without floating effect */
    box-shadow: 0 6px 16px rgba(99,102,241,0.25), 0 2px 8px rgba(0,0,0,0.1) !important;
    background: linear-gradient(90deg, var(--primary, #6366f1) 0%, var(--accent, #f59e0b) 100%) !important;
    
    /* Normal z-index */
    z-index: 1 !important;
    
    /* Professional typography */
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
  }
  
  /* Bill modal payment buttons - natural flow */
  #bookingBillModal .modal-content > div:last-child {
    /* Remove sticky positioning */
    position: relative !important;
    bottom: auto !important;
    
    /* Natural styling */
    background: var(--bg-secondary, #fff) !important;
    padding: 1.5rem 0 1rem 0 !important;
    margin-top: 1.5rem !important;
    
    /* Professional separation */
    border-top: 1px solid #e2e8f0 !important;
    z-index: 1 !important;
    
    /* Remove floating shadows */
    box-shadow: none !important;
  }
  
  #bookingBillModal .cta-btn {
    min-height: 52px !important;
    padding: 0.875rem 1.25rem !important;
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }
}

/* --- Ensure customerInfoModal ALWAYS appears first --- */
#customerInfoModal {
  z-index: 1001 !important;
}

#customerInfoModal .modal-content {
  background: var(--bg-secondary, #fff) !important;
  border-radius: var(--radius-xl, 1.25rem) !important;
  box-shadow: var(--shadow-xl, 0 16px 32px -8px rgb(0 0 0 / 0.13)), 0 4px 16px #bda6ff33 !important;
  padding: 1.5rem 1.25rem 1.25rem 1.25rem !important;
  max-width: 410px !important;
  width: 98% !important;
  margin: 1rem auto !important; /* Reduced top margin for mobile */
  position: relative !important;
  animation: modalPopIn 0.35s ease-out !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  box-sizing: border-box !important;
  border: 2px solid var(--border-accent, #e2e8f0) !important;
  
  /* Mobile-first scrollable content */
  max-height: calc(100vh - 2rem) !important; /* Account for modal overlay padding */
  max-height: calc(100dvh - 2rem) !important; /* Dynamic viewport for mobile */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  
  /* Ensure content layout doesn't get hidden behind mobile UI */
  min-height: auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* --- Ensure bookingBillModal appears only when intended --- */
#bookingBillModal {
  z-index: 1002 !important;
}

#bookingBillModal .modal-content {
  background: var(--bg-secondary, #fff) !important;
  border-radius: var(--radius-xl, 1.25rem) !important;
  box-shadow: var(--shadow-xl, 0 16px 32px -8px rgb(0 0 0 / 0.13)), 0 4px 16px #bda6ff33 !important;
  padding: 1.5rem 1.25rem 1.25rem 1.25rem !important;
  max-width: 400px !important;
  width: 98% !important;
  margin: 1rem auto !important; /* Reduced top margin for mobile */
  position: relative !important;
  animation: modalPopIn 0.35s ease-out !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  box-sizing: border-box !important;
  border: 2px solid var(--border-accent, #e2e8f0) !important;
  
  /* Mobile-first scrollable content */
  max-height: calc(100vh - 2rem) !important; /* Account for modal overlay padding */
  max-height: calc(100dvh - 2rem) !important; /* Dynamic viewport for mobile */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  
  /* Ensure content layout doesn't get hidden behind mobile UI */
  min-height: auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* --- Modal Content --- */
#customerInfoModal .modal-content,
#customerInfoModal .modal-content.booking-modal,
#bookingBillModal .modal-content,
#bookingBillModal .modal-content.booking-modal,
.modal-content.booking-modal {
  background: var(--bg-secondary, #fff) !important;
  border-radius: var(--radius-xl, 1.25rem) !important;
  box-shadow: var(--shadow-xl, 0 16px 32px -8px rgb(0 0 0 / 0.13)), 0 4px 16px #bda6ff33 !important;
  padding: 1.4rem 1.2rem 1rem 1.2rem !important; /* Reduced padding for compact design */
  max-width: 410px !important; /* was 350px, now a bit larger */
  width: 98% !important;
  margin: 2rem auto !important;
  position: relative !important;
  animation: modalPopIn 0.35s ease-out !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  box-sizing: border-box !important;
  border: 2px solid var(--border-accent, #e2e8f0) !important;
  z-index: 1001 !important;
}

/* --- Enhanced Mobile-First Modal Content --- */
#customerInfoModal .modal-content,
#customerInfoModal .modal-content.booking-modal,
#bookingBillModal .modal-content,
#bookingBillModal .modal-content.booking-modal,
.modal-content.booking-modal {
  background: var(--bg-secondary, #fff) !important;
  border-radius: var(--radius-xl, 1.25rem) !important;
  box-shadow: var(--shadow-xl, 0 16px 32px -8px rgb(0 0 0 / 0.13)), 0 4px 16px #bda6ff33 !important;
  padding: 1.4rem 1.2rem 1rem 1.2rem !important;
  max-width: 410px !important;
  width: 98% !important;
  margin: 2rem auto !important;
  position: relative !important;
  animation: modalPopIn 0.35s ease-out !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  box-sizing: border-box !important;
  border: 2px solid var(--border-accent, #e2e8f0) !important;
  z-index: 1001 !important;
  max-height: 90vh !important; /* Prevent modal from being too tall */
  overflow-y: auto !important; /* Allow scrolling if content is too long */
}

/* Enhanced mobile responsive modal */
@media (max-width: 768px) {
  #customerInfoModal .modal-content,
  #customerInfoModal .modal-content.booking-modal,
  #bookingBillModal .modal-content,
  #bookingBillModal .modal-content.booking-modal,
  .modal-content.booking-modal {
    max-width: 96vw !important;
    width: 96vw !important;
    padding: 1.25rem 1rem !important;
    margin: 1rem auto !important;
    border-radius: var(--radius-lg, 1rem) !important;
    max-height: 95vh !important;
  }
}

@media (max-width: 600px) {
  #customerInfoModal .modal-content,
  #customerInfoModal .modal-content.booking-modal,
  #bookingBillModal .modal-content,
  #bookingBillModal .modal-content.booking-modal,
  .modal-content.booking-modal {
    max-width: 98vw !important;
    width: 98vw !important;
    padding: 1rem 0.875rem !important;
    border-radius: var(--radius-lg, 1rem) !important;
    margin: 0.5rem auto !important;
    max-height: 97vh !important;
  }
}

@media (max-width: 480px) {
  #customerInfoModal .modal-content,
  #customerInfoModal .modal-content.booking-modal,
  #bookingBillModal .modal-content,
  #bookingBillModal .modal-content.booking-modal,
  .modal-content.booking-modal {
    max-width: 100vw !important;
    width: 100vw !important;
    padding: 0.875rem 0.75rem !important;
    border-radius: var(--radius-md, 0.75rem) !important;
    margin: 0.25rem auto !important;
    max-height: 98vh !important;
    position: fixed !important; /* Fixed positioning for better mobile experience */
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  .modal-title {
    font-size: 1.125rem !important;
    line-height: 1.3 !important;
  }

  .modal-subtitle {
    font-size: 0.875rem !important;
  }

  .close {
    top: 0.75rem !important;
    right: 0.75rem !important;
    font-size: 1.5rem !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 360px) {
  #customerInfoModal .modal-content,
  #customerInfoModal .modal-content.booking-modal,
  #bookingBillModal .modal-content,
  #bookingBillModal .modal-content.booking-modal,
  .modal-content.booking-modal {
    padding: 0.75rem 0.625rem !important;
    border-radius: var(--radius-sm, 0.5rem) !important;
    max-height: 99vh !important;
  }

  .modal-title {
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .modal-subtitle {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
  }

  .close {
    top: 0.5rem !important;
    right: 0.5rem !important;
    font-size: 1.3rem !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
}

/* --- Close Button --- */
.close {
  position: absolute !important;
  top: 1.1rem !important;
  right: 1.1rem !important;
  font-size: 1.7rem !important;
  color: var(--border-dark, #94a3b8) !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  z-index: 2 !important;
  transition: color 0.18s ease !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}
.close:hover { 
  color: var(--primary, #6366f1) !important; 
  transform: scale(1.1) !important;
}

/* --- Modal Icon --- */
.modal-icon {
  margin-bottom: 0.2rem !important;
  font-size: 2rem !important;
  color: var(--primary, #6366f1) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 40px !important;
}

/* --- Modal Titles --- */
.modal-title {
  font-size: 1.125rem !important; /* 18px equivalent - consistent across pages */
  font-weight: 800 !important;
  color: var(--primary, #6366f1) !important;
  margin-bottom: 0.5rem !important;
  text-align: center !important;
  letter-spacing: 0.5px !important;
  line-height: 1.4 !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
}

/* --- Simple Professional Booking Summary Title --- */
.booking-summary-title {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  margin-bottom: 0.3rem !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  padding: 0.5rem 0 !important;
  position: relative !important;
}

.booking-summary-title::after {
  content: '' !important;
  position: absolute !important;
  bottom: -1px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 40px !important;
  height: 1px !important;
  background: #6366f1 !important;
  border-radius: 1px !important;
}

.booking-summary-title i {
  color: #6366f1 !important;
  font-size: 1.1rem !important;
  margin-right: 0.2rem !important;
}

/* --- Compact Professional Modal Subtitle --- */
.booking-summary-title + .modal-subtitle {
  font-size: 0.85rem !important;
  color: #64748b !important;
  font-weight: 400 !important;
  margin-bottom: 1rem !important;
  text-align: center !important;
  margin-top: 0.3rem !important;
}
.modal-subtitle {
  font-size: 0.9375rem !important; /* 15px equivalent - consistent across pages */
  color: var(--text-secondary, #475569) !important;
  margin-bottom: 0.7rem !important;
  text-align: center !important;
  line-height: 1.5 !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
}

/* --- Form Inputs --- */
.icon-input label {
  font-weight: 600 !important;
  color: var(--primary, #6366f1) !important;
  margin-bottom: 0.15rem !important;
  display: block !important;
  font-size: 0.9375rem !important; /* 15px equivalent - consistent across pages */
  line-height: 1.3 !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
}

/* --- Font Awesome Icons in Labels --- */
.icon-input label i {
  margin-right: 0.5rem !important;
  color: var(--primary, #6366f1) !important;
  font-size: 1rem !important;
  width: 1.2rem !important;
  text-align: center !important;
  display: inline-block !important;
}

/* --- Fallback for missing Font Awesome icons --- */
.icon-input label i.fas::before,
.icon-input label i.fa::before {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome", sans-serif !important;
  font-weight: 900 !important;
  font-style: normal !important;
}

/* --- Specific Font Awesome icon enforcement --- */
.modal-overlay .fas,
.modal-overlay .far,
.modal-overlay .fa {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
  font-weight: 900 !important;
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
}

/* --- Ensure SVG icons in modal header are visible --- */
.modal-icon svg {
  display: block !important;
  margin: 0 auto !important;
}
.icon-input input[type="text"],
.icon-input input[type="email"],
.icon-input input[type="tel"],
.icon-input input[type="number"] {
  width: 100% !important;
  border: 1.5px solid var(--border-light, #e2e8f0) !important;
  border-radius: var(--radius-md, 0.7rem) !important;
  padding: 0.5em 0.8em !important;
  font-size: 0.9375rem !important; /* 15px equivalent - consistent across pages */
  color: var(--text-primary, #0f172a) !important;
  background: var(--bg-primary, #fafbff) !important;
  transition: border 0.18s ease !important;
  margin-top: 0.15rem !important;
  box-sizing: border-box !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  line-height: 1.4 !important;
}
.icon-input input:focus {
  border: 1.5px solid var(--primary, #6366f1) !important;
  outline: none !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* --- Readonly Input Styling --- */
.icon-input input[readonly] {
  background-color: #f8fafc !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
}

.icon-input input[readonly]:hover {
  border-color: #cbd5e1 !important;
}

.icon-input input[readonly]:focus {
  border-color: #cbd5e1 !important;
  box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.1) !important;
}

/* --- Phone Verified Badge --- */
#phoneVerifiedBadge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #059669 !important;
  font-size: 14px;
  z-index: 10;
  pointer-events: none;
}

#phoneVerifiedBadge i {
  color: #059669 !important;
}

/* --- Phone Input Container --- */
.icon-input div[style*="position: relative"] {
  position: relative;
  width: 100%;
}

/* --- Form Row --- */
.form-row {
  display: flex !important;
  gap: 0.7rem !important;
  margin-bottom: 0.5rem !important;
}
.form-row .form-group { 
  flex: 1 !important; 
}
#customerInfoForm .form-group,
#customerInfoForm .form-row { 
  margin-bottom: 0.7rem !important; 
}
#customerInfoForm .form-row .form-group { 
  margin-bottom: 0 !important; 
}
#customerInfoForm .form-group:last-child,
#customerInfoForm .form-row:last-child { 
  margin-bottom: 0 !important; 
}

/* --- Enhanced Mobile-First Form Inputs --- */
.icon-input input[type="text"],
.icon-input input[type="email"],
.icon-input input[type="tel"],
.icon-input input[type="number"] {
  width: 100% !important;
  border: 1.5px solid var(--border-light, #e2e8f0) !important;
  border-radius: var(--radius-md, 0.7rem) !important;
  padding: 0.75rem 0.875rem !important; /* Increased padding for mobile */
  font-size: 1rem !important; /* Prevent zoom on iOS */
  color: var(--text-primary, #0f172a) !important;
  background: var(--bg-primary, #fafbff) !important;
  transition: border 0.18s ease !important;
  margin-top: 0.15rem !important;
  box-sizing: border-box !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  line-height: 1.4 !important;
  min-height: 48px !important; /* Minimum touch target size */
  -webkit-appearance: none !important; /* Remove iOS styling */
  -moz-appearance: none !important; /* Remove Firefox styling */
  appearance: none !important;
}

/* Enhanced gradient button for mobile */
.gradient-btn {
  background: linear-gradient(90deg, var(--primary, #6366f1) 0%, var(--accent, #f59e0b) 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-md, 0.7rem) !important;
  padding: 0.875rem 1.25rem !important; /* Increased padding for mobile */
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(99,102,241,0.08) !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  margin-top: 0.75rem !important;
  text-align: center !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  line-height: 1.4 !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
  min-height: 52px !important; /* Larger touch target */
  -webkit-appearance: none !important;
  -webkit-tap-highlight-color: transparent !important; /* Remove tap highlight on iOS */
  user-select: none !important; /* Prevent text selection */
}

/* Mobile specific input and button improvements */
@media (max-width: 768px) {
  .icon-input input[type="text"],
  .icon-input input[type="email"],
  .icon-input input[type="tel"],
  .icon-input input[type="number"] {
    padding: 0.875rem 1rem !important;
    font-size: 1rem !important; /* Prevents zoom on iOS */
    min-height: 50px !important;
    border-radius: 0.75rem !important;
  }
  
  .gradient-btn {
    padding: 1rem 1.5rem !important;
    font-size: 1.125rem !important;
    min-height: 56px !important;
    border-radius: 0.875rem !important;
    margin-top: 1rem !important;
  }
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  
  .icon-input input[type="text"],
  .icon-input input[type="email"],
  .icon-input input[type="tel"],
  .icon-input input[type="number"] {
    padding: 0.75rem 0.875rem !important;
    font-size: 1rem !important;
    min-height: 48px !important;
  }
  
  .gradient-btn {
    padding: 0.875rem 1.25rem !important;
    font-size: 1rem !important;
    min-height: 52px !important;
  }
}

@media (max-width: 480px) {
  .icon-input input[type="text"],
  .icon-input input[type="email"],
  .icon-input input[type="tel"],
  .icon-input input[type="number"] {
    padding: 0.75rem 0.875rem !important;
    font-size: 1rem !important;
    min-height: 46px !important;
  }
  
  .gradient-btn {
    padding: 0.875rem 1.125rem !important;
    font-size: 1rem !important;
    min-height: 50px !important;
  }
  
  .booking-summary-box {
    padding: 0.625rem 0.75rem !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 360px) {
  .form-row {
    gap: 0.5rem !important;
  }
  
  .icon-input input[type="text"],
  .icon-input input[type="email"],
  .icon-input input[type="tel"],
  .icon-input input[type="number"] {
    padding: 0.675rem 0.75rem !important;
    font-size: 1rem !important;
    min-height: 44px !important;
  }
  
  .gradient-btn {
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    min-height: 48px !important;
  }
}

/* --- Booking Summary Box --- */
.booking-summary-box {
  background: var(--bg-accent, #f0f9ff) !important;
  border-radius: var(--radius-md, 0.7rem) !important;
  padding: 0.6rem 0.7rem 0.3rem 0.7rem !important;
  color: var(--primary, #6366f1) !important;
  font-weight: 600 !important;
  margin-top: 0.6rem !important;
  margin-bottom: 0.2rem !important;
  font-size: 0.9375rem !important; /* 15px equivalent - consistent across pages */
  border: 1px solid rgba(99, 102, 241, 0.1) !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  line-height: 1.4 !important;
}
#modalBookingSummary {
  margin-top: 0.7rem !important;
  margin-bottom: 0.7rem !important;
}

/* --- Gradient Button --- */
.gradient-btn {
  background: linear-gradient(90deg, var(--primary, #6366f1) 0%, var(--accent, #f59e0b) 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-md, 0.7rem) !important;
  padding: 0.65rem 1.1rem !important;
  font-size: 1rem !important; /* 16px equivalent - consistent across pages */
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(99,102,241,0.08) !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  margin-top: 0.6rem !important;
  text-align: center !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  line-height: 1.4 !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
}
.gradient-btn:hover {
  background: linear-gradient(90deg, var(--primary-dark, #4338ca) 0%, var(--accent, #f59e0b) 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(99,102,241,0.15) !important;
}
.gradient-btn:active {
  transform: translateY(0) !important;
}
.gradient-btn:focus {
  outline: 2px solid var(--primary, #6366f1) !important;
  outline-offset: 2px !important;
}

/* --- Gold Button --- */
.gold-btn {
  background: linear-gradient(90deg, var(--accent, #f59e0b) 0%, var(--accent-light, #fbbf24) 100%);
  color: var(--primary, #6366f1);
  border: none;
  border-radius: var(--radius-md, 0.7rem);
  padding: 0.65rem 1.1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245,158,11,0.08);
  transition: background 0.2s, color 0.2s;
  width: 100%;
  margin-top: 0.6rem;
}
.gold-btn:hover {
  background: linear-gradient(90deg, var(--accent-light, #fbbf24) 0%, var(--accent, #f59e0b) 100%);
  color: #fff;
}

/* --- Custom Time Grid --- */
.custom-time-grid {
  position: absolute;
  top: 38px;
  left: 0;
  background: #fff;
  border-radius: var(--radius-md, 0.7rem);
  box-shadow: 0 6px 24px rgba(99,102,241,0.13), 0 1px 4px rgba(99,102,241,0.05);
  padding: 10px 7px 7px 7px;
  z-index: 10001;
  min-width: 180px;
  max-width: 240px;
  max-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalPopIn 0.18s cubic-bezier(.4,1.4,.6,1);
  border: 1px solid var(--border-light, #e2e8f0);
}

.time-period-btn {
  background: var(--bg-accent, #f0f9ff);
  color: var(--primary, #6366f1);
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 4px 12px;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  outline: none;
  box-shadow: none;
  letter-spacing: 0.2px;
}

.time-period-btn.active {
  background: linear-gradient(90deg, var(--primary, #6366f1) 60%, var(--primary-light, #818cf8) 100%);
  color: #fff;
  box-shadow: 0 1px 4px rgba(99,102,241,0.08);
  border-bottom: 2px solid #fff;
}

.time-period-btn:hover:not(.active) {
  background: var(--primary-light, #818cf8);
  color: #fff;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 4px;
  width: 100%;
}

.time-slot {
  background: var(--bg-accent, #f0f9ff);
  color: var(--primary, #6366f1);
  border: none;
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  outline: none;
  box-shadow: 0 1px 2px rgba(99,102,241,0.03);
  letter-spacing: 0.1px;
  width: 52px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  position: relative;
}

.time-slot:hover {
  background: linear-gradient(90deg, var(--primary, #6366f1) 60%, var(--primary-light, #818cf8) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(99,102,241,0.15);
  transform: translateY(-1px) scale(1.03);
}

.time-slot.selected {
  background: linear-gradient(90deg, var(--primary-dark, #4338ca) 0%, var(--primary, #6366f1) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.2);
  transform: scale(1.05);
}

.time-slot:active {
  transform: scale(0.98);
}

/* --- Time Input Styling --- */
#customerSelectTime {
  cursor: pointer !important;
  background-color: #fff !important;
}

#customerSelectTime:focus {
  cursor: pointer !important;
}

#customerSelectTime[readonly] {
  background-color: #fff !important;
  cursor: pointer !important;
}

/* --- Mobile responsive time grid --- */
@media (max-width: 480px) {
  .custom-time-grid {
    min-width: 160px;
    max-width: 200px;
  }
  
  .time-slot {
    width: 46px;
    height: 52px;
    font-size: 0.8rem;
    padding: 4px 2px;
  }
  
  .time-grid {
    gap: 4px;
  }
}

/* --- Compact Booking Bill Summary --- */
.booking-bill-summary {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-radius: var(--radius-xl, 1.25rem) !important;
  padding: 0.8rem 0.9rem 0.7rem 0.9rem !important; /* Further reduced padding */
  margin-bottom: 0.8rem !important; /* Further reduced margin */
  box-shadow: 0 2px 12px rgba(99,102,241,0.06), 0 1px 4px rgba(124, 58, 237, 0.03) !important; /* Further reduced shadow */
  font-size: 0.85rem !important; /* Further reduced font size */
  color: var(--text-primary, #0f172a) !important;
  transition: box-shadow 0.3s ease !important;
  border: 1px solid rgba(124, 58, 237, 0.08) !important;
  position: relative !important;
}

.booking-bill-summary::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important; /* Further reduced from 3px */
  background: linear-gradient(90deg, #6366f1 0%, #7c3aed 100%) !important;
  border-radius: var(--radius-xl, 1.25rem) var(--radius-xl, 1.25rem) 0 0 !important;
}
.booking-bill-summary .bill-row {
  margin-bottom: 0.3rem !important; /* Further reduced from 0.4rem */
  font-weight: 500 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0.25rem 0 !important; /* Further reduced from 0.3rem */
  border-bottom: 1px solid rgba(124, 58, 237, 0.06) !important;
  transition: background-color 0.2s ease !important;
  font-size: 0.82rem !important; /* Further reduced font size */
}

.booking-bill-summary .bill-row:last-child {
  border-bottom: none !important;
  margin-bottom: 0 !important;
}

.booking-bill-summary .bill-row:hover {
  background-color: rgba(124, 58, 237, 0.02) !important;
  border-radius: 6px !important;
  margin-left: -0.5rem !important;
  margin-right: -0.5rem !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.booking-bill-summary .bill-label {
  color: #6366f1 !important;
  font-weight: 600 !important;
  margin-right: 0.5em !important;
  font-size: 0.82rem !important; /* Further reduced from 0.85rem */
  letter-spacing: 0.1px !important; /* Reduced letter-spacing */
}

.booking-bill-summary .bill-total {
  margin-top: 0.4rem !important; /* Further reduced from 0.5rem */
  font-size: 1rem !important; /* Further reduced from 1.05rem */
  font-weight: 700 !important;
  color: #6366f1 !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%) !important;
  padding: 0.6rem !important; /* Further reduced from 0.7rem */
  border-radius: 8px !important;
  border: 1px solid rgba(99, 102, 241, 0.15) !important;
  box-shadow: 0 1px 6px rgba(99, 102, 241, 0.04) !important; /* Further reduced shadow */
}

/* --- Professional Booking Summary Card --- */
.booking-summary-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(124,58,237,0.13), 0 2px 8px rgba(44,62,80,0.08);
  padding: 2.2rem 1.7rem 1.7rem 1.7rem;
  margin-bottom: 1.5rem;
  font-size: 1.12rem;
  border: 1.5px solid #ece9f7;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.booking-summary-card .summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f3f0fa;
  font-weight: 500;
  color: #3a2e5a;
  gap: 1.2rem;
  transition: background 0.2s;
}
.booking-summary-card .summary-row:last-child {
  border-bottom: none;
}
.booking-summary-card .summary-label {
  display: flex;
  align-items: center;
  gap: 0.7em;
  color: #5e1bd7;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.1px;
}
.booking-summary-card .summary-icon {
  background: linear-gradient(135deg, #ede9fe 60%, #f3e8ff 100%);
  color: #7c3aed;
  border-radius: 50%;
  width: 2.2em;
  height: 2.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.18em;
  box-shadow: 0 2px 8px rgba(124,58,237,0.07);
  border: 1.5px solid #e9e3fa;
}
.booking-summary-card .summary-value {
  color: #222;
  font-weight: 500;
  text-align: right;
  font-size: 1.15rem;
  letter-spacing: 0.1px;
}
.booking-summary-card .summary-total-row {
  margin-top: 1.5rem;
  background: linear-gradient(90deg, #7c3aed 60%, #ff7e5f 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 16px rgba(124,50,237,0.13);
  border: none;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.4s;
}
.booking-summary-card .summary-total-row .summary-icon {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: none;
  box-shadow: none;
  margin-right: 0.5em;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px);}
  to { opacity: 1; transform: translateY(0);}
}

/* --- Booking Confirmed Section --- */
#bookingConfirmed h2 {
  color: var(--primary, #6366f1);
}
#confirmedBookingDetails {
  background: #fff;
  border-radius: var(--radius-md, 0.7rem);
  box-shadow: 0 2px 12px rgba(99,102,241,0.07);
  padding: 1.5rem;
  max-width: 370px; /* was 320px */
  margin: 22px auto;
}
#bookingConfirmed .cta-btn {
  margin-top: 1.1rem;
  width: auto;
}

/* --- Modern Booking Bill Modal Action Buttons --- */
#bookingBillModal .cta-btn {
  min-width: 130px;
  padding: 0.75rem 1.5rem;
  font-size: 1.08rem;
  font-weight: 700;
  border: none;
  border-radius: 0.8rem;
  box-shadow: 0 2px 12px rgba(99,102,241,0.10);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
  margin: 0 0.2rem;
  outline: none;
  display: inline-block;
  letter-spacing: 0.02em;
}

#bookingBillModal .cta-btn:first-child {
  background: linear-gradient(90deg, #6366f1 0%, #7c3aed 100%);
  color: #fff;
}

#bookingBillModal .cta-btn#payOnlineBtn {
  background: linear-gradient(90deg, #ffb347 0%, #ff7e5f 100%);
  color: #fff;
}

#bookingBillModal .cta-btn:hover,
#bookingBillModal .cta-btn:focus {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 24px rgba(99,102,241,0.13), 0 1.5px 6px rgba(99,102,241,0.09);
  filter: brightness(1.08);
}

#bookingBillModal .cta-btn#payOnlineBtn:hover,
#bookingBillModal .cta-btn#payOnlineBtn:focus {
  background: linear-gradient(90deg, #ff7e5f 0%, #ffb347 100%);
  color: #fffbe6;
}

#bookingBillModal .cta-btn:first-child:hover,
#bookingBillModal .cta-btn:first-child:focus {
  background: linear-gradient(90deg, #7c3aed 0%, #6366f1 100%);
  color: #e0e7ff;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .modal-content.booking-modal,
  .bill-modal-content {
    padding: 1rem 0.5rem;
    border-radius: var(--radius-lg, 1rem);
  }
  #confirmedBookingDetails {
    padding: 1.2rem;
  }
}

/* --- Modal Animations --- */
@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* --- Ensure Modal CSS Variables are Consistent --- */
.modal-overlay {
  /* Force consistent CSS variables if they differ between pages */
  --bg-secondary: #ffffff;
  --radius-xl: 1.25rem;
  --radius-lg: 1rem;
  --radius-md: 0.7rem;
  --shadow-xl: 0 16px 32px -8px rgb(0 0 0 / 0.13);
  --border-accent: #e2e8f0;
  --primary: #6366f1;
  --text-secondary: #475569;
  --text-primary: #0f172a;
  --border-light: #e2e8f0;
  --border-dark: #94a3b8;
  --bg-accent: #f0f9ff;
  --accent: #f59e0b;
  --bg-primary: #fafbff;
  
  /* FORCE consistent font sizing across both pages */
  font-size: 16px !important; /* Reset base font size */
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
}

/* --- Force consistent typography for all modal content --- */
.modal-overlay *,
.modal-overlay *::before,
.modal-overlay *::after {
  font-family: 'Inter', 'Montserrat', Arial, sans-serif !important;
  box-sizing: border-box !important;
}

/* --- Accessibility --- */
:focus-visible {
  outline: 2px solid var(--primary, #6366f1);
  outline-offset: 2px;
}

/* === MOBILE-FIRST RESPONSIVE DESIGN === */

/* Base mobile styles (default for all screens) */
.modal-overlay {
  padding: 0.75rem !important;
  padding-top: max(0.75rem, env(safe-area-inset-top)) !important;
  padding-bottom: max(8rem, env(safe-area-inset-bottom, 8rem)) !important; /* Account for gesture navigation */
  align-items: flex-start !important;
}

.modal-content {
  width: 100% !important;
  max-width: 420px !important;
  margin: 0 auto !important;
  padding: 1.25rem 1rem 1.5rem 1rem !important; /* Increased bottom padding for button */
  border-radius: 1rem !important;
  max-height: calc(100vh - 16rem) !important; /* Account for gesture nav space */
  max-height: calc(100dvh - 16rem) !important; /* Dynamic viewport for mobile */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  
  /* Natural flex layout - NO sticky positioning */
  display: flex !important;
  flex-direction: column !important;
}

/* Mobile form container with natural scrolling */
.compact-form,
#customerInfoForm {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  /* Remove any overflow constraints - let it flow naturally */
}

/* Natural confirm booking button - NOT sticky, part of scrollable content */
.gradient-btn,
.compact-submit-btn,
button[type="submit"] {
  /* Remove all sticky positioning */
  position: relative !important; /* Natural document flow */
  bottom: auto !important;
  
  /* Natural spacing */
  margin-top: 1.5rem !important; /* Space from content above */
  margin-bottom: 0.5rem !important; /* Small bottom margin */
  flex-shrink: 0 !important; /* Prevent shrinking */
  
  /* Professional button styling */
  background: linear-gradient(90deg, var(--primary, #6366f1) 0%, var(--accent, #f59e0b) 100%) !important;
  z-index: 1 !important; /* Normal z-index */
  
  /* Enhanced visual appeal without floating effect */
  box-shadow: 0 4px 12px rgba(99,102,241,0.2), 0 2px 6px rgba(0,0,0,0.1) !important;
  
  /* Professional typography */
  font-weight: 600 !important;
  letter-spacing: 0.025em !important;
}

/* Mobile bill modal payment buttons - also natural flow */
#bookingBillModal .modal-content > div:last-child {
  /* Remove sticky positioning */
  position: relative !important;
  bottom: auto !important;
  
  /* Natural spacing and styling */
  background: var(--bg-secondary, #fff) !important;
  padding-top: 1.5rem !important;
  margin-top: 1rem !important;
  z-index: 1 !important; /* Normal z-index */
  
  /* Professional separation without floating */
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: none !important; /* Remove floating shadow */
}

/* Enhanced touch targets for mobile */
button, input, select, textarea, a {
  -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1) !important;
  touch-action: manipulation !important;
}

/* Prevent zoom on iOS */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  font-size: 16px !important;
}

/* Close button enhancement */
.close {
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  top: 0.75rem !important;
  right: 0.75rem !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.05) !important;
  transition: all 0.2s ease !important;
}

.close:hover {
  background: rgba(99, 102, 241, 0.1) !important;
  transform: scale(1.1) !important;
}

/* Modal header improvements */
.modal-header {
  padding: 0.5rem 0 1rem 0 !important;
  margin-bottom: 1.25rem !important;
}

.modal-icon {
  margin-bottom: 0.75rem !important;
}

.modal-icon svg {
  width: 56px !important;
  height: 56px !important;
}

.modal-title {
  font-size: 1.375rem !important;
  line-height: 1.3 !important;
  margin: 0.5rem 0 0.375rem 0 !important;
  font-weight: 700 !important;
}

.modal-subtitle {
  font-size: 0.95rem !important;
  margin: 0 !important;
  opacity: 0.8 !important;
}

/* Form improvements */
.form-group {
  margin-bottom: 1rem !important;
}

.form-group label {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
}

.form-group input {
  width: 100% !important;
  padding: 0.875rem 1rem !important;
  font-size: 16px !important;
  border-radius: 0.75rem !important;
  border: 2px solid var(--border-light, #e2e8f0) !important;
  background: #fff !important;
  transition: all 0.2s ease !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
}

.form-group input:focus {
  border-color: var(--primary, #6366f1) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
  outline: none !important;
}

/* Form row for mobile */
.form-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 0.75rem !important;
  margin-bottom: 1rem !important;
}

.form-row .form-group {
  margin-bottom: 0 !important;
}

/* Time selection improvements */
.custom-time-grid {
  margin-top: 0.75rem !important;
  padding: 1rem !important;
  background: var(--bg-tertiary, #f1f5f9) !important;
  border-radius: 0.75rem !important;
  border: 2px solid var(--border-light, #e2e8f0) !important;
}

.time-period-btn {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  border-radius: 0.5rem !important;
  border: 2px solid var(--border-light, #e2e8f0) !important;
  background: #fff !important;
  margin: 0 0.25rem !important;
  transition: all 0.2s ease !important;
  min-height: 44px !important;
  min-width: 60px !important;
}

.time-period-btn.active {
  background: var(--primary, #6366f1) !important;
  color: #fff !important;
  border-color: var(--primary, #6366f1) !important;
}

.time-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.5rem !important;
  margin-top: 0.75rem !important;
}

.time-slot {
  padding: 0.5rem !important;
  text-align: center !important;
  border: 2px solid var(--border-light, #e2e8f0) !important;
  border-radius: 0.5rem !important;
  background: #fff !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-size: 0.875rem !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.time-slot:hover {
  background: var(--bg-accent, #f0f9ff) !important;
  border-color: var(--primary, #6366f1) !important;
}

.time-slot.selected {
  background: var(--primary, #6366f1) !important;
  color: #fff !important;
  border-color: var(--primary, #6366f1) !important;
}

/* Booking summary improvements */
.booking-summary-box {
  background: var(--bg-tertiary, #f1f5f9) !important;
  padding: 1rem !important;
  border-radius: 0.75rem !important;
  margin: 1.25rem 0 !important;
  border: 2px solid var(--border-light, #e2e8f0) !important;
}

.booking-summary-box div {
  margin-bottom: 0.5rem !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
}

.booking-summary-box div:last-child {
  margin-bottom: 0 !important;
}

/* Submit button improvements */
.gradient-btn {
  width: 100% !important;
  padding: 1rem 1.5rem !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  border-radius: 0.75rem !important;
  border: none !important;
  background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--accent, #f59e0b) 100%) !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-height: 52px !important;
  margin-top: 1.5rem !important;
}

.gradient-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3) !important;
}

.gradient-btn:active {
  transform: translateY(0) !important;
}

/* Booking bill modal improvements */
.booking-bill-summary {
  padding: 1rem !important;
  background: var(--bg-tertiary, #f1f5f9) !important;
  border-radius: 0.75rem !important;
  margin: 1rem 0 !important;
}

.bill-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0.5rem 0 !important;
  border-bottom: 1px solid var(--border-light, #e2e8f0) !important;
  font-size: 0.9rem !important;
}

.bill-row:last-child {
  border-bottom: none !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  margin-top: 0.5rem !important;
  padding-top: 0.75rem !important;
  border-top: 2px solid var(--border-light, #e2e8f0) !important;
}

.bill-label {
  color: var(--text-secondary, #475569) !important;
}

/* Payment buttons */
#bookingBillModal .cta-btn {
  flex: 1 !important;
  padding: 0.875rem 1rem !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  border-radius: 0.75rem !important;
  border: 2px solid transparent !important;
  min-height: 48px !important;
  transition: all 0.2s ease !important;
}

#bookingBillModal .cta-btn:first-child {
  background: var(--warning, #f59e0b) !important;
  color: #fff !important;
}

#bookingBillModal .cta-btn#payOnlineBtn {
  background: var(--primary, #6366f1) !important;
  color: #fff !important;
}

#bookingBillModal .cta-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* === RESPONSIVE BREAKPOINTS === */

/* Tablets and small desktops (769px and up) */
@media (min-width: 769px) {
  .modal-overlay {
    padding: 2rem !important;
    align-items: center !important;
    padding-top: 2rem !important;
  }
  
  .modal-content {
    max-width: 450px !important;
    padding: 2rem 1.75rem 1.75rem 1.75rem !important;
    border-radius: 1.25rem !important;
  }
  
  .modal-icon svg {
    width: 64px !important;
    height: 64px !important;
  }
  
  .modal-title {
    font-size: 1.5rem !important;
  }
  
  .form-group input {
    padding: 1rem 1.25rem !important;
    min-height: 52px !important;
  }
  
  .gradient-btn {
    min-height: 56px !important;
    font-size: 1.125rem !important;
  }
}

/* Large phones and small tablets (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .modal-overlay {
    padding: 1.5rem !important;
  }
  
  .modal-content {
    max-width: 500px !important;
    padding: 1.75rem 1.5rem 1.5rem 1.5rem !important;
  }
  
  .time-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

/* Standard mobile phones (376px to 480px) - NATURAL SCROLLING */
@media (min-width: 376px) and (max-width: 480px) {
  .modal-overlay {
    padding: 0.5rem !important;
    padding-bottom: max(12rem, env(safe-area-inset-bottom, 12rem)) !important; /* Extra space for mobile gesture nav */
  }
  
  .modal-content {
    padding: 1rem 0.875rem 2rem 0.875rem !important; /* Extra bottom padding for natural button spacing */
    max-height: calc(100vh - 24rem) !important; /* Account for mobile UI */
    max-height: calc(100dvh - 24rem) !important;
  }
  
  .compact-form,
  #customerInfoForm {
    /* Natural flow - no height restrictions */
    max-height: none !important;
    overflow-y: visible !important;
    padding-bottom: 1rem !important;
  }
  
  .modal-title {
    font-size: 1.25rem !important;
  }
  
  .form-group input {
    padding: 0.75rem 0.875rem !important;
    min-height: 48px !important;
  }
  
  /* Professional button - natural positioning */
  .gradient-btn,
  .compact-submit-btn {
    /* NO sticky positioning */
    position: relative !important;
    bottom: auto !important;
    
    /* Natural spacing */
    margin-top: 1.25rem !important;
    margin-bottom: 1rem !important;
    
    /* Button styling */
    padding: 0.875rem 1.25rem !important;
    font-size: 1rem !important;
    min-height: 52px !important;
    z-index: 1 !important; /* Normal z-index */
    
    /* Professional shadow */
    box-shadow: 0 4px 12px rgba(99,102,241,0.2), 0 2px 6px rgba(0,0,0,0.1) !important;
  }
  
  .time-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.375rem !important;
  }
  
  .time-slot {
    font-size: 0.8rem !important;
    padding: 0.375rem !important;
  }
}

/* Small mobile phones (320px to 375px) - PROFESSIONAL NATURAL SCROLLING */
@media (min-width: 320px) and (max-width: 375px) {
  .modal-overlay {
    padding: 0.25rem !important;
    padding-top: max(0.25rem, env(safe-area-inset-top)) !important;
    padding-bottom: max(14rem, env(safe-area-inset-bottom, 14rem)) !important; /* Maximum space for mobile UI */
  }
  
  .modal-content {
    padding: 0.875rem 0.75rem 2rem 0.75rem !important; /* Extra bottom padding for button */
    border-radius: 0.875rem !important;
    max-height: calc(100vh - 28rem) !important; /* Account for all mobile UI elements */
    max-height: calc(100dvh - 28rem) !important;
  }
  
  .compact-form,
  #customerInfoForm {
    /* Natural content flow */
    max-height: none !important;
    overflow-y: visible !important;
    padding-bottom: 1rem !important;
  }
  
  .close {
    width: 40px !important;
    height: 40px !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    font-size: 1.25rem !important;
  }
  
  .modal-icon svg {
    width: 48px !important;
    height: 48px !important;
  }
  
  .modal-title {
    font-size: 1.125rem !important;
  }
  
  .modal-subtitle {
    font-size: 0.85rem !important;
  }
  
  .form-group {
    margin-bottom: 0.75rem !important;
  }
  
  .form-group label {
    font-size: 0.8rem !important;
    margin-bottom: 0.375rem !important;
  }
  
  .form-group input {
    padding: 0.625rem 0.75rem !important;
    min-height: 44px !important;
    font-size: 16px !important;
    border-radius: 0.625rem !important;
  }
  
  .form-row {
    gap: 0.5rem !important;
  }
  
  /* Professional confirm booking button - natural flow */
  .gradient-btn,
  .compact-submit-btn {
    /* NO sticky positioning - natural document flow */
    position: relative !important;
    bottom: auto !important;
    
    /* Natural spacing */
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    
    /* Professional button styling */
    padding: 0.875rem 1.125rem !important;
    font-size: 1rem !important;
    min-height: 50px !important;
    border-radius: 0.75rem !important;
    
    /* Normal z-index - no floating */
    z-index: 1 !important;
    
    /* Professional shadow without floating effect */
    box-shadow: 0 4px 12px rgba(99,102,241,0.25), 0 2px 6px rgba(0,0,0,0.1) !important;
  }
  
  .time-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.25rem !important;
  }
  
  .time-slot {
    font-size: 0.75rem !important;
    padding: 0.25rem !important;
    min-height: 40px !important;
  }
  
  .time-period-btn {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.8rem !important;
    min-height: 40px !important;
  }
  
  .booking-summary-box {
    padding: 0.75rem !important;
    margin: 1rem 0 !important;
  }
  
  .booking-summary-box div {
    font-size: 0.8rem !important;
  }
}

/* Very small screens (below 320px) - ULTRA COMPACT FOR BUTTON VISIBILITY */
@media (max-width: 319px) {
  .modal-overlay {
    padding: 0.125rem !important;
    padding-top: max(0.125rem, env(safe-area-inset-top)) !important;
    padding-bottom: max(16rem, env(safe-area-inset-bottom, 16rem)) !important; /* Maximum space for very small screens */
  }
  
  .modal-content {
    width: calc(100% - 0.25rem) !important;
    padding: 0.625rem 0.5rem 2rem 0.5rem !important; /* Extra bottom padding for button */
    border-radius: 0.75rem !important;
    max-height: calc(100vh - 28rem) !important; /* Account for all UI elements */
    max-height: calc(100dvh - 28rem) !important;
  }
  
  .compact-form,
  #customerInfoForm {
    /* Natural content flow */
    max-height: none !important;
    overflow-y: visible !important;
    padding-bottom: 1rem !important;
  }
  
  .close {
    width: 36px !important;
    height: 36px !important;
    top: 0.375rem !important;
    right: 0.375rem !important;
    font-size: 1.125rem !important;
  }
  
  .modal-title {
    font-size: 1rem !important;
  }
  
  .form-group input {
    padding: 0.5rem 0.625rem !important;
    min-height: 42px !important;
    font-size: 16px !important;
  }
  
  .gradient-btn,
  .compact-submit-btn {
    /* NO sticky positioning - natural document flow */
    position: relative !important;
    bottom: auto !important;
    
    /* Natural spacing */
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    
    /* Professional button styling */
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    min-height: 48px !important;
    
    /* Normal z-index - no floating */
    z-index: 1 !important;
    
    /* Professional shadow without floating effect */
    box-shadow: 0 4px 12px rgba(99,102,241,0.25), 0 2px 6px rgba(0,0,0,0.1) !important;
  }
  
  .modal-icon svg {
    width: 40px !important;
    height: 40px !important;
  }
  
  .modal-subtitle {
    font-size: 0.8rem !important;
  }
  
  .form-group label {
    font-size: 0.75rem !important;
  }
  
  .form-row {
    gap: 0.375rem !important;
  }
  
  .time-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .time-period-btn {
    font-size: 0.7rem !important;
    min-height: 38px !important;
  }
  
  .gradient-btn,
  .compact-submit-btn {
    font-size: 0.95rem !important;
    min-height: 46px !important;
  }
}

/* Landscape orientation for phones - MAINTAIN BUTTON VISIBILITY */
@media (max-width: 896px) and (orientation: landscape) {
  .modal-overlay {
    align-items: flex-start !important;
    padding-top: 0.5rem !important;
    padding-bottom: max(6rem, env(safe-area-inset-bottom, 6rem)) !important; /* Account for landscape gesture nav */
  }
  
  .modal-content {
    max-height: calc(100vh - 7rem) !important; /* Account for landscape UI */
    max-height: calc(100dvh - 7rem) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .compact-form,
  #customerInfoForm {
    /* Natural content flow */
    max-height: none !important;
    overflow-y: visible !important;
    padding-bottom: 1.5rem !important;
  }
  
  .modal-header {
    /* Natural positioning for professional appearance */
    position: relative !important;
    top: auto !important;
    
    /* Professional styling */
    background: #fff !important;
    z-index: 1 !important;
    margin-bottom: 1rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid var(--border-light, #e2e8f0) !important;
  }
  
  .gradient-btn,
  .compact-submit-btn {
    /* NO sticky positioning - natural document flow */
    position: relative !important;
    bottom: auto !important;
    
    /* Normal z-index */
    z-index: 1 !important;
    
    /* Natural spacing */
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    
    /* Professional shadow */
    box-shadow: 0 4px 12px rgba(99,102,241,0.2), 0 2px 6px rgba(0,0,0,0.1) !important;
  }
}

/* === MODERN MOBILE DEVICE SPECIFIC OPTIMIZATIONS === */

/* iPhone 14 Pro, iPhone 15 series with Dynamic Island */
@media only screen 
  and (device-width: 393px) 
  and (device-height: 852px) 
  and (-webkit-device-pixel-ratio: 3) {
  .modal-overlay {
    padding-bottom: max(12rem, env(safe-area-inset-bottom, 12rem)) !important;
  }
  
  .gradient-btn,
  .compact-submit-btn {
    margin-bottom: 2rem !important;
    z-index: 2000 !important;
  }
}

/* Samsung Galaxy S23, S24 series and similar Android devices */
@media only screen 
  and (min-device-width: 360px) 
  and (max-device-width: 430px) 
  and (min-device-height: 740px) 
  and (max-device-height: 956px) {
  .modal-overlay {
    padding-bottom: max(10rem, env(safe-area-inset-bottom, 10rem)) !important;
  }
  
  .gradient-btn,
  .compact-submit-btn {
    /* NO sticky positioning - natural document flow */
    position: relative !important;
    bottom: auto !important;
    
    /* Natural spacing */
    margin-bottom: 2rem !important;
    margin-top: 1rem !important;
    
    /* Normal z-index */
    z-index: 1 !important;
    
    /* Professional shadow */
    box-shadow: 0 4px 12px rgba(99,102,241,0.2), 0 2px 6px rgba(0,0,0,0.1) !important;
  }
}

/* Generic modern smartphones with gesture navigation */
@media (hover: none) and (pointer: coarse) {
  .modal-overlay {
    /* Use safe area insets for devices that support it */
    padding-bottom: max(8rem, env(safe-area-inset-bottom, 8rem)) !important;
  }
  
  .modal-content {
    /* Ensure sufficient space for gesture navigation */
    margin-bottom: 2rem !important;
  }
  
  .gradient-btn,
  .compact-submit-btn,
  .cta-btn {
    /* NO sticky positioning - natural document flow */
    position: relative !important;
    bottom: auto !important;
    
    /* Normal z-index */
    z-index: 1 !important;
    
    /* Natural spacing */
    margin-top: 1rem !important;
    margin-bottom: 2rem !important;
    
    /* Enhanced touch target */
    min-height: 56px !important;
    padding: 1rem 1.5rem !important;
    
    /* Professional shadow without floating */
    box-shadow: 0 4px 12px rgba(99,102,241,0.25), 
                0 2px 6px rgba(0,0,0,0.1) !important;
    
    /* Ensure text is readable */
    font-weight: 700 !important;
    letter-spacing: 0.025em !important;
  }
  
  /* Special handling for bill modal buttons */
  #bookingBillModal .modal-content > div:last-child {
    /* NO sticky positioning - natural document flow */
    position: relative !important;
    bottom: auto !important;
    
    /* Professional styling */
    background: var(--bg-secondary, #fff) !important;
    padding: 1.5rem 0 2rem 0 !important;
    margin-top: 1rem !important;
    border-top: 2px solid #e2e8f0 !important;
    
    /* Normal z-index */
    z-index: 1 !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .modal-overlay {
    backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.9) !important;
  }
  
  .modal-content {
    border: 3px solid #000 !important;
  }
  
  .form-group input {
    border: 2px solid #000 !important;
  }
  
  .gradient-btn {
    border: 2px solid #000 !important;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-content,
  .gradient-btn,
  .close,
  .time-slot,
  .time-period-btn,
  input,
  button {
    transition: none !important;
    animation: none !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .modal-overlay {
    background: rgba(0, 0, 0, 0.85) !important;
  }
  
  .modal-content {
    background: #1a1a1a !important;
    color: #fff !important;
    border: 1px solid #333 !important;
  }
  
  .form-group input {
    background: #2a2a2a !important;
    color: #fff !important;
    border-color: #444 !important;
  }
  
  .booking-summary-box,
  .booking-bill-summary,
  .custom-time-grid {
    background: #2a2a2a !important;
    border-color: #444 !important;
  }
  
  .time-slot,
  .time-period-btn {
    background: #333 !important;
    border-color: #555 !important;
    color: #fff !important;
  }
}

/* === COMPACT MOBILE MODAL STYLES === */

/* Compact header styles */
.compact-header {
  padding: 0.75rem 1rem !important;
  margin-bottom: 1rem !important;
}

.compact-icon svg {
  width: 32px !important;
  height: 32px !important;
}

.compact-title {
  font-size: 1.125rem !important;
  margin: 0.5rem 0 0.25rem 0 !important;
  line-height: 1.3 !important;
}

.compact-subtitle {
  font-size: 0.85rem !important;
  margin: 0 !important;
  opacity: 0.8 !important;
}

/* Compact form styles */
.compact-form {
  padding: 0 !important;
}

.compact-input {
  margin-bottom: 0.75rem !important;
}

.compact-input label {
  font-size: 0.875rem !important;
  margin-bottom: 0.375rem !important;
  font-weight: 600 !important;
}

.compact-input input {
  padding: 0.625rem 0.75rem !important;
  font-size: 0.9rem !important;
  min-height: 42px !important;
  border-radius: 0.5rem !important;
}

.compact-row {
  gap: 0.5rem !important;
  margin-bottom: 0.75rem !important;
}

.compact-row .compact-input {
  margin-bottom: 0 !important;
}

/* Compact time grid */
.compact-time-grid {
  margin-top: 0.5rem !important;
  padding: 0.75rem !important;
  border-radius: 0.5rem !important;
}

.compact-time-btn {
  padding: 0.375rem 0.75rem !important;
  font-size: 0.8rem !important;
  margin: 0 0.25rem !important;
}

.compact-grid .time-slot {
  padding: 0.375rem !important;
  font-size: 0.8rem !important;
  min-height: 32px !important;
}

/* Compact summary */
.compact-summary {
  padding: 0.75rem !important;
  margin: 0.75rem 0 !important;
  font-size: 0.875rem !important;
  border-radius: 0.5rem !important;
}

/* Compact submit button */
.compact-submit-btn {
  margin-top: 1rem !important;
  padding: 0.875rem 1.25rem !important;
  font-size: 1rem !important;
  min-height: 48px !important;
}

/* Compact bill modal */
.compact-bill-modal {
  max-width: 360px !important;
  margin: 1rem !important;
}

.compact-bill-header {
  padding: 0.625rem 0.875rem !important;
  margin-bottom: 0.75rem !important;
}

.compact-bill-icon svg {
  width: 28px !important;
  height: 28px !important;
}

.compact-bill-title {
  font-size: 1rem !important;
  margin: 0.375rem 0 0.25rem 0 !important;
}

.compact-bill-subtitle {
  font-size: 0.8rem !important;
  margin: 0 !important;
}

.compact-bill-details {
  padding: 0.75rem !important;
  margin: 0.75rem 0 !important;
  font-size: 0.875rem !important;
}

.compact-payment-btn {
  padding: 0.75rem 1rem !important;
  font-size: 0.9rem !important;
  flex: 1 !important;
  min-height: 44px !important;
}

.compact-close {
  width: 36px !important;
  height: 36px !important;
  font-size: 1.25rem !important;
  top: 0.5rem !important;
  right: 0.5rem !important;
}

/* === ENHANCED MOBILE RESPONSIVENESS === */

/* Prevent scrolling issues on iOS */
body.modal-open {
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  -webkit-overflow-scrolling: auto !important;
}

/* Enhanced touch targets for all interactive elements */
button, input, select, textarea, a {
  -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1) !important;
  touch-action: manipulation !important;
}

/* Prevent zoom on input focus for iOS */
input[type="color"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"],
select:focus,
textarea {
  font-size: 16px !important; /* Prevents zoom on iOS */
}

/* Enhanced focus states for better accessibility */
.gradient-btn:focus,
.gold-btn:focus,
input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 2px solid var(--primary, #6366f1) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .modal-overlay {
    backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.9) !important;
  }
  
  .modal-content {
    border: 2px solid #000 !important;
  }
  
  .gradient-btn,
  .gold-btn {
    border: 2px solid #000 !important;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-content,
  .gradient-btn,
  .gold-btn,
  input,
  select,
  textarea {
    transition: none !important;
    animation: none !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .modal-overlay {
    background: rgba(0, 0, 0, 0.85) !important;
  }
  
  .modal-content {
    background: #1a1a1a !important;
    color: #fff !important;
    border: 1px solid #333 !important;
  }
  
  .icon-input input[type="text"],
  .icon-input input[type="email"],
  .icon-input input[type="tel"],
  .icon-input input[type="number"] {
    background: #2a2a2a !important;
    color: #fff !important;
    border-color: #444 !important;
  }
}

/* Ultra-wide mobile optimization (landscape phones) */
@media (max-width: 896px) and (orientation: landscape) {
  .modal-content {
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .modal-header {
    /* Natural positioning for professional appearance */
    position: relative !important;
    top: auto !important;
    
    /* Normal z-index */
    z-index: 1 !important;
    
    /* Professional styling */
    background: var(--bg-primary, #fafbff) !important;
  }
}

/* Extra small screens (older smartphones) */
@media (max-width: 320px) {
  .modal-content {
    margin: 0.25rem !important;
    width: calc(100% - 0.5rem) !important;
    min-height: calc(100vh - 0.5rem) !important;
  }
  
  .icon-input input[type="text"],
  .icon-input input[type="email"],
  .icon-input input[type="tel"],
  .icon-input input[type="number"] {
    padding: 0.625rem 0.75rem !important;
    font-size: 16px !important; /* Prevent zoom */
    min-height: 44px !important;
  }
  
  .gradient-btn {
    padding: 0.75rem 1rem !important;
    font-size: 16px !important;
    min-height: 48px !important;
  }
}

/* Large phones and small tablets in portrait */
@media (min-width: 481px) and (max-width: 768px) {
  .modal-content {
    max-width: 90% !important;
    margin: 2rem auto !important;
  }
  
  .gradient-btn {
    max-width: 300px !important;
    margin: 1rem auto 0 auto !important;
  }
}

/* Tablets in landscape */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
  .modal-content {
    max-width: 600px !important;
    max-height: 80vh !important;
  }
}

/* Enhanced keyboard navigation */
.modal-content:focus-within {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Improve text selection on mobile */
.modal-content * {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

.gradient-btn,
.gold-btn,
button {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* === COMPACT MOBILE OPTIMIZATIONS === */

/* Mobile specific compact optimizations */
@media (max-width: 768px) {
  .modal-content {
    margin: 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    padding: 1rem !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .compact-header {
    padding: 0.5rem 0.75rem !important;
    margin-bottom: 0.875rem !important;
  }
  
  .compact-icon svg {
    width: 28px !important;
    height: 28px !important;
  }
  
  .compact-title {
    font-size: 1rem !important;
    margin: 0.375rem 0 0.25rem 0 !important;
  }
  
  .compact-subtitle {
    font-size: 0.8rem !important;
  }
  
  .compact-input {
    margin-bottom: 0.625rem !important;
  }
  
  .compact-input label {
    font-size: 0.8rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  .compact-input input {
    padding: 0.5rem 0.625rem !important;
    font-size: 16px !important; /* Prevent zoom on iOS */
    min-height: 44px !important;
  }
  
  .compact-row {
    gap: 0.375rem !important;
  }
  
  .compact-summary {
    padding: 0.625rem !important;
    margin: 0.625rem 0 !important;
    font-size: 0.8rem !important;
  }
  
  .compact-submit-btn {
    margin-top: 0.875rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    min-height: 48px !important;
  }
  
  .compact-bill-modal {
    margin: 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
  }
  
  .compact-payment-btn {
    padding: 0.625rem 0.875rem !important;
    font-size: 0.875rem !important;
    min-height: 44px !important;
  }
}

@media (max-width: 600px) {
  .modal-content {
    margin: 0.25rem !important;
    max-width: calc(100% - 0.5rem) !important;
    padding: 0.875rem !important;
  }
  
  .compact-header {
    padding: 0.375rem 0.5rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .compact-icon svg {
    width: 24px !important;
    height: 24px !important;
  }
  
  .compact-title {
    font-size: 0.95rem !important;
    margin: 0.25rem 0 0.125rem 0 !important;
  }
  
  .compact-subtitle {
    font-size: 0.75rem !important;
  }
  
  .compact-input {
    margin-bottom: 0.5rem !important;
  }
  
  .compact-input label {
    font-size: 0.75rem !important;
    margin-bottom: 0.2rem !important;
  }
  
  .compact-input input {
    padding: 0.5rem 0.625rem !important;
    font-size: 16px !important;
    min-height: 42px !important;
  }
  
  .compact-row {
    gap: 0.25rem !important;
  }
  
  .compact-summary {
    padding: 0.5rem !important;
    margin: 0.5rem 0 !important;
    font-size: 0.75rem !important;
  }
  
  .compact-submit-btn {
    margin-top: 0.75rem !important;
    padding: 0.625rem 0.875rem !important;
    font-size: 0.95rem !important;
    min-height: 46px !important;
  }
  
  .compact-payment-btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
    min-height: 42px !important;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 0.125rem !important;
    max-width: calc(100% - 0.25rem) !important;
    padding: 0.75rem !important;
  }
  
  .compact-header {
    padding: 0.25rem 0.375rem !important;
    margin-bottom: 0.625rem !important;
  }
  
  .compact-title {
    font-size: 0.9rem !important;
  }
  
  .compact-subtitle {
    font-size: 0.7rem !important;
  }
  
  .compact-input {
    margin-bottom: 0.375rem !important;
  }
  
  .compact-input label {
    font-size: 0.7rem !important;
    margin-bottom: 0.15rem !important;
  }
  
  .compact-input input {
    padding: 0.4rem 0.5rem !important;
    font-size: 16px !important;
    min-height: 40px !important;
  }
  
  .compact-summary {
    padding: 0.4rem !important;
    margin: 0.4rem 0 !important;
    font-size: 0.7rem !important;
  }
  
  .compact-submit-btn {
    margin-top: 0.625rem !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
    min-height: 44px !important;
  }
}

@media (max-width: 360px) {
  .modal-content {
    margin: 0 !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    padding: 0.625rem !important;
    border-radius: 0 !important;
  }
  
  .compact-header {
    padding: 0.2rem 0.25rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .compact-icon svg {
    width: 20px !important;
    height: 20px !important;
  }
  
  .compact-title {
    font-size: 0.85rem !important;
  }
  
  .compact-subtitle {
    font-size: 0.65rem !important;
  }
  
  .compact-input {
    margin-bottom: 0.3rem !important;
  }
  
  .compact-input label {
    font-size: 0.65rem !important;
    margin-bottom: 0.1rem !important;
  }
  
  .compact-input input {
    padding: 0.375rem 0.5rem !important;
    font-size: 16px !important;
    min-height: 38px !important;
  }
  
  .compact-row {
    gap: 0.15rem !important;
  }
  
  .compact-summary {
    padding: 0.375rem !important;
    margin: 0.375rem 0 !important;
    font-size: 0.65rem !important;
  }
  
  .compact-submit-btn {
    margin-top: 0.5rem !important;
    padding: 0.5rem 0.625rem !important;
    font-size: 0.85rem !important;
    min-height: 42px !important;
  }
  
  .compact-payment-btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.75rem !important;
    min-height: 40px !important;
  }
  
  .compact-close {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.1rem !important;
    top: 0.25rem !important;
    right: 0.25rem !important;
  }
}

/* Landscape orientation for phones */
@media (max-width: 896px) and (orientation: landscape) {
  .modal-content {
    max-height: 95vh !important;
    overflow-y: auto !important;
    margin: 0.25rem auto !important;
  }
  
  .compact-header {
    padding: 0.375rem 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .compact-input {
    margin-bottom: 0.4rem !important;
  }
  
  .compact-summary {
    margin: 0.4rem 0 !important;
  }
  
  .compact-submit-btn {
    margin-top: 0.5rem !important;
  }
}

/* === MOBILE PERFORMANCE OPTIMIZATIONS === */

/* Improve scrolling performance on mobile */
.modal-overlay {
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
}

.modal-content {
  will-change: transform !important;
  -webkit-transform: translateZ(0) !important;
  transform: translateZ(0) !important;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* Enhanced accessibility */
.modal-overlay[aria-hidden="true"] {
  display: none !important;
}

.modal-overlay[aria-hidden="false"] {
  display: flex !important;
}

/* Focus management */
.modal-content:focus {
  outline: none !important;
}

.modal-content *:focus-visible {
  outline: 2px solid var(--primary, #6366f1) !important;
  outline-offset: 2px !important;
}

/* Improve tap targets for better usability */
button,
input[type="submit"],
input[type="button"],
.time-slot,
.time-period-btn {
  min-height: 44px !important;
  min-width: 44px !important;
}

/* Prevent text selection on buttons */
button,
.time-slot,
.time-period-btn,
.close {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  user-select: none !important;
}

/* Allow text selection in form fields */
input,
textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  user-select: text !important;
}

/* === FINAL MOBILE ENHANCEMENTS === */

/* Ensure modal is always properly centered */
.modal-overlay {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Prevent modal content from being too wide on very large screens */
@media (min-width: 1200px) {
  .modal-content {
    max-width: 480px !important;
  }
}

/* Ultra-wide screen support */
@media (min-width: 1400px) {
  .modal-content {
    max-width: 520px !important;
    padding: 2.5rem 2rem 2rem 2rem !important;
  }
}


