/*
 * map.css — styling for the Leaflet map view rendered by site/js/map.js
 * inside the #map mount point.
 *
 * Desktop/mobile layout switching (side-by-side vs. toggle) is out of
 * scope here — that's U6's responsive.css. This file only makes the map
 * canvas, the unmapped/pending panel, the focusable stop list, and the
 * Leaflet popup content legible and consistent with base.css's palette.
 */

#map {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trip-map-wrapper h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.trip-map-canvas {
  width: 100%;
  height: 420px;
  min-height: 320px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #eee;
}

.trip-map-canvas-error {
  margin: 0.5rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--color-error-border);
  background: var(--color-error-bg);
  color: var(--color-error-text);
  font-size: 0.95rem;
}

.map-unmapped-panel,
.map-stop-list {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  background: #fff;
}

.map-unmapped-panel h3,
.map-stop-list h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.map-unmapped-panel h4 {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.9rem;
  color: #444;
}

.map-unmapped-panel__empty,
.map-stop-list__empty {
  margin: 0;
  color: #444;
  font-size: 0.9rem;
}

.map-unmapped-panel__list {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.map-unmapped-panel__list li {
  margin-bottom: 0.25rem;
}

.map-stop-list__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.map-stop-list__button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  font-size: 0.95rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fafafa;
  color: #1a1a1a;
  cursor: pointer;
}

.map-stop-list__button:hover {
  background: #f0f0f0;
}

.map-stop-list__button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.map-stop-list__button.is-active {
  border-color: var(--color-accent);
  background: #e7f0f6;
  font-weight: 600;
}

/* Leaflet popup content, rendered via marker.bindPopup()/HTML strings. */
.stop-popup,
.route-popup {
  font-size: 0.9rem;
  max-width: 260px;
}

.stop-popup h3,
.route-popup h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.stop-popup__category,
.route-popup__status {
  margin: 0 0 0.4rem;
  color: #555;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stop-popup__days,
.stop-popup__notes,
.stop-popup__source {
  margin: 0 0 0.4rem;
}

.stop-popup__features {
  margin: 0 0 0.4rem;
  padding-left: 1.1rem;
}

.stop-popup__attributes {
  margin: 0 0 0.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.5rem;
}

.stop-popup__attributes dt {
  font-weight: 600;
  color: #444;
}

.stop-popup__attributes dd {
  margin: 0;
}

.stop-popup__rules-heading {
  margin: 0.4rem 0 0.2rem;
}

.stop-popup__rules {
  margin: 0;
  padding-left: 1.1rem;
}
