/* Application Base & Layout Styles */
:root {
  --tg-viewport-height: 100vh;
  --tg-viewport-stable-height: 100vh;
}

html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Flex viewport root container */
#app-root {
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Map Containers */
#worker-map, #dispatcher-map, #client-map {
  width: 100%;
  height: 100%;
  flex: 1 1 0%;
  min-height: 0;
}

#admin-map {
  width: 100% !important;
  height: 320px !important;
  min-height: 320px !important;
  display: block !important;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  z-index: 1 !important;
  background: #f1f5f9;
}

/* Animations */
.pin-pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.9; }
}

/* Safe area padding */
.pb-safe {
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
}

/* Modal z-index above everything including Leaflet popups */
.z-modal {
  z-index: 99999 !important;
}

.z-toast {
  z-index: 100000 !important;
}
