/* Ocean Data Extension Styles */

/* Map Widget */
#oceandata-map {
  z-index: 1;
}

.location-type-selector {
  padding: 10px;
  background: #f5f5f5;
  border-radius: 4px;
}

.location-type-selector label {
  margin-right: 20px;
  cursor: pointer;
}

.map-instructions {
  font-size: 0.9em;
  color: #333;
}

/* Homepage Map */
#homepage-dataset-map {
  height: 620px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.homepage-map-section {
  padding: 40px 0;
  background: #f9f9f9;
}

.homepage-map-section h2 {
  text-align: center;
  margin-bottom: 10px;
  color: #005580;
}

.homepage-map-section p.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
  font-size: 1.1em;
}

/* ── Side-by-side map layout ── */
.map-layout-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

/* Left: narrow filter sidebar */
.map-sidebar-panel {
  flex: 0 0 210px;
  min-width: 170px;
  max-width: 240px;
}

.map-sidebar-inner {
  background: #fff;
  border: 1px solid #dde1e6;
  border-radius: 8px;
  padding: 14px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-heading {
  font-weight: 700;
  font-size: 12px;
  color: #005580;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.sidebar-heading .fa {
  margin-right: 5px;
}

.sidebar-count {
  font-size: 12px;
  color: #666;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.sidebar-field {
  display: flex;
  flex-direction: column;
}

.sidebar-field label {
  font-size: 10px;
  font-weight: 700;
  color: #666;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sidebar-field .form-control {
  font-size: 12px;
  height: 30px;
  padding: 3px 7px;
  border-color: #cdd3da;
  border-radius: 4px;
}

.sidebar-field .btn {
  font-size: 12px;
  padding: 5px 10px;
}

/* Right: map fills remaining width */
.map-main-panel {
  flex: 1;
  min-width: 0;
}

/* Leaflet layer control tweaks */
.leaflet-control-layers {
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
.leaflet-control-layers-expanded {
  padding: 8px 12px !important;
  font-size: 13px !important;
}
.leaflet-control-layers label {
  margin-bottom: 4px;
}

/* Leaflet Popup Customization */
.leaflet-popup-content {
  margin: 10px;
  line-height: 1.6;
}

.leaflet-popup-content h4 {
  margin: 0 0 10px 0;
  color: #005580;
}

.leaflet-popup-content .dataset-link {
  display: inline-block;
  margin-top: 10px;
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
}

.leaflet-popup-content .dataset-link:hover {
  text-decoration: underline;
}

/* Admin Info Display */
#admin-info .well {
  margin-bottom: 0;
}

#admin-info p {
  margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
  #oceandata-map,
  #homepage-dataset-map {
    height: 380px;
  }

  .map-layout-row {
    flex-direction: column;
  }

  .map-sidebar-panel {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .map-sidebar-inner {
    height: auto;
  }
}
