/**
 * Copyright (C) 2025 Michelle Tomasko
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 * Project: scmts-map
 * Description: Styles for the map viewer. Sets full-viewport map layout
 * and ensures proper rendering of Leaflet controls.
 *
 * Dependencies: None
 */

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

body, html {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#map {
  width: 100%;
  height: 100%;
}

/* Leaflet popup styles */
.leaflet-popup-content {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.leaflet-popup-content strong {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.5px;
}

/* County and Area selector dropdown */
.area-selector {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: #8E6F51;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  font-family: 'Oswald', sans-serif;
  max-width: calc(100vw - 80px); /* Leave room on right side */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.area-selector label {
  font-size: 12px;
  font-weight: 500;
  margin-right: 0;
  color: white;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.area-selector select {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #8E6F51;
  border-radius: 3px;
  background: #8E6F51;
  color: white;
  cursor: pointer;
  letter-spacing: 0.5px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.area-selector select:hover {
  background: #a0826b;
}

.area-selector select:focus {
  outline: 2px solid #F08721;
  outline-offset: 2px;
  border-color: #F08721;
}

.area-selector select option {
  background: #8E6F51;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .area-selector {
    padding: 6px;
    gap: 3px;
  }

  .area-selector label {
    font-size: 11px;
    margin-right: 0;
  }

  .area-selector select {
    font-size: 11px;
    max-width: 150px;
    margin-right: 6px;
  }

  /* Make the Park/Forest selector narrower on mobile */
  #area-select {
    max-width: 100px;
  }
}
