/* General styling */
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
  background-color: #f8f9fa;
}

/* Map styling */
#map {
  border-radius: 5px;
  border: 1px solid #ddd;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.legend-color {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Mapbox specific styling */
.mapboxgl-popup {
  max-width: 300px;
}

.mapboxgl-popup-content {
  padding: 15px;
  border-radius: 5px;
}

.mapboxgl-popup-content h5 {
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
}

.mapboxgl-popup-content p {
  margin-bottom: 5px;
}

.mapboxgl-ctrl-logo {
  margin-right: 5px !important;
}

.mapboxgl-ctrl-attrib {
  font-size: 11px;
}

/* Loading indicator for map */
.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Council card styling */
.council-card {
  transition: transform 0.2s;
  height: 100%;
}

.council-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.council-card .card-header {
  font-weight: bold;
}

/* Form styling */
.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Date range picker customization */
.daterangepicker {
  font-family: inherit;
}

.daterangepicker .ranges li.active {
  background-color: #007bff;
}

/* HTMX loading indicators */
.htmx-indicator {
  opacity: 0;
  transition: opacity 500ms ease-in;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Navbar active link styling */
.navbar .nav-link {
  color: #495057;
  position: relative;
  padding-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.navbar .nav-link.active {
  color: #007bff;
  font-weight: 600;
}

.navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 3px;
  background-color: #007bff;
  border-radius: 2px 2px 0 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .legend-item {
    margin-bottom: 10px;
  }
  
  #map-container {
    height: 717px !important;
    width: 100% !important;
  }
  
  #map {
    height: 100% !important;
  }
  
  .mapboxgl-popup-content {
    padding: 10px;
  }
}