/* Force override Bootstrap Offcanvas flex behavior for drag resize functionality */
.bottom-offcanvas {
  display: block !important;
  flex: none !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: auto !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
}

.bottom-offcanvas .offcanvas-body {
  flex: none !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  overflow-y: auto;
  overflow-x: hidden;
  /* Prevent content from affecting parent size */
  contain: size layout style;
}

/* Ensure drag handle is clearly visible and interactive */
.drag-handle {
  height: 12px !important;
  cursor: ns-resize !important;
  -webkit-user-select: none !important;
          user-select: none !important;
  position: relative !important;
  z-index: 1000 !important;
}

.drag-handle:hover {
  opacity: 0.8;
}
/* ForecastApp.css - Modern Marine Forecast Interface */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.forecast-app {
  height: 100vh;
  width: 100vw;
  max-width: 100%;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

.forecast-app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><path d=\"M0 50 Q25 30 50 50 T100 50 V100 H0\" fill=\"rgba%28255,255,255,0.02%29\"/></svg>") repeat-x;
  pointer-events: none;
  z-index: 0;
}

/* Header styles removed since we use ModernHeader component */

.main-container {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 350px);
  grid-gap: 1rem;
  gap: 1rem;
  height: calc(100vh - 60px);
  padding: 1rem;
  max-width: 100vw;
  overflow-x: hidden;
}

.map-section {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

/* ==============================================
   PROFESSIONAL MARINE LEGEND SYSTEM - V2.0
   Single, consistent, mobile-first design
   ============================================== */

:root {
  --legend-bg: rgba(15, 30, 60, 0.95);
  --legend-border: rgba(255, 255, 255, 0.25);
  --legend-text: #ffffff;
  --legend-accent: #00bcd4;
  --legend-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.marine-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1010; /* Higher z-index to ensure it's above Leaflet controls */
  pointer-events: auto; /* Enable clicks on legend */
  
  /* Professional marine styling */
  background: rgba(15, 30, 60, 0.95);
  background: var(--legend-bg);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border: 1px solid var(--legend-border);
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  box-shadow: var(--legend-shadow);
  
  /* Typography optimized for marine professionals */
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  color: #ffffff;
  color: var(--legend-text);
  
  /* Stable reference material - no animations */
  transition: none;
  min-width: 55px;
  max-width: 75px;
  
  /* Ensure legend is always visible and proportional */
  max-height: 80vh; /* Never exceed 80% of viewport height */
}

/* Map section container query support */
.map-section {
  container-type: size;
  container-name: map-container;
}

/* Container-based responsive legend (when supported) */
@container map-container (min-height: 600px) {
  .marine-legend-gradient,
  .marine-legend-scale {
    height: min(30cqh, 250px); /* 30% of container height */
  }
}

@container map-container (min-height: 400px) and (max-height: 599px) {
  .marine-legend-gradient,
  .marine-legend-scale {
    height: min(25cqh, 180px); /* 25% of container height */
  }
}

@container map-container (max-height: 399px) {
  .marine-legend-gradient,
  .marine-legend-scale {
    height: min(20cqh, 120px); /* 20% of container height */
  }
}

.marine-legend-title {
  font-size: 9px;
  font-weight: 700;
  color: #00bcd4;
  color: var(--legend-accent);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0, 188, 212, 0.3);
  padding-bottom: 4px;
}

.marine-legend-content {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.marine-legend-gradient {
  width: 20px;
  height: min(25vh, 200px); /* Responsive: 25% of viewport height, max 200px */
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border: 1px solid var(--legend-border);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.marine-legend-scale {
  position: relative;
  height: min(25vh, 200px); /* Match gradient height */
  min-width: 25px;
  /* Ensure scale values align properly with gradient */
  align-items: flex-start;
}

.marine-legend-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.marine-legend-value {
  font-size: 9px;
  font-weight: 600;
  color: #ffffff;
  color: var(--legend-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 2px;
  border-radius: 2px;
  white-space: nowrap;
}

.marine-legend-tick {
  position: absolute;
  font-size: 8px;
  font-weight: 600;
  color: #ffffff;
  color: var(--legend-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.2);
  padding: 1px 2px;
  border-radius: 1px;
  white-space: nowrap;
  text-align: right;
}

.marine-legend-units {
  font-size: 8px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  letter-spacing: 0.2px;
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
  .marine-legend {
    bottom: 15px;
    right: 15px;
    padding: 8px;
    min-width: 55px;
    max-width: 70px;
  }
  
  .marine-legend-title {
    font-size: 8px;
    margin-bottom: 4px;
  }
  
  .marine-legend-gradient {
    width: 16px;
    height: min(20vh, 150px); /* Tablet: 20% viewport height, max 150px */
  }
  
  .marine-legend-scale {
    position: relative;
    height: min(20vh, 150px);
    min-width: 20px;
  }
  
  .marine-legend-value {
    font-size: 8px;
    padding: 1px 2px;
  }
  
  .marine-legend-tick {
    font-size: 7px;
  }
  
  .marine-legend-units {
    font-size: 7px;
  }
}

@media (max-width: 480px) {
  .marine-legend {
    bottom: 10px;
    right: 10px;
    padding: 6px;
    min-width: 45px;
    max-width: 55px;
  }
  
  .marine-legend-gradient {
    width: 14px;
    height: min(18vh, 120px); /* Mobile: 18% viewport height, max 120px */
  }
  
  .marine-legend-scale {
    position: relative;
    height: min(18vh, 120px);
    min-width: 18px;
  }
  
  .marine-legend-value {
    font-size: 7px;
  }
  
  .marine-legend-tick {
    font-size: 6px;
  }
  
  .marine-legend-units {
    font-size: 6px;
  }
}

/* High-DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .marine-legend {
    border-width: 0.5px;
  }
  
  .marine-legend-value {
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.8);
  }
}

@media (max-width: 768px) {
  .legend-overlay {
    bottom: 0;
    right: 0;
    left: 0; /* Full width on mobile */
    max-height: 50vh; /* Mobile sheet height */
    border-radius: 16px 16px 0 0; /* Sheet-like appearance */
    background: rgba(0, 0, 0, 0.1); /* Subtle background for mobile */
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    padding: 0.5rem;
    pointer-events: auto;
  }

  .legend-overlay .world-class-legend {
    max-width: 100%; /* Full width on mobile */
    margin: 0 auto; /* Center the legend */
  }

  .map-section {
    padding-bottom: 1rem;
  }

  /* Tablet: Compact metadata panel */
  .range-metadata-panel {
    max-width: 200px;
    max-height: min(calc(100vh - 180px), 350px); /* Responsive height for tablet */
    font-size: 0.7rem;
    padding: 0.75rem;
  }

  .range-metadata-panel h4 {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .range-item {
    padding: 0.3rem 0;
  }

  .metadata-toggle {
    bottom: 70px; /* Maintain spacing above Leaflet controls */
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .legend-overlay {
    max-height: 45vh; /* Smaller height on mobile */
    padding: 0.5rem 0.75rem;
  }

  .legend-overlay .world-class-legend {
    padding: 0.75rem; /* Reduce padding on small screens */
  }

  /* Handle iOS safe area */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .legend-overlay {
      padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
  }

  /* Mobile: Move metadata to controls panel or hide */
  .range-metadata-panel {
    display: none; /* Hide on mobile to avoid clutter */
  }

  .metadata-toggle {
    bottom: 80px; /* Move up to avoid controls */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    padding: 0.3rem 0.6rem;
  }
}

.forecast-map {
  height: 100%;
  width: 100%;
  border-radius: 12px;
}

/* ==============================================
   ACCESSIBILITY & PROFESSIONAL STANDARDS
   ============================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
  .marine-legend {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #ffffff;
    color: #ffffff;
  }
  
  .marine-legend-title {
    color: #ffffff;
    border-bottom-color: #ffffff;
  }
  
  .marine-legend-value {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .marine-legend {
    transition: none;
  }
}

/* Focus management for keyboard navigation */
.marine-legend:focus-within {
  outline: 2px solid #00bcd4;
  outline: 2px solid var(--legend-accent);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .marine-legend {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
  }
  
  .marine-legend-title {
    color: black !important;
    border-bottom-color: black !important;
  }
  
  .marine-legend-value {
    background: rgba(0, 0, 0, 0.1) !important;
    color: black !important;
  }
}

/* Metadata Toggle Button */
.metadata-toggle {
  position: absolute;
  bottom: 20px; /* Align with Leaflet scale control */
  left: 20px;
  z-index: 1000;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.5px;
}

.metadata-toggle:hover {
  background: linear-gradient(135deg, #34495e, #2c3e50);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.metadata-toggle:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Range Metadata Panel - Above Metadata Toggle */
.range-metadata-panel {
  position: absolute;
  bottom: 70px; /* Position above metadata toggle button */
  left: 20px;
  max-width: 260px;
  max-height: min(calc(100vh - 200px), 400px); /* Constrain height responsively */
  background: rgba(8, 26, 70, 0.9);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(144, 224, 239, 0.3);
  padding: 1rem;
  color: white;
  font-size: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: all 0.3s ease;
  animation: metadataSlideUp 0.4s ease-out;
  overflow-y: auto; /* Enable scrolling if content is too tall */
  overflow-x: hidden; /* Prevent horizontal scrolling */
  
  /* Ensure it never goes off-screen */
  top: auto;
  min-height: 0;
}

/* Custom scrollbar for metadata panel */
.range-metadata-panel::-webkit-scrollbar {
  width: 6px;
}

.range-metadata-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.range-metadata-panel::-webkit-scrollbar-thumb {
  background: rgba(144, 224, 239, 0.6);
  border-radius: 3px;
}

.range-metadata-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(144, 224, 239, 0.8);
}

@keyframes metadataSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.range-metadata-panel h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.88rem;
  color: #ffffff;
  font-weight: 700;
  border-bottom: 2px solid rgba(0, 212, 255, 0.5);
  padding-bottom: 0.5rem;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.range-metadata-panel h4 .wmo-code {
  font-size: 0.65rem;
  color: #90e0ef;
  font-weight: 400;
  margin-left: 8px;
}

.range-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.range-item:last-child {
  border-bottom: none;
}

.range-item-left {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex: 1 1;
}

.range-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1;
}

.range-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.range-label {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

.range-description {
  font-size: 0.68rem;
  color: #b8ddef;
  line-height: 1.3;
  opacity: 1;
  font-weight: 400;
}

.range-value {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  align-self: flex-start;
  margin-top: 0.1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}

.metadata-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 2px solid rgba(0, 212, 255, 0.4);
}

.metadata-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.72rem;
}

.metadata-label {
  color: #90e0ef;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.metadata-value {
  color: #ffffff;
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* Professional Marine Classifications */
.wmo-classification {
  font-size: 0.65rem;
  color: #a8d8ea;
  margin-top: 0.2rem;
  font-weight: 500;
}

.operational-impact {
  font-size: 0.63rem;
  color: #79c3d4;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.confidence-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 6px;
}

.confidence-high { background: #00ff88; }
.confidence-medium { background: #ffaa00; }
.confidence-low { background: #ff4444; }

/* Collapsible Metadata Section */
.metadata-summary {
  margin-bottom: 0.75rem;
}

.metadata-details-toggle {
  width: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.8), rgba(6, 182, 212, 0.8));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.metadata-details-toggle:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(6, 182, 212, 0.9));
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.metadata-details-toggle:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 212, 255, 0.2);
}

.metadata-details {
  animation: metadataDetailsSlideIn 0.3s ease-out;
  border-top: 1px solid rgba(144, 224, 239, 0.3);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

@keyframes metadataDetailsSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 300px;
  }
}

.metadata-toggle {
  position: absolute;
  bottom: 80px; /* Position above Leaflet scale control */
  left: 20px;
  background: rgba(8, 26, 70, 0.85);
  color: #90e0ef;
  border: 1px solid rgba(144, 224, 239, 0.6);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  z-index: 1001;
}

.metadata-toggle:hover {
  background: rgba(144, 224, 239, 0.3);
  color: #ffffff;
  border-color: rgba(144, 224, 239, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.25);
}

.metadata-toggle:focus-visible {
  outline: 2px solid #90e0ef;
  outline-offset: 2px;
}

/* Ensure Leaflet zoom controls don't overlap with legend */
.leaflet-bottom.leaflet-right {
  margin-bottom: 60px;
}

.forecast-map-legend {
  background: rgba(0, 0, 0, 0.7);
  padding: 0.75rem;
  border-radius: 8px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  text-align: center;
  /* Responsive sizing based on screen width */
  min-width: 120px;
  max-width: min(200px, 25vw);
  width: auto;
}

.forecast-map-legend__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  /* Ensure legend is readable on all screen sizes */
  min-height: 120px;
  max-height: min(300px, 30vh);
  object-fit: contain;
}

.forecast-map-legend__caption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #90e0ef;
  line-height: 1.2;
}

/* Responsive legend sizing for different screen sizes */
@media (max-width: 480px) {
  .forecast-map-legend {
    max-width: min(140px, 30vw);
    padding: 0.5rem;
  }
  
  .forecast-map-legend__image {
    min-height: 100px;
    max-height: min(200px, 25vh);
  }
  
  .forecast-map-legend__caption {
    font-size: 0.7rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .forecast-map-legend {
    max-width: min(180px, 25vw);
  }
  
  .forecast-map-legend__image {
    min-height: 140px;
    max-height: min(280px, 28vh);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .forecast-map-legend {
    max-width: min(200px, 22vw);
  }
  
  .forecast-map-legend__image {
    min-height: 160px;
    max-height: min(320px, 30vh);
  }
}

@media (min-width: 1025px) {
  .forecast-map-legend {
    max-width: min(240px, 20vw);
  }
  
  .forecast-map-legend__image {
    min-height: 180px;
    max-height: min(360px, 32vh);
  }
}

.forecast-map-legend .legend-placeholder {
  font-size: 0.75rem;
  color: #dceef9;
}

/* =================
   CARTOGRAPHIC ALIGNMENT SYSTEM
   Align scale bar and legend at same height
   ================= */

/* Align Leaflet scale control with legend */
.leaflet-control-scale {
  /* Override Leaflet's default positioning */
  position: absolute !important;
  bottom: 20px !important;
  left: 20px !important;
  
  /* Enhanced styling for visual harmony with legend */
  background: rgba(0, 0, 0, 0.7) !important;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-radius: 8px !important;
  border: none !important;
  padding: 8px 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  
  /* Typography consistency with legend */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
  font-weight: 600 !important;
  color: #ffffff !important;
}

.leaflet-control-scale-line {
  background: transparent !important;
  border: 2px solid #90e0ef !important;
  border-top: none !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  padding: 2px 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  border-radius: 0 0 4px 4px !important;
}

/* Ensure legend aligns with scale bar by adjusting Leaflet control positioning */
.leaflet-bottom.leaflet-right .forecast-map-legend {
  margin-bottom: 20px !important;
  margin-right: 0 !important;
}

.leaflet-bottom.leaflet-left .leaflet-control-scale {
    margin-bottom: -11px !important;
    margin-left: -8px !important;
}

/* Responsive alignment adjustments */
@media (max-width: 480px) {
  .leaflet-bottom.leaflet-left .leaflet-control-scale {
    margin-bottom: 15px !important;
    margin-left: 0 !important;
    padding: 6px 10px !important;
  }
  
  .leaflet-bottom.leaflet-right .forecast-map-legend {
    margin-bottom: 15px !important;
    margin-right: 0 !important;
  }
}

@media (min-width: 1200px) {
  .leaflet-control-scale {
    bottom: 25px !important;
    left: 25px !important;
  }
  
  .forecast-map-legend {
    bottom: 25px !important;
    right: 25px !important;
  }
}





.controls-panel {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  padding: 0.35rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 100%;
}

#forecast-map-placeholder {
  height: 100%;
  width: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.map-placeholder-text {
  font-size: 1.2rem;
  opacity: 0.7;
  text-align: center;
}

.forecast-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.control-group {
  margin-bottom: 0.25rem;
}

.control-group h3 {
  color: #00d4ff;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  border-bottom: 2px solid #00d4ff;
  padding-bottom: 0.25rem;
}

.variable-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0.4rem;
  gap: 0.4rem;
  grid-auto-rows: 1fr; /* Make all grid rows equal height */
  margin-bottom: 0.5rem;
}

@media (min-width: 400px) {
  .variable-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

.var-btn {
  padding: 0.4rem;
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
  border: 2px solid #00d4ff;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  text-align: center;
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}

.var-btn:hover {
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.var-btn.active {
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.time-control {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.65rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.forecast-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.65rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.forecast-info > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.forecast-info > div:last-child {
  margin-bottom: 0;
}

.forecast-info span {
  color: #70d8ff;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Responsive adjustments for longer date-time strings */
@media (max-width: 768px) {
  .forecast-info > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .forecast-info span {
    font-size: 0.85rem;
  }
}

.time-slider-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.time-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1e3c72 0%, #00d4ff 100%);
  outline: none;
  margin: 1rem 0;
}

.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00d4ff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.opacity-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  margin-top: 0.5rem;
}

.opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00d4ff;
  cursor: pointer;
}

.time-slider::-webkit-slider-thumb:hover, .opacity-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.5);
}

.playback-controls {
  display: flex;
  justify-content: center;
}

.play-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 32px;
  background: linear-gradient(135deg, #00d4ff 0%, #48cae4 35%, #90e0ef 100%);
  border: 1px solid rgba(144, 224, 239, 0.6);
  border-radius: 999px;
  color: #0b1f3a;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 12px 30px rgba(0, 212, 255, 0.22),
    0 4px 12px rgba(11, 31, 58, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  isolation: isolate;
}

.play-btn::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.35), transparent 60%);
  opacity: 0.6;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.play-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: conic-gradient(from 180deg at 50% 50%, rgba(0, 212, 255, 0.2), rgba(72, 202, 228, 0.15), transparent 70%);
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -2;
}

.play-btn span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.play-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 40px rgba(0, 212, 255, 0.28),
    0 6px 18px rgba(11, 31, 58, 0.45);
}

.play-btn:hover::before {
  opacity: 0.9;
}

.play-btn:hover::after {
  opacity: 1;
}

.play-btn:active {
  transform: translateY(0);
  box-shadow:
    0 8px 18px rgba(0, 212, 255, 0.22),
    0 3px 10px rgba(11, 31, 58, 0.4);
}

.play-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.play-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.35), rgba(72, 202, 228, 0.35));
  box-shadow: none;
}

.forecast-value {
  font-size: 2rem;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.dynamic-update-indicator {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 6px;
  font-size: 0.9rem;
  color: #00d4ff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.update-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ai-analysis-info {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.analysis-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
}

.analysis-item:last-child {
  margin-bottom: 0;
}

.analysis-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.analysis-value {
  font-size: 0.9rem;
  color: #00d4ff;
  font-weight: bold;
  background: rgba(0, 212, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.forecast-units {
  text-align: center;
  font-size: 1.1rem;
  color: #90e0ef;
  font-weight: 500;
}

.legend {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.legend-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.opacity-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opacity-control label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.data-info {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  font-size: 0.9rem;
}

.data-info > div {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.data-info strong {
  color: #00d4ff;
  font-weight: 700;
}

.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  padding: 0.5rem 2rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff00;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* Modern Bottom Panel Styling */
.offcanvas.offcanvas-bottom:not(.bottom-offcanvas) {
  background: rgba(10, 36, 99, 0.95) !important;
  -webkit-backdrop-filter: blur(20px) !important;
          backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px 20px 0 0 !important;
  color: white !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3) !important;
  height: 35vh !important; /* Smaller default height */
}

/* Allow dynamic height for draggable bottom-offcanvas */
.offcanvas.offcanvas-bottom.bottom-offcanvas {
  background: rgba(10, 36, 99, 0.95) !important;
  -webkit-backdrop-filter: blur(20px) !important;
          backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px 20px 0 0 !important;
  color: white !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3) !important;
  /* height controlled by inline style for drag functionality */
}

.offcanvas.offcanvas-bottom .offcanvas-body {
  background: transparent !important;
}

/* Modern drag handle */
.offcanvas.offcanvas-bottom div[title="Drag to resize"] {
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2), rgba(255,255,255,0.1)) !important;
  border-radius: 20px 20px 8px 8px !important;
  border: none !important;
}

.offcanvas.offcanvas-bottom div[title="Drag to resize"] div {
  background: rgba(255, 255, 255, 0.4) !important;
  border-radius: 3px !important;
  width: 50px !important;
  height: 4px !important;
}

/* Modern tab buttons */
.offcanvas.offcanvas-bottom button[aria-controls*="tab-panel"] {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px 12px 0 0 !important;
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  padding: 12px 24px !important;
  margin: 0 4px !important;
}

.offcanvas.offcanvas-bottom button[aria-controls*="tab-panel"]:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  transform: translateY(-2px) !important;
}

.offcanvas.offcanvas-bottom button[aria-controls*="tab-panel"][style*="border-bottom: 2px solid rgb(0, 123, 255)"] {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(72, 202, 228, 0.2)) !important;
  border-bottom: 2px solid #00d4ff !important;
  color: #00d4ff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2) !important;
}

/* Close button */
.offcanvas.offcanvas-bottom button[aria-label="Close"] {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
}

.offcanvas.offcanvas-bottom button[aria-label="Close"]:hover {
  background: rgba(255, 100, 100, 0.2) !important;
  color: #ff6464 !important;
  transform: scale(1.1) !important;
}

/* Modern table styling */
.offcanvas.offcanvas-bottom .table {
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  -webkit-backdrop-filter: blur(10px) !important;
          backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.offcanvas.offcanvas-bottom .table tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03) !important; /* Zebra striping */
}

.offcanvas.offcanvas-bottom .table th {
  background: rgba(10, 36, 99, 0.8) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  padding: 8px 6px !important;
  text-align: center !important;
}

/* Base table cell styling - preserve original colors but enhance with modern effects */
.offcanvas.offcanvas-bottom .table td {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  font-size: 14px !important; /* Increased font size */
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  position: relative !important;
}

/* Add subtle modern enhancement to colored cells */
.offcanvas.offcanvas-bottom .table td:not(:first-child) {
  -webkit-backdrop-filter: blur(5px) !important;
          backdrop-filter: blur(5px) !important;
  border-radius: 2px !important;
}

/* Enhance hover effect while preserving colors */
.offcanvas.offcanvas-bottom .table td:not(:first-child):hover {
  transform: scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  z-index: 10 !important;
}

/* Parameter name column */
.offcanvas.offcanvas-bottom .table td:first-child {
  background: rgba(10, 36, 99, 0.6) !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  text-align: left !important;
  position: -webkit-sticky !important;
  position: sticky !important; /* Freeze the column */
  left: 0 !important;
  z-index: 2 !important;
}

.offcanvas.offcanvas-bottom .table th:first-child {
  background: rgba(10, 36, 99, 0.9) !important;
  position: -webkit-sticky !important;
  position: sticky !important; /* Freeze the header */
  left: 0 !important;
  z-index: 3 !important;
}

/* Enhance the existing colored cells with better contrast for dark theme */
/* Blue wave height cells - keep original colors but enhance text */
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(120, 151, 181)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(116, 148, 179)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(124, 154, 184)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(133, 162, 190)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(143, 170, 196)"] {
  color: #e0f4ff !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  font-weight: 600 !important;
}

/* Green/yellow energy cells - dark text for contrast */
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(191, 255, 63)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(110, 255, 144)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(0, 207, 255)"] {
  color: #1a1a2e !important;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7) !important;
  font-weight: 700 !important;
}

/* Blue energy cells - light text */  
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(0, 87, 255)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(0, 19, 255)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(0, 0, 226)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(0, 0, 241)"] {
  color: #e0f4ff !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9) !important;
  font-weight: 600 !important;
}

/* Red period cells - light text for contrast */
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(184, 101, 101)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(190, 113, 113)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(196, 123, 123)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(201, 133, 133)"] {
  color: #ffe0e0 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  font-weight: 600 !important;
}

/* Light blue/white cells - dark text */
.offcanvas.offcanvas-bottom .table td[style*="background-color: white"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(232, 244, 255)"],
.offcanvas.offcanvas-bottom .table td[style*="background-color: rgb(228, 241, 252)"] {
  color: #1a1a2e !important;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5) !important;
  font-weight: 600 !important;
}

/* Scrollbar styling */
.offcanvas.offcanvas-bottom ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.offcanvas.offcanvas-bottom ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.offcanvas.offcanvas-bottom ::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.6);
  border-radius: 4px;
}

.offcanvas.offcanvas-bottom ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.8);
}

/* Tab panel header */
.offcanvas.offcanvas-bottom > div:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Wave direction arrows - make them more visible with modern styling */
.offcanvas.offcanvas-bottom svg line {
  stroke: #00d4ff !important;
  stroke-width: 2.5 !important;
  filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.5)) !important;
}

.offcanvas.offcanvas-bottom svg polygon {
  fill: #00d4ff !important;
  filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.5)) !important;
}

/* --- Modern Tooltip Styles --- */
.leaflet-popup-content-wrapper {
  background: linear-gradient(145deg, #1e3a5f, #0a2463) !important;
  color: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(0, 212, 255, 0.3) !important;
  -webkit-backdrop-filter: blur(10px) !important;
          backdrop-filter: blur(10px) !important;
}

.leaflet-popup-content {
  margin: 15px 20px !important;
  font-family: 'Segoe UI', sans-serif !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

.leaflet-popup-tip {
  background: #1e3a5f !important;
}

.tooltip-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: #00d4ff;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tooltip-value {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.tooltip-units {
  font-size: 1.2rem;
  font-weight: 400;
  color: #90e0ef;
  margin-left: 5px;
}

.tooltip-time, .tooltip-coords {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.tooltip-button {
  background: linear-gradient(135deg, #00d4ff, #48cae4);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 15px;
  width: 100%;
}

.offcanvas.offcanvas-bottom td svg {
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .forecast-app {
    padding: 15px;
    width: 100vw;
  }
  
  .forecast-header h1 {
    font-size: 1.8rem;
  }
  
  .forecast-controls {
    gap: 15px;
  }
  
  .control-group {
    padding: 15px;
  }
  
  .status-bar {
    padding: 10px 15px;
    font-size: 0.7rem;
  }
  
  .forecast-value {
    font-size: 1.8rem;
  }
}

.tooltip-loader, .tooltip-error {
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
}

.tooltip-loader .spinner {
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top: 3px solid #00d4ff;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}


@media (max-width: 480px) {
  .forecast-header h1 {
    font-size: 1.8rem;
  }
  
  .forecast-subtitle {
    font-size: 1rem;
  }
  
  .control-group h3 {
    font-size: 1.1rem;
  }
  
  .forecast-value {
    font-size: 1.8rem;
  }
}

/* Enhanced Responsive Design - Consolidated */

/* Ultra-wide screens (4K, Ultrawide monitors) */
@media (min-width: 2560px) {
  .main-container {
    grid-template-columns: 1fr 450px;
    gap: 2rem;
    padding: 2rem;
  }
  
  .controls-panel {
    font-size: 1.1rem;
  }
  
  .forecast-value {
    font-size: 2.5rem;
  }
}

/* Large desktops */
@media (min-width: 1440px) and (max-width: 2559px) {
  .main-container {
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
  }
}

/* Standard desktops */
@media (min-width: 1024px) and (max-width: 1439px) {
  .main-container {
    grid-template-columns: 1fr 350px;
  }
}

/* Tablets (landscape) - Critical missing breakpoint */
@media (min-width: 768px) and (max-width: 1023px) {
  .main-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 350px;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .controls-panel {
    height: 330px;
    padding: 1rem;
  }
  
  .variable-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .var-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }
}

/* Tablets (portrait) and large phones */
@media (min-width: 481px) and (max-width: 767px) {
  .main-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 320px;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .controls-panel {
    height: 300px;
    padding: 0.75rem;
  }
  
  .variable-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }
  
  .var-btn {
    padding: 0.6rem 0.4rem;
    font-size: 0.85rem;
    line-height: 1.2;
  }
  
  .control-group h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .forecast-value {
    font-size: 1.8rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .main-container {
    grid-template-rows: 1fr 280px;
    gap: 0.25rem;
    padding: 0.25rem;
  }
  
  .controls-panel {
    height: 260px;
    padding: 0.5rem;
  }
  
  .variable-buttons {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  
  .var-btn {
    padding: 0.5rem;
    font-size: 0.8rem;
    min-height: 40px;
  }
  
  .forecast-value {
    font-size: 1.8rem;
  }
}

/* Touch-optimized controls for mobile devices */
@media (max-width: 768px) {
  /* Touch-friendly button sizing */
  .var-btn {
    min-height: 44px; /* Apple's recommended touch target size */
    min-width: 44px;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    line-height: 1.2;
    touch-action: manipulation; /* Optimize for touch */
  }
  
  /* Enhanced time slider for touch interaction */
  .time-slider {
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
    touch-action: manipulation;
  }
  
  .time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }
  
  .time-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }
  
  /* Enhanced play button for touch */
  .play-button {
    min-height: 50px;
    min-width: 80px;
    font-size: 1rem;
    border-radius: 25px;
    touch-action: manipulation;
    padding: 0.75rem 1.5rem;
  }
  
  /* Opacity slider touch optimization */
  .opacity-slider {
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
  }
  
  .opacity-slider::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid white;
    -webkit-appearance: none;
    appearance: none;
  }
  
  /* Increase tap targets for control buttons */
  .control-group h3 {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
  }
}

/* ==============================================
   PROFESSIONAL CARTOGRAPHIC INTEGRATION
   ================= */

/* Large screen optimizations */
@media (min-width: 1200px) {
  .marine-legend-gradient {
    height: min(30vh, 250px); /* Large screens: 30% viewport height, max 250px */
  }
  
  .marine-legend-scale {
    position: relative;
    height: min(30vh, 250px);
  }
  
  .marine-legend {
    min-width: 65px;
    max-width: 85px;
  }
}

@media (min-width: 1600px) {
  .marine-legend-gradient {
    height: min(35vh, 300px); /* Ultra-wide: 35% viewport height, max 300px */
  }
  
  .marine-legend-scale {
    position: relative;
    height: min(35vh, 300px);
  }
}

/* Ensure proper spacing with Leaflet zoom controls - Dynamic based on legend height */
.leaflet-bottom.leaflet-right {
  margin-bottom: calc(min(25vh, 200px) + 60px) !important; /* Legend height + padding */
  margin-right: 20px !important;
}

/* Professional legend positioning */
.marine-legend {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Coordinate with scale bar positioning */
.leaflet-control-scale {
  background: rgba(15, 30, 60, 0.95) !important;
  background: var(--legend-bg) !important;
  -webkit-backdrop-filter: blur(12px) !important;
          backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border: 1px solid var(--legend-border) !important;
  border-radius: 8px !important;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace !important;
  color: #ffffff !important;
  color: var(--legend-text) !important;
}

.leaflet-control-scale-line {
  border-color: #00bcd4 !important;
  border-color: var(--legend-accent) !important;
  color: #ffffff !important;
  color: var(--legend-text) !important;
}

/* Responsive cartographic adjustments - Dynamic spacing */
@media (min-width: 1200px) {
  .leaflet-bottom.leaflet-right {
    margin-bottom: calc(min(30vh, 250px) + 70px) !important;
  }
}

@media (min-width: 1600px) {
  .leaflet-bottom.leaflet-right {
    margin-bottom: calc(min(35vh, 300px) + 80px) !important;
  }
}

@media (max-width: 768px) {
  .leaflet-bottom.leaflet-right {
    margin-bottom: calc(min(20vh, 150px) + 50px) !important;
  }
}

@media (max-width: 480px) {
  .leaflet-bottom.leaflet-right {
    margin-bottom: calc(min(18vh, 120px) + 40px) !important;  
  }
}

.last-update-time {
  color: #90e0ef;
  margin-left: 1rem;
}

/* Styling for data source location popup */
.leaflet-popup.data-source-popup .leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid #ff6b35;
}

.leaflet-popup.data-source-popup .leaflet-popup-content {
  margin: 8px 12px;
  line-height: 1.4;
  min-width: 140px;
}

.leaflet-popup.data-source-popup .leaflet-popup-content strong {
  color: #ff6b35;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.leaflet-popup.data-source-popup .leaflet-popup-content small {
  color: #666;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  line-height: 1.3;
}

.leaflet-popup.data-source-popup .leaflet-popup-tip {
  background: #ff6b35;
}

/* Enhanced marker styling */
.leaflet-interactive[stroke="#ff6b35"] {
  filter: drop-shadow(0 2px 4px rgba(255, 107, 53, 0.4));
  cursor: pointer;
}

/* Marker hover effects */
.leaflet-interactive[stroke="#ff6b35"]:hover {
  filter: drop-shadow(0 3px 6px rgba(255, 107, 53, 0.6));
  transform: scale(1.1);
  transition: all 0.2s ease;
}
/* Enhanced Professional Cartographic Compass Styles */

.compass-container.enhanced {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
  -webkit-user-select: none;
          user-select: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.compass-container.enhanced:hover {
  opacity: 1 !important;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.compass-svg.enhanced {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.compass-container.enhanced:hover .compass-svg.enhanced {
  transform: scale(1.03);
}

/* Enhanced fade-in animation */
@keyframes compassAppearEnhanced {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(8px);
    filter: blur(2px);
  }
  to {
    opacity: 0.94;
    transform: scale(1) translateY(0);
    filter: blur(0px);
  }
}

.compass-container.enhanced {
  animation: compassAppearEnhanced 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.94;
}

.compass-container.enhanced:hover {
  opacity: 1 !important;
}

/* Enhanced responsive behavior with position switching */
@media (max-width: 1024px) {
  .compass-container.enhanced {
    transform: scale(0.92);
    transform-origin: top right;
  }
}

@media (max-width: 768px) {
  .compass-container.enhanced {
    transform: scale(0.85);
    transform-origin: bottom left;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (max-width: 480px) {
  .compass-container.enhanced {
    transform: scale(0.75);
    transform-origin: bottom left;
    opacity: 0.88;
  }
}

/* Rotation animation for map rotation support */
@keyframes compassRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.compass-svg.enhanced[style*="rotate"] {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced visibility on light backgrounds */
.compass-container.enhanced {
  -webkit-backdrop-filter: blur(1px);
          backdrop-filter: blur(1px);
}

/* Fancy Icon Styles */
.rotate-180 {
  transform: rotate(180deg);
}

.rotate-90 {
  transform: rotate(90deg);
}

.rotate-270 {
  transform: rotate(270deg);
}

/* Marine theme glows */
.ocean-glow {
  filter: drop-shadow(0 0 8px rgba(0, 102, 204, 0.4));
}

.wave-glow {
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.5));
}

.wind-glow {
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.4));
}

/* Custom hover effects for marine icons */
.marine-icon:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease-in-out;
}

/* Pulsing animation for active states */
@keyframes marine-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.marine-pulse {
  animation: marine-pulse 2s ease-in-out infinite;
}

/* Gentle wave animation - contained */
@keyframes gentle-wave {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-1px) rotate(0.5deg);
  }
  66% {
    transform: translateY(1px) rotate(-0.5deg);
  }
}

.gentle-wave {
  animation: gentle-wave 3s ease-in-out infinite;
}

/* Containment styles for fancy icons */
.fancy-icon-container {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  will-change: transform;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  transform-style: preserve-3d;
  overflow: hidden;
  max-width: -webkit-fit-content;
  max-width: fit-content;
  max-height: -webkit-fit-content;
  max-height: fit-content;
}

/* Ensure animations don't cause layout shifts */
.fancy-icon-wrapper {
  contain: layout style paint;
  isolation: isolate;
}

:root {
    /* Light mode palette */
    --color-primary: #2563eb;
    --color-secondary: #64748b;
    --color-accent: #f59e42;
    --color-background: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #1e293b;
    --color-success: #22c55e;
    --color-warning: #facc15;
    --color-error: #ef4444;
    --color-info: #0ea5e9;
    --btn-secondary: #1c54b2;
    --btn-secondary-hover: #174a8c;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.10);
    --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.18);
  }
  
body.dark-mode {
    /* Dark mode palette */
    --color-primary: #60a5fa;
    --color-secondary: #a1a1aa;
    --color-accent: #fbbf24;
    --color-background: #2e2f33;
    --color-surface: #3f4854;
    --color-text: #f1f5f9;
    --color-border: #44454a;
    --color-success: #4ade80;
    --color-warning: #fde047;
    --color-error: #f87171;
    --color-info: #38bdf8;
    --btn-secondary: #3f4854;
    --btn-secondary-hover: #23242a;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.32);
    --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.44);
    background-color: #f8fafc !important;
    background-color: var(--color-background) !important;
    color: #1e293b !important;
    color: var(--color-text) !important;
  }

/* Navbar styling */
.navbar {
  transition: all 0.3s ease;
}

.navbar-nav .nav-link {
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #2563eb !important;
  color: var(--color-primary) !important;
}

/* Theme toggle styling */
.form-check-input {
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: white !important;
  border-color: #0065f8 !important;
  border-width: 2px !important;
}

.form-check-input:checked {
  background-color: #2563eb !important;
  background-color: var(--color-primary) !important;
  border-color: #2563eb !important;
  border-color: var(--color-primary) !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 101, 248, 0.25);
}

/* Dark mode override for toggle */
body.dark-mode .form-check-input {
  background-color: #64748b !important;
  background-color: var(--color-secondary) !important;
  border-color: #64748b !important;
  border-color: var(--color-secondary) !important;
}

body.dark-mode .form-check-input:checked {
  background-color: #2563eb !important;
  background-color: var(--color-primary) !important;
  border-color: #2563eb !important;
  border-color: var(--color-primary) !important;
}

/* Logo styling */
.navbar-brand img {
  transition: filter 0.3s ease;
}

/* Button styling */
.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  box-shadow: var(--card-shadow-hover);
}

/* Body transition for theme switching */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar responsive adjustments */
@media (max-width: 991.98px) {
  .navbar-nav {
    margin-top: 1rem;
  }
  
  .navbar-nav .nav-item {
    margin-bottom: 0.5rem;
  }
}

/* ===== THEME-AWARE COMPONENT CLASSES ===== */

/* Button variants that automatically adapt to theme */
.btn-theme-primary {
  background-color: #2563eb !important;
  background-color: var(--color-primary) !important;
  border-color: #2563eb !important;
  border-color: var(--color-primary) !important;
  color: white !important;
}

.btn-theme-secondary {
  background-color: #64748b !important;
  background-color: var(--color-secondary) !important;
  border-color: #64748b !important;
  border-color: var(--color-secondary) !important;
  color: white !important;
}

.btn-theme-outline {
  background-color: transparent !important;
  border: 2px solid #2563eb !important;
  border: 2px solid var(--color-primary) !important;
  color: #2563eb !important;
  color: var(--color-primary) !important;
}

.btn-theme-outline:hover {
  background-color: #2563eb !important;
  background-color: var(--color-primary) !important;
  color: white !important;
}

/* Card component that adapts to theme */
.card-theme {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
  border-color: #e2e8f0 !important;
  border-color: var(--color-border, #e2e8f0) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important;
  box-shadow: var(--card-shadow) !important;
  transition: all 0.3s ease;
}

.card-theme:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
  box-shadow: var(--card-shadow-hover) !important;
}

/* Text classes that adapt to theme */
.text-theme-primary {
  color: #2563eb !important;
  color: var(--color-primary) !important;
}

.text-theme-secondary {
  color: #64748b !important;
  color: var(--color-secondary) !important;
}

.text-theme-body {
  color: #1e293b !important;
  color: var(--color-text) !important;
}

/* Background classes that adapt to theme */
.bg-theme-surface {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
}

.bg-theme-background {
  background-color: #f8fafc !important;
  background-color: var(--color-background) !important;
}

/* Border classes that adapt to theme */
.border-theme {
  border-color: #e2e8f0 !important;
  border-color: var(--color-border, #e2e8f0) !important;
}

/* Alert variants that adapt to theme */
.alert-theme-info {
  background-color: #0ea5e9 !important;
  background-color: var(--color-info) !important;
  border-color: #0ea5e9 !important;
  border-color: var(--color-info) !important;
  color: white !important;
}

.alert-theme-success {
  background-color: #22c55e !important;
  background-color: var(--color-success) !important;
  border-color: #22c55e !important;
  border-color: var(--color-success) !important;
  color: white !important;
}

.alert-theme-warning {
  background-color: #facc15 !important;
  background-color: var(--color-warning) !important;
  border-color: #facc15 !important;
  border-color: var(--color-warning) !important;
  color: #1e293b !important;
}

.alert-theme-error {
  background-color: #ef4444 !important;
  background-color: var(--color-error) !important;
  border-color: #ef4444 !important;
  border-color: var(--color-error) !important;
  color: white !important;
}

/* ===== ACCORDION DARK MODE STYLES ===== */

/* Accordion container */
body.dark-mode .accordion {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
  
  border-radius: 8px !important;
}

/* Accordion items */
body.dark-mode .accordion-item {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
 
  border-radius: 6px !important;
  margin-bottom: 4px !important;
}

/* Accordion headers */
body.dark-mode .accordion-button {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
  
  border-radius: 6px !important;
  border-bottom: 2px solid #64748b !important;
  border-bottom: 2px solid var(--color-secondary) !important;
}

body.dark-mode .accordion-button:not(.collapsed) {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
 
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .accordion-button:hover {
  background-color: #f8fafc !important;
  background-color: var(--color-background) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
  border-color: #2563eb !important;
  border-color: var(--color-primary) !important;
}

body.dark-mode .accordion-button:focus {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
  border-color: #2563eb !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25) !important;
}

/* Accordion button collapsed state */
body.dark-mode .accordion-button.collapsed {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
  border-bottom: 1px solid #64748b !important;
  border-bottom: 1px solid var(--color-secondary) !important;
}

/* Accordion body */
body.dark-mode .accordion-body {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
  border: 1px solid #64748b !important;
  border: 1px solid var(--color-secondary) !important;
  border-top: none !important;
  border-radius: 0 0 6px 6px !important;
  padding: 16px !important;
}

/* Accordion collapse */
body.dark-mode .accordion-collapse {
  border: 1px solid #64748b !important;
  border: 1px solid var(--color-secondary) !important;
  border-top: none !important;
  border-radius: 0 0 6px 6px !important;
}

/* Accordion button arrow icon */
body.dark-mode .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23f1f5f9%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e") !important;
}

body.dark-mode .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23f1f5f9%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e") !important;
}

/* Form controls in dark mode */
body.dark-mode .form-control {
  background-color: #f8fafc !important;
  background-color: var(--color-background) !important;
  border-color: var(--color-border) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
}

body.dark-mode .form-control:focus {
  background-color: #f8fafc !important;
  background-color: var(--color-background) !important;
  border-color: #2563eb !important;
  border-color: var(--color-primary) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
  box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25) !important;
}

body.dark-mode .form-select {
  background-color: #f8fafc !important;
  background-color: var(--color-background) !important;
  border-color: var(--color-border) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
}

body.dark-mode .form-select:focus {
  background-color: #f8fafc !important;
  background-color: var(--color-background) !important;
 
  color: #1e293b !important;
 
  color: var(--color-text) !important;
  box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25) !important;
}

/* Range input in dark mode */
body.dark-mode input[type="range"] {
  background-color: #f8fafc !important;
  background-color: var(--color-background) !important;
}

body.dark-mode input[type="range"]::-webkit-slider-thumb {
  background-color: #2563eb !important;
  background-color: var(--color-primary) !important;
}

body.dark-mode input[type="range"]::-moz-range-thumb {
  background-color: #2563eb !important;
  background-color: var(--color-primary) !important;
}

/* Button groups in dark mode */
body.dark-mode .btn-group .btn {
  background-color: #ffffff !important;
  background-color: var(--color-surface) !important;
  border-color: var(--color-border) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
}

body.dark-mode .btn-group .btn:hover {
  background-color: #f8fafc !important;
  background-color: var(--color-background) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
}

body.dark-mode .btn-group .btn.active {
  background-color: #2563eb !important;
  background-color: var(--color-primary) !important;
  border-color: #2563eb !important;
  border-color: var(--color-primary) !important;
  color: white !important;
}

/* Badge in dark mode */
body.dark-mode .badge {
  background-color: #64748b !important;
  background-color: var(--color-secondary) !important;
  color: #1e293b !important;
  color: var(--color-text) !important;
}

/* Transition for smooth theme switching */
.accordion,
.accordion-item,
.accordion-button,
.accordion-body,
.form-control,
.form-select,
.btn-group .btn {
  transition: all 0.3s ease !important;
}

/*# sourceMappingURL=main.8304f810.css.map*/