/* Omnia Field Ops - Custom Styles */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; margin: 0; overflow: hidden; }

/* Fix mobile viewport height (excludes browser chrome on Android/iOS) */
#app { height: 100vh; height: 100dvh; }

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* Safe areas for mobile notch/home indicator */
.safe-top { padding-top: env(safe-area-inset-top, 0); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }

/* Scrollable content */
#worker-content {
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}
#admin-content { -webkit-overflow-scrolling: touch; }

/* Map containers */
#track-map, #admin-map {
  width: 100%;
  background: #f1f5f9;
}

/* Active tracking pulse animation */
.tracking-active {
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* Status badges */
.status-pending { background: #FEF3C7; color: #92400E; }
.status-in-progress { background: #DBEAFE; color: #1E40AF; }
.status-completed { background: #D1FAE5; color: #065F46; }

/* Job card hover */
.job-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.job-card:active {
  transform: scale(0.98);
}

/* Toast animation */
#toast > div {
  animation: slide-in 0.3s ease-out;
}
@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Chart container responsiveness */
canvas {
  max-width: 100%;
}

/* Worker nav active state */
.worker-nav-btn.active {
  color: #059669;
}

/* Admin sidebar active */
.admin-nav-btn.active {
  background: #1F2937;
  color: white;
}

/* Custom marker styles */
.worker-marker {
  background: #059669;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.worker-marker-label {
  background: white;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  white-space: nowrap;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}
.leaflet-popup-content {
  margin: 12px 16px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

/* Sample pin animation */
.sample-pin-new {
  animation: pin-drop 0.4s ease-out;
}
@keyframes pin-drop {
  0% { transform: translateY(-20px) scale(0.5); opacity: 0; }
  60% { transform: translateY(2px) scale(1.1); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Loading shimmer */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #admin-content {
    padding-top: 0;
  }
}

/* Print styles for reports */
@media print {
  body { overflow: visible; }
  #admin-sidebar, nav, header, .no-print { display: none !important; }
}
