/* ==================== MAP PAGE SPECIFIC STYLES ==================== */
/* This file extends the main portfolio CSS */

/* ==================== MAPS SLIDESHOW ==================== */

.maps-slideshow-container {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  margin: 0 auto 0 auto;
  overflow: hidden;
}

.maps-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
  box-sizing: border-box;
}

.maps-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.maps-arrow {
  background: rgba(200, 200, 200, 0.8);
  color: var(--text-primary);
  font-size: 2em;
  padding: 10px 15px;
  cursor: pointer;
  border: none;
  z-index: 10000;
  user-select: none;
  transition: background 0.3s;
}

.maps-arrow:hover {
  background: rgba(160, 160, 160, 0.9);
}

.maps-navigation-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 15px auto 2vw auto;
  width: 100%;
  z-index: 100;
}

.maps-arrow-left,
.maps-arrow-right {
  position: static;
  transform: none;
}

.maps-indicators {
  position: static;
  transform: none;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  border-radius: 20px;
}

.maps-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.maps-dot:hover {
  background: #999;
}

.maps-dot.active {
  background: #333;
}

.mapone-row {
  position: relative;
  width: 100%;
  height: 40vh;
  margin: 0 auto 2vw auto;
  padding: 10px;
  min-width: 600px;
  border: 1px solid var(--border-medium);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  border-radius: 1px;
  background: #fafafa;
}

.mapone-left {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 280px;
  max-height: calc(100% - 20px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  overflow-y: auto;
  background: var(--bg-panel);
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.mapone-left h2 a {
  display: inline-block;       /* make the background hug text */
}

.mapone-left h2 a:hover {
  background: var(--highlight-bg);
  text-decoration: none;
}


.mapone-right {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #999;
  box-sizing: border-box;
}

.static-map-background {
  padding: 0;
  background: #fff;
}

.static-map-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}



/* ==================== MAP CONTAINERS ==================== */

#map1, #map2, #map3, #map4, #maphome {
  width: 100%;
  height: 100%;
}

/* ==================== MAP CONTROLS & LEGEND ==================== */

#map-layer-controls,
.map-legend {
  font-size: 13px;
  border-radius: 1px;
  width: 100%;
  box-sizing: border-box;
}

#map-layer-controls {
}

#map-layer-controls h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 600;
}

#map-layer-controls h5,
.map-legend h5 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--text-darker);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#map-layer-controls h5 {
  margin: 0 0 0px 0;
}

#map-layer-controls label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 0;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  transition: color 0.2s;
}

#map-layer-controls label:hover {
  color: var(--text-primary);
}

.layer-section {
  margin-bottom: 10px;
}

.layer-section:last-child {
  margin-bottom: 0;
}

/* ==================== LEGEND ITEMS ==================== */

#zoning-legend-items {
  display: flex;
  flex-direction: column;
}

.maplegend-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin-bottom: 4px;
}

.maplegend-color {
  width: 18px;
  height: 14px;
  border: 1px solid #666;
  border-radius: 2px;
  flex-shrink: 0;
  margin-right: 6px;
}

.maplegend-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==================== LEAFLET CUSTOMIZATION ==================== */

.borough-label {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--text-secondary);
  border-radius: 3px;
  padding: 3px 7px;
  font-weight: bold;
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.leaflet-tooltip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #666;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.leaflet-control-attribution a {
  text-decoration: none;
  display: none;
}

/* ==================== WEATHER MARKERS ==================== */

.leaflet-marker-icon.weather-marker {
  background: none;
  border: none;
  width: auto !important;
  height: auto !important;
  text-align: center;
  pointer-events: auto;
}

.weather-marker,
.leaflet-marker-icon.weather-marker .weather-marker-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px;
  border-radius: 6px;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  text-align: center;
  line-height: 1;
}

.weather-marker {
  border: 2px solid var(--text-secondary);
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  gap: 2px;
}

.leaflet-marker-icon.weather-marker .weather-marker-content {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-name,
.weather-marker-content .city-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dark);
  white-space: nowrap;
}

.city-name {
  font-size: 11px;
  color: var(--text-secondary);
}

.temp-display,
.weather-marker-content .temp-display {
  font-weight: bold;
  font-size: 16px;
  color: #d32f2f;
}

.weather-marker-content .temp-display {
  font-size: 14px;
  font-weight: 600;
}

.wind-display,
.weather-marker-content .wind-display {
  font-size: 10px;
  color: #1976d2;
  font-weight: 600;
}

.weather-marker-content .wind-display {
  font-size: 11px;
}

/* ==================== WEATHER POPUP ==================== */

.leaflet-popup.weather-popup .leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  text-align: center;
  padding: 6px;
}

.leaflet-popup.weather-popup .leaflet-popup-content {
  margin: 0;
  line-height: 1.2;
}

.leaflet-popup.weather-popup .popup-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.leaflet-popup.weather-popup .popup-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 2px 0;
}

.leaflet-popup.weather-popup .info-label {
  font-weight: 600;
  color: #1976d2;
}

.leaflet-popup.weather-popup .info-value {
  color: #d32f2f;
}

/* ==================== WEATHER CLOCK ==================== */

.weather-clock {
  border-radius: 6px;
  color: black;
  width: 100%;
  box-sizing: border-box;
}

.clock-time {
  font-size: 17px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  line-height: 1.3;
}

.clock-date {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 0px;
}

.clock-label {
  font-size: 10px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: none;
}

/* ==================== TOGGLE SWITCH ==================== */

.map-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  margin-right: 10px;
  vertical-align: middle;
}

.map-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.map-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e0;
  border-radius: 22px;
  transition: background-color 0.3s ease;
  border: 1px solid #a0aec0;
}

.map-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.map-switch input:checked + .map-slider {
  background-color: #4299e1;
  border-color: #3182ce;
}

.map-switch input:checked + .map-slider:before {
  transform: translateX(20px);
}

.map-slider:hover {
  background-color: #a0aec0;
}

.map-switch input:checked + .map-slider:hover {
  background-color: #3182ce;
}

.map-switch input:focus + .map-slider {
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.3);
}

/* ==================== CITY SEARCH ==================== */

.city-search-box {
  width: 100%;
  box-sizing: border-box;
  /* padding: 5px; */
  /* border: 1px solid #ccc; */
  border-radius: 6px;
  /* background: #fff; */
  position: relative;
}

.city-search-box h5 {
  margin: 0 0 6px 0;
  font-size: 14px;
  display: none;
}

.city-search-container {
  display: flex;
  gap: 4px;
}

.city-search-input {
  flex: 1;
  padding: 6px;
  border: none;
  border-radius: 4px;
  outline: none;
  box-sizing: border-box;
  width: 100%;
}

.city-search-input:focus {
  border-color: #0077ff;
}

.city-search-button {
  padding: 6px 10px;
  border: none;
  background-color: #0077ff;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.city-search-button:hover {
  background-color: #005bb5;
}

.city-search-result {
  margin-top: 6px;
  font-size: 13px;
  display: none;
  min-height: 18px;
  background: #cbcbcb;
  border-radius: 3px;
}

.city-search-result.search-result-searching {
  color: #0077ff;
}

.city-search-result.search-result-success {
  color: #008000;
}

.city-search-result.search-result-error {
  color: #cc0000;
}

/* ==================== AUTOCOMPLETE ==================== */

.city-autocomplete-suggestions {
  position: absolute;
  top: 56px;
  left: 8px;
  right: 8px;
  border-radius: 4px;
  background: #fff;
  max-height: 150px;
  overflow-y: auto;
  z-index: 1000;
}

.autocomplete-item {
  padding: 4px 6px;
  cursor: pointer;
}

.autocomplete-item:hover {
  background-color: #f0f0f0;
}

.autocomplete-no-results {
  padding: 4px 6px;
  color: #999;
  font-style: italic;
}



/* ======================================== */
/* MAP 4 CUSTOM STYLES (for Loading Bar) */
/* ======================================== */
#loading-bar-container {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 5px;
    overflow: hidden; /* Ensures the bar stays within the container */
}

#loading-bar {
    height: 100%;
    width: 0%;
    background-color: #28a745; /* Success Green */
    border-radius: 5px;
    transition: width 0.3s ease-out; /* Smooth transition for progress updates */
}

/* Optional: Clean up the status block */
#air-quality-status h3 {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    margin: 0;
    margin-bottom: 5px;
}
#air-quality-status p {
    font-size: 0.9em;
    color: #555;
    margin: 0;
}


