/* ============================================================================
   FONT IMPORTS
   ============================================================================
   Inter: Primary font for body text and UI elements (clean, readable)
   Poppins: Display font for headings and brand names (bold, modern)
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');

/* ============================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================================================
   Centralized color, spacing, and design token definitions
   Makes it easy to update theme colors and spacing consistently
   ============================================================================ */

:root {
  /* Primary Colors: Purple gradient theme */
  --color-primary-purple: #667eea;
  --color-primary-violet: #764ba2;
  --color-primary-dark: #1a1a2e;
  --color-primary-gray: #4a5568;
  
  /* Background Colors: Whitish theme with transparency */
  --color-background-white: rgba(255, 255, 255, 0.9);
  --color-background-white-light: rgba(255, 255, 255, 0.85);
  --color-background-white-lighter: rgba(255, 255, 255, 0.95);
  --color-background-white-transparent: rgba(255, 255, 255, 0.6);
  --color-background-overlay: rgba(0, 0, 0, 0.5);
  
  /* Border Colors: Subtle purple borders */
  --color-border-purple-light: rgba(99, 102, 241, 0.15);
  --color-border-purple-medium: rgba(99, 102, 241, 0.3);
  --color-border-purple-strong: rgba(99, 102, 241, 0.4);
  --color-border-purple-dark: rgba(99, 102, 241, 0.5);
  
  /* Shadow Colors: Soft shadows for depth */
  --color-shadow-light: rgba(0, 0, 0, 0.08);
  --color-shadow-medium: rgba(0, 0, 0, 0.1);
  --color-shadow-strong: rgba(0, 0, 0, 0.15);
  --color-shadow-purple: rgba(99, 102, 241, 0.15);
  --color-shadow-purple-glow: rgba(99, 102, 241, 0.3);
  
  /* Background Gradient: Whitish futuristic theme */
  --gradient-background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 50%, #f0f4f8 100%);
  --gradient-text-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-shimmer: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), rgba(139, 92, 246, 0.6), rgba(99, 102, 241, 0.6), transparent);
  --gradient-border-left: linear-gradient(180deg, #667eea, #764ba2);
  
  /* Spacing: Consistent spacing scale */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-xxl: 24px;
  --spacing-xxxl: 32px;
  
  /* Border Radius: Consistent rounded corners */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 50%;
  
  /* Blur Effects: Glassmorphism blur values */
  --blur-sm: 4px;
  --blur-md: 20px;
  --blur-lg: 30px;
  
  /* Z-Index Layers: Stacking order */
  --z-index-base: 1;
  --z-index-header-button: 10;
  --z-index-modal: 1000;
  
  /* Animation Durations: Consistent timing */
  --animation-fast: 0.2s;
  --animation-normal: 0.3s;
  --animation-slow: 0.8s;
  
  /* Font Sizes: Typography scale */
  --font-size-xs: 10px;
  --font-size-sm: 11px;
  --font-size-base: 12px;
  --font-size-md: 13px;
  --font-size-lg: 14px;
  --font-size-xl: 15px;
  --font-size-xxl: 16px;
  --font-size-title-sm: 18px;
  --font-size-title-md: 20px;
  --font-size-title-lg: 22px;
  --font-size-title-xl: 24px;
  --font-size-title-xxl: 26px;
  
  /* Icon Sizes: Consistent icon dimensions */
  --icon-size-sm: 24px;
  --icon-size-md: 32px;
  --icon-size-lg: 42px;
  --icon-size-xl: 50px;
}

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

/* Box-sizing reset: Makes padding/borders included in element width calculations */
* {
  box-sizing: border-box;
}

/* Full-height layout: Ensures page takes full viewport height */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Whitish gradient background: Modern futuristic theme */
  background: var(--gradient-background);
  background-attachment: fixed; /* Gradient stays fixed during scroll */
  overflow-x: hidden; /* Prevent horizontal scrolling */
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================================
   MAIN CONTAINER LAYOUT
   ============================================================================
   Flexbox column layout: Header (fixed), Info panel (auto), Map (flexible)
   ============================================================================ */

#container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ============================================================================
   HEADER SECTION
   ============================================================================
   Glassmorphism design: Semi-transparent white with blur effect
   Contains hospital logo and brand name (dynamically updated via JavaScript)
   ============================================================================ */

#header {
  flex: 0 0 auto; /* Fixed height, doesn't grow/shrink */
  background: var(--color-background-white); /* Semi-transparent white */
  backdrop-filter: blur(var(--blur-md)); /* Glassmorphism blur effect */
  -webkit-backdrop-filter: blur(var(--blur-md)); /* Safari support */
  padding: var(--spacing-md) var(--spacing-xl);
  border-bottom: 1px solid var(--color-border-purple-light); /* Subtle purple border */
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  box-shadow: 0 4px 24px var(--color-shadow-light); /* Soft shadow for depth */
  position: relative;
  overflow: visible; /* Allow dropdown menu to be visible */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Animated shimmer effect: Gradient bar that slides across header top */
#header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-shimmer);
  animation: shimmer 3s infinite; /* Continuous animation */
}

/* Shimmer animation: Slides gradient from left to right */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Initially hidden: Prevents UI flicker while API data loads
   JavaScript removes this class after data is fetched */
#header.initially-hidden {
  display: none;
}

/* Hospital logo: Sized and styled with subtle shadow and hover effect */
#header img {
  height: var(--icon-size-xl);
  width: auto;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.2)); /* Purple-tinted shadow */
  transition: transform var(--animation-normal) ease;
  flex-shrink: 0;
  max-width: 100%;
}

/* Logo hover effect: Slight scale-up for interactivity */
#header img:hover {
  transform: scale(1.05);
}

/* Brand name: Gradient text effect using Poppins font
   Gradient goes from purple (#667eea) to violet (#764ba2) */
#header .brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: var(--font-size-title-xxl);
  font-weight: 800;
  background: var(--gradient-text-brand);
  -webkit-background-clip: text; /* Clip background to text shape */
  -webkit-text-fill-color: transparent; /* Make text transparent to show gradient */
  background-clip: text;
  letter-spacing: -0.5px; /* Tighter letter spacing for modern look */
  flex: 1; /* Allow brand name to take available space */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Call button: Visible only on mobile screens (≤480px), positioned at extreme right */
.call-button {
  display: none !important; /* Hidden by default, shown only on mobile via media query */
  align-items: center;
  justify-content: center;
  width: var(--icon-size-xl);
  height: var(--icon-size-xl);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-background-white-lighter);
  color: var(--color-primary-purple);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--color-shadow-medium);
  transition: all var(--animation-normal) ease;
  position: relative;
  z-index: 10;
  flex-shrink: 0; /* Prevent button from shrinking */
  margin-left: auto; /* Push to extreme right */
}

.call-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--color-shadow-strong);
  background: rgba(255, 255, 255, 1);
}

.call-button:active {
  transform: scale(0.95);
}

/* Call Modal: Full-screen overlay with centered modal dialog */
.call-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow: hidden;
}

.call-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-background-overlay);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.call-modal-content {
  position: relative;
  background: var(--color-background-white-lighter);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid var(--color-border-purple-light);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn var(--animation-normal) ease;
  box-sizing: border-box;
  margin: 0 auto;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.call-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  flex-shrink: 0;
  min-width: 0;
}

.call-modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: var(--font-size-title-md);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-modal-close {
  width: var(--icon-size-md);
  height: var(--icon-size-md);
  border: none;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary-purple);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-title-md);
  font-weight: 600;
  transition: all var(--animation-fast) ease;
  padding: 0;
}

.call-modal-close:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: scale(1.1);
}

.call-modal-close:active {
  transform: scale(0.95);
}

.call-modal-body {
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  box-sizing: border-box;
}

.call-modal-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 14px;
  border: 2px solid var(--color-border-purple-light);
  border-radius: var(--radius-lg);
  background: var(--color-background-white-transparent);
  cursor: pointer;
  transition: all var(--animation-normal) ease;
  text-align: left;
  width: 100%;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  min-width: 0;
  flex-shrink: 0;
}

.call-modal-option > div {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.call-modal-option:hover {
  background: var(--color-background-white-lighter);
  border-color: var(--color-border-purple-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--color-shadow-purple);
}

.call-modal-option:active {
  transform: translateY(0);
}

.call-option-label {
  font-size: var(--font-size-xxl);
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: var(--spacing-xs);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-option-phone {
  font-size: var(--font-size-lg);
  color: var(--color-primary-purple);
  font-weight: 500;
  word-break: break-all;
  overflow-wrap: break-word;
  min-width: 0;
}

.call-modal-footer {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.call-modal-cancel {
  padding: var(--spacing-md) var(--spacing-xxxl);
  border: 2px solid var(--color-border-purple-medium);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-primary-purple);
  font-family: 'Inter', sans-serif;
  font-size: var(--font-size-xl);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--animation-normal) ease;
  min-width: 120px;
}

.call-modal-cancel:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--color-border-purple-dark);
}

.call-modal-cancel:active {
  transform: scale(0.98);
}

/* ============================================================================
   INFO PANEL SECTION
   ============================================================================
   Displays vehicle tracking information: pilot, ambulance, booking details, ETA
   Glassmorphism design matching header, with gradient left border accent
   ============================================================================ */

#info {
  flex: 0 0 auto; /* Fixed height based on content */
  background: var(--color-background-white-light); /* Slightly more transparent than header */
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  font-family: 'Inter', sans-serif;
  color: var(--color-primary-dark); /* Dark text for readability */
  line-height: 1.5;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  /* Gradient left border: Purple to violet vertical gradient */
  border-left: 3px solid transparent;
  border-image: var(--gradient-border-left) 1;
  transition: all var(--animation-normal) ease;
}

/* Info panel hover: Slightly more opaque and enhanced shadow */
#info:hover {
  background: var(--color-background-white-lighter);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Section title: Small uppercase heading (currently unused but available) */
#info .title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: var(--font-size-base);
  margin-bottom: 6px;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Info row: Each data field (label + value pair)
   Flexbox layout ensures labels and values align vertically across rows */
#info .row {
  margin: var(--spacing-xs) 0;
  font-size: var(--font-size-xl);
  display: flex;
  align-items: baseline; /* Aligns label and value baselines */
  gap: 6px;
  padding: var(--spacing-xs) 0;
  border-left: 2px solid transparent; /* Becomes visible on hover */
  padding-left: 10px;
  transition: all var(--animation-fast) ease;
}

/* Row hover effect: Purple accent border and subtle background highlight */
#info .row:hover {
  border-left-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.08);
  padding-left: 16px; /* Slight indent on hover */
  border-radius: 6px;
}

/* Label: Field name (e.g., "Pilot:", "Phone:")
   Fixed width ensures all content values align vertically */
#info .label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--color-primary-gray); /* Medium gray for labels */
  flex-shrink: 0; /* Prevents label from shrinking */
  font-size: var(--font-size-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap; /* Prevents label text wrapping */
  min-width: 140px; /* Fixed width for vertical alignment */
  width: 140px;
}

/* Value: Field content (e.g., pilot name, phone number)
   Flexible width to accommodate varying content lengths */
#info .value {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  color: var(--color-primary-dark); /* Dark text for values */
  font-weight: 500;
  font-size: var(--font-size-xl);
  flex: 0 1 auto; /* Can grow/shrink as needed */
}

/* Info grid: Two-column layout for organizing information
   Left column: Pilot and ambulance info
   Right column: Booking details and ETA */
#info .info-grid {
  display: flex;
  gap: 20px;
  margin-top: 4px;
  align-items: flex-start;
  flex-wrap: wrap; /* Wraps to single column on small screens */
}

/* Column: Each side of the two-column layout
   Glassmorphism card design with hover effects */
#info .col {
  flex: 1 1 45%; /* Each column takes ~45% width */
  min-width: 240px; /* Minimum width before wrapping */
  background: var(--color-background-white-transparent); /* More transparent than parent */
  padding: 10px var(--spacing-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-purple-light);
  transition: all var(--animation-normal) ease;
}

/* Column hover: Enhanced visibility and subtle lift effect */
#info .col:hover {
  background: var(--color-background-white-lighter);
  border-color: var(--color-border-purple-strong);
  transform: translateY(-2px); /* Slight upward movement */
  box-shadow: 0 8px 24px var(--color-shadow-purple);
}

/* Body wrapper: Provides spacing between title and grid */
#info .body {
  padding-top: 2px;
}

/* ============================================================================
   INFO PANEL STATES
   ============================================================================
   Different display modes for info panel based on application state
   ============================================================================ */

/* Fullscreen message: Error state when tenant API fails
   Takes full viewport height, hides header and map */
#info.fullscreen-message {
  flex: 1 1 auto; /* Takes remaining vertical space */
  border-bottom: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-title-md);
  color: var(--color-primary-dark);
  background: var(--color-background-white);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
}

/* Center message: Error/info state when header should remain visible
   Shows message centered below header (e.g., "No live trip found") */
#info.center-message {
  flex: 1 1 auto;
  border-bottom: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--font-size-title-sm);
  padding: 0 var(--spacing-xxl);
  color: var(--color-primary-dark);
  background: var(--color-background-white);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
}

/* Loading state: Shows circular spinner with loading text
   Used during API calls and initialization */
#info.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg); /* Space between spinner and text */
  text-align: center;
  background: var(--color-background-white);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
}

/* Circular loading spinner: Gradient border animation
   Purple gradient rotates continuously to indicate loading */
#info .loader {
  width: var(--icon-size-md);
  height: var(--icon-size-md);
  border-radius: var(--radius-full);
  border: 4px solid rgba(99, 102, 241, 0.2); /* Light purple base */
  border-top-color: var(--color-primary-purple); /* Purple top */
  border-right-color: var(--color-primary-violet); /* Violet right */
  animation: spin var(--animation-slow) linear infinite; /* Continuous rotation */
  box-shadow: 0 0 15px var(--color-shadow-purple-glow); /* Glow effect */
}

/* Loading text: Message displayed next to spinner */
#info .loading-text {
  font-size: var(--font-size-xxl);
  color: var(--color-primary-dark);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Spin animation: Rotates loader 360 degrees continuously */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================================
   MAP CONTAINER
   ============================================================================
   Google Maps instance takes remaining vertical space
   ============================================================================ */

#map {
  flex: 1 1 auto; /* Takes all remaining vertical space */
  min-height: 400px; /* Minimum height to ensure map is visible */
  border-radius: 0;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05); /* Subtle inner shadow */
}

/* ============================================================================
   RESPONSIVE DESIGN - DESKTOP (min-width: 1025px)
   ============================================================================
   Desktop-specific styles
   ============================================================================ */

@media (min-width: 1025px) {
  /* Hide call button on desktop screens */
  .call-button {
    display: none !important;
  }
}

/* ============================================================================
   RESPONSIVE DESIGN - TABLET (769px - 1024px)
   ============================================================================
   Adjusts spacing and font sizes for tablet-sized screens
   ============================================================================ */

@media (max-width: 1024px) and (min-width: 769px) {
  #header {
    padding: 14px 18px;
    gap: 16px;
  }

  /* Hide call button on tablet screens */
  .call-button {
    display: none !important;
  }

  #header img {
    height: 46px;
  }

  #header .brand-name {
    font-size: 24px;
  }

  #info {
    padding: 14px 18px;
  }

  #info .info-grid {
    gap: 24px;
  }

  #info .col {
    min-width: 280px;
  }

  #info .label {
    min-width: 135px;
    width: 135px;
  }
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE/TABLET (max-width: 768px)
   ============================================================================
   Single-column layout, reduced font sizes, optimized spacing
   ============================================================================ */

@media (max-width: 768px) and (min-width: 481px) {
  #header {
    padding: 12px 16px;
    gap: 14px;
    position: relative;
    overflow: visible;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Hide call button on small tablet/large mobile screens (481px - 768px) */
  .call-button {
    display: none !important;
  }
  
  /* Modal adjustments for mobile */
  .call-modal {
    padding: 12px;
  }
  
  .call-modal-content {
    max-width: calc(100% - 24px);
  }
  
  .call-modal-header {
    padding: 14px 16px;
  }
  
  .call-modal-title {
    font-size: 18px;
  }
  
  .call-modal-body {
    padding: 16px;
  }
  
  .call-modal-footer {
    padding: 14px 16px;
  }
  
  .call-modal-option {
    padding: 12px;
    gap: 10px;
  }
  
  .call-option-label {
    font-size: 15px;
  }
  
  .call-option-phone {
    font-size: 13px;
    word-break: break-all;
  }

  /* Hide call button on medium mobile/tablet screens */
  .call-button {
    display: none !important;
  }

  #header img {
    height: 42px;
  }

  #header .brand-name {
    font-size: 22px;
  }

  #info {
    padding: 12px 16px;
  }

  #info .title {
    font-size: 11px;
    margin-bottom: 6px;
  }

  #info .row {
    font-size: 14px;
    margin: 4px 0;
    gap: 8px;
    padding: 4px 0;
    padding-left: 8px;
  }

  #info .label {
    font-size: 12px;
    min-width: 140px;
    width: 140px;
  }

  #info .value {
    font-size: 14px;
  }

  #info .info-grid {
    gap: 20px;
    margin-top: 4px;
    flex-direction: column;
  }

  #info .col {
    flex: 1 1 100%;
    min-width: unset;
    width: 100%;
    padding: 12px 14px;
  }

  #map {
    min-height: 350px;
  }

  #info.fullscreen-message,
  #info.center-message {
    font-size: 16px;
    padding: 0 20px;
  }

  #info .loading-text {
    font-size: 14px;
  }

  #info .loader {
    width: 28px;
    height: 28px;
  }
}

/* ============================================================================
   RESPONSIVE DESIGN - SMALL MOBILE (max-width: 480px)
   ============================================================================
   Further reduced sizes, tighter spacing, label wrapping enabled
   ============================================================================ */

@media (max-width: 480px) {
  #header {
    padding: 10px 14px;
    gap: 12px;
  }

  /* Show call button only on mobile screens (≤480px) - JavaScript will control visibility based on phone availability */
  .call-button {
    display: flex !important;
    width: 50px;
    height: 50px;
  }

  /* Ensure hospital logo matches call button size on mobile */
  #header img {
    height: 50px;
    width: 50px;
    object-fit: contain;
  }

  #header .brand-name {
    font-size: 20px;
  }

  #info {
    padding: 10px 14px;
  }

  #info .title {
    font-size: 10px;
    margin-bottom: 6px;
  }

  #info .row {
    font-size: 13px;
    margin: 5px 0;
    gap: 6px;
    padding: 4px 0;
    padding-left: 6px;
    flex-wrap: wrap;
  }

  #info .label {
    font-size: 11px;
    min-width: 130px;
    width: 130px;
  }

  #info .value {
    font-size: 13px;
    flex: 1;
    min-width: 0;
  }

  #info .info-grid {
    gap: 16px;
    margin-top: 4px;
  }

  #info .col {
    padding: 10px 12px;
  }

  #map {
    min-height: 300px;
  }

  #info.fullscreen-message,
  #info.center-message {
    font-size: 15px;
    padding: 0 16px;
    line-height: 1.5;
  }

  #info .loading-text {
    font-size: 13px;
  }

  #info .loader {
    width: 24px;
    height: 24px;
  }
}

/* ============================================================================
   RESPONSIVE DESIGN - EXTRA SMALL MOBILE (max-width: 360px)
   ============================================================================
   Minimum sizes for very small devices, ensures usability
   ============================================================================ */

@media (max-width: 360px) {
  #header {
    padding: 8px 12px;
    gap: 10px;
  }

  #header img {
    height: 35px;
  }

  #header .brand-name {
    font-size: 18px;
  }

  #info {
    padding: 8px 12px;
  }

  #info .row {
    font-size: 12px;
    margin: 4px 0;
  }

  #info .label {
    font-size: 10px;
    min-width: 120px;
    width: 120px;
  }

  #info .value {
    font-size: 12px;
  }

  #info .col {
    padding: 8px 10px;
  }

  #map {
    min-height: 250px;
  }
}