/* ==========================================================================
   CHEF MINUTE MARTINIQUE - ANTILLES LUXURY STYLESHEET
   Aesthetic: White Linen, Tropical Wood (Teak & Mahogany), Turquoise Lagoon Accents
   Typography: Cormorant Garamond (Serif) & Plus Jakarta Sans (Sans-Serif)
   ========================================================================== */

:root {
  /* Antilles Luxury Color Palette */
  --color-palm: #0B2017;             /* Deep Tropical Palm / Teak Shadow */
  --color-palm-light: #153527;       /* Palm Leaf Mid */
  --color-palm-subtle: #234737;      /* Palm Tint */

  /* White Linen Textures */
  --color-linen: #FAF8F5;            /* Crisp White Linen / Warm Bleached Ecru */
  --color-linen-pure: #FFFFFF;       /* Pure Linen Daybed White */
  --color-linen-dark: #F3EFE8;       /* Pressed Linen Shadow */
  
  /* Tropical Wood: Teak & Mahogany */
  --color-teak: #7C4D28;             /* Polished Teak Sundeck */
  --color-teak-dark: #4A2E18;        /* Deep West Indian Mahogany */
  --color-teak-light: #9C663B;       /* Sunlit Honey Teak */
  --color-wood-border: rgba(124, 77, 40, 0.25);

  /* Caribbean Sea Turquoise Accents */
  --color-turquoise: #0891B2;        /* Caribbean Reef Turquoise */
  --color-turquoise-light: #06B6D4;  /* Crystalline Lagoon Cyan */
  --color-turquoise-accent: #14B8A6; /* Saint-Barth Shallows Teal */
  --color-turquoise-soft: #ECFEFF;   /* Turquoise Sheer Water Tint */
  --color-turquoise-glow: rgba(6, 182, 212, 0.22);

  --color-gold: #C5A572;             /* Warm Champagne Amber */
  --color-gold-hover: #B89358;

  /* Typography Stacks */
  --font-serif: 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--color-linen);
  color: var(--color-palm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden !important;
  overflow-x: clip !important;
  width: 100% !important;
  max-width: 100vw !important;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden !important;
  overflow-x: clip !important;
  width: 100% !important;
  max-width: 100vw !important;
  line-height: 1.6;
  background-color: var(--color-linen);
  position: relative;
  touch-action: manipulation;
}

#homepage-live-radar-map {
  width: 100% !important;
  height: 100% !important;
  min-height: 460px !important;
  position: relative !important;
  display: block !important;
  background: #0B2017 !important;
}

#homepage-live-radar-map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  min-height: 460px !important;
  background: #0B2017 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Ensure Leaflet tiles are never constrained or hidden by Tailwind preflight */
.leaflet-container img {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-tile {
  visibility: visible !important;
  opacity: 1 !important;
  max-width: none !important;
  max-height: none !important;
  -webkit-user-drag: none;
  user-select: none;
}

.leaflet-tile-loaded {
  opacity: 1 !important;
  visibility: visible !important;
}

.leaflet-map-pane {
  z-index: 200 !important;
}
.leaflet-tile-pane {
  z-index: 200 !important;
}
.leaflet-overlay-pane {
  z-index: 300 !important;
  pointer-events: none !important;
}
.leaflet-shadow-pane {
  z-index: 350 !important;
  pointer-events: none !important;
}
.leaflet-marker-pane {
  z-index: 600 !important;
  pointer-events: auto !important;
}
.leaflet-tooltip-pane {
  z-index: 650 !important;
  pointer-events: none !important;
}
.leaflet-popup-pane {
  z-index: 700 !important;
  pointer-events: auto !important;
}
.leaflet-top, .leaflet-bottom {
  z-index: 420 !important;
  pointer-events: none !important;
}
.leaflet-control {
  pointer-events: auto !important;
}

/* Subtle Linen Texture Background */
.linen-surface {
  background-color: var(--color-linen);
  background-image: radial-gradient(rgba(124, 77, 40, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-linen);
}
::-webkit-scrollbar-thumb {
  background: var(--color-teak-light);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-turquoise);
}

/* Typography Helpers */
.font-serif {
  font-family: var(--font-serif);
}
.font-sans {
  font-family: var(--font-sans);
}

/* Color & Texture Utilities */
.bg-linen { background-color: var(--color-linen); }
.bg-linen-pure { background-color: var(--color-linen-pure); }
.bg-linen-dark { background-color: var(--color-linen-dark); }
.bg-teak { background-color: var(--color-teak); }
.bg-teak-dark { background-color: var(--color-teak-dark); }
.bg-turquoise { background-color: var(--color-turquoise); }
.bg-turquoise-light { background-color: var(--color-turquoise-light); }
.bg-turquoise-soft { background-color: var(--color-turquoise-soft); }

.text-teak { color: var(--color-teak); }
.text-teak-dark { color: var(--color-teak-dark); }
.text-teak-light { color: var(--color-teak-light); }
.text-turquoise { color: var(--color-turquoise); }
.text-turquoise-light { color: var(--color-turquoise-light); }
.text-turquoise-accent { color: var(--color-turquoise-accent); }

.border-teak { border-color: var(--color-teak); }
.border-teak-dark { border-color: var(--color-teak-dark); }
.border-teak-light { border-color: var(--color-teak-light); }
.border-turquoise { border-color: var(--color-turquoise); }
.border-turquoise-light { border-color: var(--color-turquoise-light); }

/* Tropical Wood Panel & Accent Trims */
.wood-trim {
  border-top: 2px solid var(--color-teak);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.wood-card {
  border: 1px solid rgba(124, 77, 40, 0.2);
  background: var(--color-linen-pure);
  transition: all 0.3s ease;
}
.wood-card:hover {
  border-color: var(--color-turquoise);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.12);
}

/* Turquoise Glow Effects */
.turquoise-glow {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
}
.turquoise-badge {
  background-color: rgba(6, 182, 212, 0.1);
  color: var(--color-turquoise);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Smooth Interactive Elements */
a, button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Filter Buttons */
.filter-btn {
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}
.filter-btn.active {
  background-color: var(--color-palm) !important;
  color: var(--color-linen) !important;
  border-color: var(--color-turquoise) !important;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25) !important;
}

/* Plate Item Hover Effects */
.plate-item {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.plate-item:hover {
  transform: translateY(-4px);
}

/* Modal Active Animations */
#lightbox-modal.active,
#cm-portal-modal.active,
#cm-booking-modal.active,
#cm-chat-modal.active {
  display: flex !important;
  opacity: 1 !important;
}

#lightbox-modal.active #lightbox-content,
#cm-portal-modal.active > div,
#cm-booking-modal.active > div,
#cm-chat-modal.active > div {
  transform: scale(1) !important;
}

/* Chat Typing Animation */
@keyframes typing-pulse {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.typing-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: currentColor;
  animation: typing-pulse 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Range input styling */
input[type="range"] {
  accent-color: var(--color-turquoise);
}

/* Details summary clean marker */
details summary::-webkit-details-marker {
  display: none;
}

/* ==========================================================================
   MOBILE-FIRST ADAPTIVE LAYOUT & DEVICE SCREEN OPTIMIZATION
   Auto-adapts to iPhone, Android, iPad/Tablets, MacBooks & Ultrawide Desktops
   ========================================================================== */

/* Safe area padding for notch & dynamic island */
body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Fluid Clamp Typography */
h1 {
  font-size: clamp(1.75rem, 5.5vw, 4.25rem) !important;
  line-height: 1.1 !important;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 3.25rem) !important;
  line-height: 1.18 !important;
}

/* Utility to hide scrollbars on horizontal swipeable rails */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Smartphone / Small Screen Optimizations (<640px) */
@media (max-width: 640px) {
  h1 {
    font-size: clamp(1.6rem, 7vw, 2.15rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.02em !important;
  }

  h1 span.block {
    margin-top: 0.25rem !important;
  }

  /* Compact Hero Description on phones to preserve first-fold anteprima */
  #hero-desc, .hero-lead-text {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    margin-bottom: 1.25rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Compact Moon Drive box */
  .moon-drive-box {
    padding: 0.85rem !important;
    border-radius: 20px !important;
  }

  /* Map Marker scaling on small mobile devices */
  .cm-map-marker {
    transform: scale(0.85);
  }
  .cm-map-marker:hover {
    transform: scale(1.05);
  }

  .cm-marker-tooltip {
    display: none !important; /* Keep map clean on mobile touch; popup shows on tap */
  }

  /* Popup sizing on mobile */
  .leaflet-popup-content {
    min-width: 250px !important;
    max-width: 280px !important;
  }

  .cm-luxury-popup {
    padding: 10px !important;
    border-radius: 20px !important;
  }

  /* Mobile Radar Map: exactly ~60% of viewport */
  .cm-radar-map-wrapper {
    height: 60vh !important;
    min-height: 420px !important;
    max-height: 560px !important;
    border-radius: 20px !important;
  }
  #homepage-live-radar-map {
    min-height: 420px !important;
    border-radius: 20px !important;
  }
}

/* Luxury 2x2 Services Grid & Native Mobile Tab Bar */
.cm-service-card-2x2 {
  border-radius: 20px !important;
  min-height: 98px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1023px) {
  #homepage-staff-sidebar-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 8px !important;
  }
  #homepage-staff-sidebar-list .cm-staff-card {
    min-width: 275px !important;
    max-width: 290px !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
    border-radius: 20px !important;
  }
}

/* Tablet Optimizations (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.25rem) !important;
  }
  
  .cm-map-marker {
    transform: scale(0.95);
  }
}

/* Retina Screen Crisp Rendering */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .cm-marker-bubble {
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  }
}

/* ==========================================================================
   LEAFLET LUXURY RADAR MAP & CUSTOM PINS (Chef Minute Haute Conciergerie)
   ========================================================================== */
.cm-custom-div-icon {
  background: transparent !important;
  border: none !important;
}

.cm-map-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.cm-map-marker:hover {
  transform: scale(1.18);
  z-index: 9999 !important;
}

.cm-marker-pulse {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #C5A572;
  animation: cm-pulse-ring 2.2s infinite ease-out;
  pointer-events: none;
}

@keyframes cm-pulse-ring {
  0% { transform: translateX(-50%) scale(0.7); opacity: 0.9; }
  100% { transform: translateX(-50%) scale(2.2); opacity: 0; }
}

.cm-marker-bubble {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0B2017;
  border: 2.5px solid #C5A572;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  font-size: 19px;
  transition: border-color 0.2s ease;
}

.cm-marker-live-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 6px #10B981;
}

.cm-marker-tooltip {
  margin-top: 4px;
  background: rgba(11, 32, 23, 0.92);
  backdrop-filter: blur(8px);
  color: #FAF8F5;
  border: 1px solid rgba(197, 165, 114, 0.5);
  border-radius: 9999px;
  padding: 2px 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cm-marker-price {
  color: #C5A572;
  font-family: monospace;
}

/* Custom Popup Styling */
.leaflet-popup-content-wrapper {
  background: #FAF8F5 !important;
  color: #0B2017 !important;
  border-radius: 20px !important;
  border: 1.5px solid #C5A572 !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
  min-width: 270px !important;
  max-width: 320px !important;
}

.leaflet-popup-tip {
  background: #FAF8F5 !important;
  border-left: 1.5px solid #C5A572 !important;
  border-bottom: 1.5px solid #C5A572 !important;
}

.cm-luxury-popup {
  padding: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.cm-popup-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 10px;
}

.cm-popup-role-badge {
  background: rgba(197, 165, 114, 0.18);
  color: #8A6831;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 9999px;
}

.cm-popup-rating {
  font-weight: 700;
  color: #0B2017;
}

.cm-popup-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.cm-popup-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #C5A572;
  flex-shrink: 0;
  background: #0B2017;
}

.cm-popup-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-popup-info {
  flex: 1;
  min-width: 0;
}

.cm-popup-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 700;
  color: #0B2017;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-popup-location {
  font-size: 10px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.cm-popup-status {
  font-size: 9px;
  color: #888;
  margin-top: 1px;
}

.cm-popup-headline {
  font-size: 11px;
  color: #444;
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cm-popup-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid #E5DCD0;
  border-bottom: 1px solid #E5DCD0;
  margin-bottom: 10px;
}

.cm-popup-price {
  font-size: 16px;
  font-weight: 800;
  color: #0B2017;
  font-family: monospace;
}

.cm-popup-unit {
  font-size: 10px;
  color: #777;
}

.cm-popup-haccp {
  font-size: 9px;
  color: #059669;
  font-weight: 700;
}

.cm-popup-actions {
  display: flex;
  gap: 6px;
}

.cm-popup-btn-book {
  flex: 2;
  background: #0B2017;
  color: #FAF8F5;
  border: none;
  padding: 8px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.cm-popup-btn-book:hover {
  background: #153527;
  box-shadow: 0 4px 12px rgba(11,32,23,0.3);
}

.cm-popup-btn-wa {
  flex: 1;
  background: #25D366;
  color: #FFFFFF;
  border: none;
  padding: 8px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}

.cm-popup-btn-wa:hover {
  background: #20BA5A;
  color: #FFFFFF;
}

/* Hub Beacon Marker */
.cm-hub-marker {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-hub-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid #06B6D4;
  animation: cm-hub-pulse 2s infinite ease-out;
}

@keyframes cm-hub-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.0); opacity: 0; }
}

.cm-hub-center {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0891B2;
  color: white;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 12px rgba(8, 145, 178, 0.6);
}

.cm-hub-label {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 145, 178, 0.9);
  color: white;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Leaflet Luxury Layers Control & Map Mode Switcher */
.leaflet-control-layers {
  background: rgba(11, 32, 23, 0.94) !important;
  backdrop-filter: blur(10px) !important;
  color: #FAF8F5 !important;
  border: 1px solid rgba(197, 165, 114, 0.5) !important;
  border-radius: 16px !important;
  padding: 8px 12px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.leaflet-control-layers-toggle {
  background-color: rgba(11, 32, 23, 0.92) !important;
  border-radius: 12px !important;
  border: 1.5px solid #C5A572 !important;
  width: 36px !important;
  height: 36px !important;
  background-size: 20px 20px !important;
}

.leaflet-control-layers-base label {
  margin-bottom: 5px !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  cursor: pointer !important;
  color: #FAF8F5 !important;
  font-size: 11px !important;
}

.leaflet-control-layers-base input[type="radio"] {
  accent-color: #C5A572 !important;
  cursor: pointer !important;
}

.cm-map-layer-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   NATIVE MOBILE APP & LUXURY SYSTEM FONT ARCHITECTURE (iOS SF Pro / Android Roboto)
   Requirements:
   - 4-tab bottom navigation
   - Safe-area edge-to-edge support (Notch, Dynamic Island, Home indicator)
   - 24px border radius for all mobile service cards
   - Deep Dark Mode #0A0A0A with Metallic Gold #C5A572 / #D4AF37
   - Apple Maps / Google Maps floating FAB "Localizzami" (📍)
   - Slide-up BottomSheet modal with drag handle
   ========================================================================== */

:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

.font-system, #native-app-container, .cm-bottom-sheet, .cm-mobile-tab-bar {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", Roboto, "Helvetica Neue", sans-serif !important;
}

/* Safe Area Utility Classes */
.safe-area-top {
  padding-top: max(0.75rem, env(safe-area-inset-top)) !important;
}
.safe-area-bottom {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
}

/* Service Cards: Strict 24px Border Radius & Soft Luxury Shadows */
.cm-service-card-2x2, .cm-native-card, .cm-native-card-compact {
  border-radius: 24px !important;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.55), 0 4px 12px -2px rgba(0, 0, 0, 0.35) !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Apple Maps / Google Maps Style Floating "Localizzami" (📍) FAB */
.cm-locate-fab {
  position: absolute;
  bottom: 22px;
  right: 18px;
  z-index: 600;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(197, 165, 114, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(197, 165, 114, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #FAF8F5;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  touch-action: manipulation;
}
.cm-locate-fab:hover, .cm-locate-fab:active {
  transform: scale(1.08);
  border-color: #D4AF37;
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.45);
}

/* Native Bottom Sheet Modal */
#cm-bottom-sheet {
  border-radius: 28px 28px 0 0 !important;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.85);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glassmorphism Bottom Tab Bar */
.cm-mobile-tab-bar {
  background: rgba(10, 10, 10, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-top: 1px solid rgba(197, 165, 114, 0.35) !important;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.7) !important;
}

/* Tab Navigation State */
.cm-tab-item {
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  color: #8A7B6D;
}
.cm-tab-item.active {
  color: #C5A572 !important;
}
.cm-tab-item.active svg {
  stroke: #C5A572 !important;
  transform: scale(1.12);
}

/* App View Transitions */
.native-app-view {
  min-height: 100dvh;
  animation: cmViewFadeIn 0.25s ease-out;
}
@keyframes cmViewFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Luxury Editorial CEO Profile Modal */
#cm-ceo-modal {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99999 !important;
  border-radius: 28px 28px 0 0 !important;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.95) !important;
  transform: translateY(100%);
  -webkit-transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), -webkit-transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform;
  pointer-events: none;
}
#cm-ceo-modal.is-open {
  transform: translateY(0%) !important;
  -webkit-transform: translateY(0%) !important;
  pointer-events: auto !important;
}

#cm-ceo-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99998 !important;
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease !important;
}
#cm-ceo-modal-backdrop.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Radar Expandable Panel */
.cm-radar-expandable-panel {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cm-radar-expandable-panel.is-expanded #mobile-radar-staff-list {
  max-height: 60vh !important;
}
.cm-radar-expandable-panel.is-collapsed #mobile-radar-staff-list {
  display: none !important;
}

/* Mobile Native Safe Area Header (iOS Notch, Dynamic Island & Android Safe Margin) */
.cm-mobile-header {
  padding-top: calc(max(env(safe-area-inset-top, 44px), 44px) + 8px) !important;
  padding-left: max(env(safe-area-inset-left, 0px), 16px) !important;
  padding-right: max(env(safe-area-inset-right, 0px), 16px) !important;
  background: rgba(10, 10, 10, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-bottom: 1px solid rgba(197, 165, 114, 0.25) !important;
}

/* Safe Area Top for other Native Views */
.cm-view-safe-top {
  padding-top: calc(max(env(safe-area-inset-top, 44px), 44px) + 8px) !important;
}

/* ==========================================================================
   SAFARI (iOS/macOS) & CHROME (Android/Desktop) LUXURY PLATFORM OPTIMIZATIONS
   ========================================================================== */

/* 1. iOS Safari Auto-Zoom Prevention on Form Inputs (< 16px triggers zoom) */
@media screen and (max-width: 1024px) {
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* 2. Global Touch Action & Tap Highlight Removal for Native Responsiveness */
button,
a,
input,
select,
textarea,
.cm-tab-item,
.cm-service-card-2x2,
.cm-locate-fab,
.cm-role-btn,
.cm-region-btn {
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation;
}

/* 3. Smooth Momentum Scrolling on iOS & Android */
.native-app-view,
#mobile-radar-staff-list,
#cfo-chat-window,
.no-scrollbar,
.overflow-y-auto,
.overflow-x-auto {
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain;
}

/* 4. Cross-Browser dvh with vh Fallback */
.native-app-view {
  min-height: 100vh;
  min-height: 100dvh;
}

/* 5. Leaflet Live Radar Map Engine Cross-Browser Fixes (Safari macOS & iOS WebKit) */
.leaflet-container {
  width: 100% !important;
  height: 100% !important;
  background: #0B0D12 !important;
  touch-action: pan-x pan-y !important;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab !important;
  pointer-events: auto !important;
}

.leaflet-container:active {
  cursor: grabbing !important;
}

.leaflet-tile {
  visibility: visible !important;
  opacity: 1 !important;
  max-width: none !important;
  max-height: none !important;
  width: 256px !important;
  height: 256px !important;
}

.leaflet-tile-loaded {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Custom Marker Styling & Smooth CSS Transitions (Guaranteed Clickability on Safari Mac) */
.leaflet-marker-icon,
.leaflet-popup,
.leaflet-popup-content-wrapper,
.leaflet-popup-content,
.cm-custom-div-icon,
.cm-custom-div-icon *,
.cm-hub-marker,
.cm-map-marker {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.cm-custom-div-icon {
  background: transparent !important;
  border: none !important;
}

.cm-chef-pin-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cm-chef-pin-marker:hover,
.cm-chef-pin-marker:active {
  transform: scale(1.15) translateZ(0);
  -webkit-transform: scale(1.15) translateZ(0);
  z-index: 1000 !important;
}

/* 6. Native Mobile Bottom Tab Bar Safe Area Polish */
.cm-mobile-tab-bar {
  padding-bottom: max(14px, env(safe-area-inset-bottom, 16px)) !important;
  padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* 7. Bottom Sheet Native Drag Handle */
.cm-sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.28);
  margin: 0 auto;
  cursor: grab;
  touch-action: none;
}
.cm-sheet-handle:active {
  cursor: grabbing;
  background: rgba(197, 165, 114, 0.7);
}

/* ==========================================================================
   8. LUXURY LIVE RADAR SONAR SWEEP & HOLOGRAPHIC HUD (Non-blocking in Safari)
   ========================================================================== */
.cm-radar-overlay-container {
  position: absolute;
  inset: 0;
  pointer-events: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  z-index: 250 !important;
  overflow: hidden;
}

.cm-radar-sonar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vmax;
  height: 100vmax;
  margin-top: -50vmax;
  margin-left: -50vmax;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(197, 165, 114, 0) 0deg,
    rgba(197, 165, 114, 0) 300deg,
    rgba(16, 185, 129, 0.07) 330deg,
    rgba(197, 165, 114, 0.18) 360deg
  );
  animation: cm-radar-sweep-rotate 7s linear infinite;
  pointer-events: none !important;
  opacity: 0.75;
}

@keyframes cm-radar-sweep-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cm-radar-grid-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none !important;
}

.cm-radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(197, 165, 114, 0.22);
  box-shadow: 0 0 15px rgba(197, 165, 114, 0.04);
  pointer-events: none !important;
}

.cm-radar-ring-1 { width: 140px; height: 140px; }
.cm-radar-ring-2 { width: 300px; height: 300px; }
.cm-radar-ring-3 { width: 480px; height: 480px; }

/* Pulsing radar sonar waves from central marker */
.cm-marker-sonar-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  margin-left: -22px;
  border-radius: 50%;
  border: 2px solid rgba(197, 165, 114, 0.7);
  animation: cm-sonar-expand 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes cm-sonar-expand {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* 9. LIVE SOCIAL PROOF & BOOKING TICKER */
.cm-ticker-wrapper {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.cm-ticker-track {
  display: inline-flex;
  gap: 2.5rem;
  animation: cm-ticker-slide 32s linear infinite;
  will-change: transform;
}

.cm-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes cm-ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 10. RECRUITMENT & GROWTH CARDS STYLING */
.cm-growth-card {
  background: linear-gradient(135deg, rgba(11, 32, 23, 0.95) 0%, rgba(5, 16, 11, 0.98) 100%);
  border: 1px solid rgba(197, 165, 114, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.cm-growth-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(197, 165, 114, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* 11. BULLETPROOF TAKE A CHEF & VIP MODAL CONTROLS */
#cm-take-a-chef-modal.hidden,
#cm-take-a-chef-backdrop.hidden,
#cm-booking-modal.hidden,
#cm-booking-backdrop.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (min-width: 640px) {
  #cm-take-a-chef-modal {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-height: 90vh !important;
  }
  #cm-take-a-chef-modal.translate-y-full {
    transform: translate(-50%, 150%) !important;
  }
}

