/* Custom Styles for Mississippi Data Center & Grid Tracker */

:root {
  --primary-color: #3b82f6;
  --bg-dark: #0f172a;
  --card-dark: #1e293b;
  --card-border: #334155;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #0b0f19;
  color: #f1f5f9;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Map Styling */
#map {
  height: 580px;
  width: 100%;
  border-radius: 0.75rem;
  z-index: 10;
}

.leaflet-popup-content-wrapper {
  background: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #475569 !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5) !important;
  padding: 4px !important;
}

.leaflet-popup-tip {
  background: #1e293b !important;
  border: 1px solid #475569 !important;
}

.leaflet-container {
  background: #0b0f19 !important;
}

/* Layer Control Styling */
.leaflet-control-layers {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  padding: 8px 12px !important;
}

.leaflet-control-layers-separator {
  border-top: 1px solid #334155 !important;
  margin: 6px 0 !important;
}

.leaflet-control-layers label {
  color: #e2e8f0 !important;
  font-weight: 500 !important;
  margin-bottom: 3px !important;
  cursor: pointer;
}

.grid-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid #38bdf8 !important;
  color: #f8fafc !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5) !important;
  font-family: 'Inter', sans-serif !important;
}

.grid-tooltip::before {
  border-top-color: #38bdf8 !important;
}

/* Substation Markers Styling */
.substation-marker {
  filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.9));
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.substation-marker:hover {
  filter: drop-shadow(0px 0px 8px rgba(56, 189, 248, 1)) drop-shadow(0px 0px 14px rgba(232, 121, 249, 0.8));
}

/* Custom Pulsing Markers */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
  cursor: pointer;
}

.custom-pin:hover {
  transform: scale(1.25);
  z-index: 9999 !important;
}

.pulse-entergy {
  background: radial-gradient(circle, #f43f5e 0%, #be123c 100%);
  border: 2px solid #ffffff;
}

.pulse-tva {
  background: radial-gradient(circle, #38bdf8 0%, #0284c7 100%);
  border: 2px solid #ffffff;
}

.pulse-mspower {
  background: radial-gradient(circle, #34d399 0%, #059669 100%);
  border: 2px solid #ffffff;
}

.pulse-coop {
  background: radial-gradient(circle, #fbbf24 0%, #d97706 100%);
  border: 2px solid #ffffff;
}

.pulse-blocked {
  background: radial-gradient(circle, #94a3b8 0%, #475569 100%);
  border: 2px dashed #ffffff;
}

/* Glassmorphism Card */
.glass-panel {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card-hover {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 12px 24px -10px rgba(59, 130, 246, 0.25);
}

/* Gradient Badge Text */
.gradient-text-blue {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-emerald {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-amber {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-rose {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Status Badges */
.badge-operating {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-construction {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-proposed {
  background-color: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-blocked {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Modal Transition */
.modal-backdrop {
  transition: opacity 0.25s ease-out;
}

.modal-content {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease-out;
}

/* Animation utilities */
@keyframes glow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}

.animate-glow {
  animation: glow 3s infinite ease-in-out;
}
