/* style.css - Minimal Uber Map Tiles & Drawer Layout */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Clean Dynamic Island & Notch Clearance */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

/* For pages starting with headers (index.html, fleet.html) */
header {
  padding-top: max(env(safe-area-inset-top), 12px) !important;
}

/* For pages starting directly with titles (dispatches.html, fleet-account.html) */
main, .main-container {
  padding-top: max(env(safe-area-inset-top), 20px) !important;
}

/* Prevent bottom fixed navigation bar from overlapping the home swipe indicator */
nav.fixed, nav#senderNavBar {
  padding-bottom: max(env(safe-area-inset-bottom), 14px) !important;
}


/* Ensure body clears the top notch and bottom gesture bar */
body {
  padding-top: max(env(safe-area-inset-top), 0px);
  padding-bottom: max(env(safe-area-inset-bottom), 0px);
}


@supports (-webkit-touch-callout: none) {
  /* iOS Standalone PWA top spacing */
  @media all and (display-mode: standalone) {
    header, .app-header {
      padding-top: max(env(safe-area-inset-top), 20px) !important;
    }
  }
}

/* Universal Apple / Inter Typography System */
html, body, button, input, select, textarea {
  font-family: 'Courier New', Courier, monospace !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em; /* Apple-style subtle tracking tightening */
}

/* Crisp rendering for numbers and pricing */
.font-mono, [data-tabular-nums] {
  font-feature-settings: "tnum" 1, "cv05" 1;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
  background-color: #f8fafc;
}

/* Minimal desaturated Uber map tile look */
.leaflet-tile-container img {
  filter: grayscale(0.8) contrast(1.05) brightness(1.02);
}

/* Custom Zoom Control - Minimal White Pill */
.leaflet-control-zoom {
  border: none !important;
  margin-top: 16px !important;
  margin-right: 16px !important;
}

.leaflet-control-zoom a {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  font-size: 16px !important;
  font-weight: bold !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Draggable Drawer States */
#bottomDrawer.collapsed {
  transform: translateY(calc(100% - 64px));
}

#bottomDrawer.expanded {
  transform: translateY(0);
}


/* Light Theme Override for Map Popups */
.leaflet-popup-content-wrapper {
  background-color: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb;
  border-radius: 16px !important;
  padding: 4px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-popup-tip {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb;
}

/* Custom SVG Marker Containers */
.custom-bakkie-icon,
.custom-pickup-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure Google Places suggestions dropdown is visible above bottom drawer */
.pac-container {
  z-index: 10000 !important;
  border-radius: 12px;
  margin-top: 4px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  border: 1px solid #e5e7eb;
}

/* Override Google Maps InfoWindow Container Constraints */
.gm-style-iw-c {
  padding: 16px !important;
  border-radius: 20px !important;
  max-width: 310px !important;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.25) !important;
}

.gm-style-iw-d {
  overflow: visible !important;
  max-height: none !important;
}

.gm-style-iw-tc {
  display: none !important;
}

.gm-ui-hover-effect {
  display: none !important;
}

