/* PinMe Shared Styles */

body {
  min-height: 100dvh;
}

/* Safe area support for iOS notch/status bar and Android status bar */
.safe-area-top {
  padding-top: 24px !important;
  padding-top: calc(env(safe-area-inset-top, 0px) + 24px) !important;
}

.safe-area-bottom {
  padding-bottom: 12px !important;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
}

.safe-area-left {
  padding-left: 0px;
  padding-left: env(safe-area-inset-left, 0px);
}

.safe-area-right {
  padding-right: 0px;
  padding-right: env(safe-area-inset-right, 0px);
}

.recessed-button {
  background: linear-gradient(145deg, #111111, #000000);
  box-shadow: inset 10px 10px 20px #000000, inset -10px -10px 20px #1a1a1a;
}

.pin-ring {
  box-shadow: 0 0 25px 2px rgba(244, 63, 94, 0.45);
}

.glass-panel {
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Minimum 44px touch target (per design spec) */
.tap-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.pulse {
  animation: pulse 1.4s ease-out infinite;
}

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

/* Map specific */
.map-container {
  height: calc(100dvh - 140px);
}

/* Constrain Leaflet map z-index to prevent it from overlapping modals */
#map {
  z-index: 0;
}

.leaflet-pane {
  z-index: 1 !important;
}

.leaflet-top,
.leaflet-bottom {
  z-index: 10 !important;
}

.leaflet-control {
  z-index: 10 !important;
}

.area-count {
  background: rgba(244, 63, 94, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}

/* User location marker */
.user-location-marker {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-location-dot {
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: userPulse 2s ease-in-out infinite;
}

@keyframes userPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
  }
}

/* Modal overlay - must be above everything including Leaflet */
#reminderModal,
#confirmModal {
  z-index: 9999 !important;
}

#areaSheet {
  z-index: 1000 !important;
}

/* Confirmation modal icon pulse */
#confirmIcon {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 5px rgba(244, 63, 94, 0.2);
  }
}

/* Toast notification */
.toast {
  pointer-events: none;
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #121212;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10000;
}

.toast.visible {
  opacity: 1;
}

/* Floating Navigation Bar Placement */
.floating-nav {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 50;
}
