#day-map[hidden],
#day-map .map-unavailable[hidden] {
  display: none;
}

#day-map {
  color: #252824;
}

.route-map-canvas {
  isolation: isolate;
  width: 100%;
  height: 380px;
  border: 1px solid #dfdfd7;
  background: #eeeee8;
  font:
    13px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.route-map-canvas .leaflet-tile-pane {
  filter: grayscale(0.75) saturate(0.6);
}

.map-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
}

.map-caption {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.map-caption > span,
.map-caption > small {
  display: block;
}

.map-caption > small {
  margin-top: 3px;
  color: #666960;
  font-size: 13px;
  line-height: 1.6;
}

.map-buttons {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}

.map-buttons button,
.map-stop-list button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
}

.map-buttons button {
  min-height: 44px;
  border: 1px solid #dfdfd7;
  border-radius: 2px;
  background: transparent;
  font-size: 13px;
  line-height: 1;
}

.map-buttons .map-reset {
  padding: 0 10px;
}

.map-buttons .map-zoom {
  width: 44px;
  padding: 0;
  font-size: 20px;
}

.map-buttons button:hover:not(:disabled) {
  border-color: #845745;
  color: #845745;
}

.map-buttons button:disabled {
  color: #666960;
  cursor: default;
  opacity: 0.5;
}

.map-stop-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0 24px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.map-stop-list li {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.map-stop-list button {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.map-stop-list button:hover,
.map-stop-list button[aria-pressed="true"] {
  color: #845745;
}

.map-stop-number {
  flex: 0 0 auto;
  color: #666960;
  font-variant-numeric: tabular-nums;
}

.map-stop-list button[aria-pressed="true"] .map-stop-number {
  color: inherit;
}

.map-numbered-marker {
  border: 0;
  background: transparent;
}

.map-numbered-marker .map-marker-button {
  display: block;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  margin: 0;
  padding: 0;
  border: 1px solid #555b50;
  border-radius: 50%;
  background: #fff;
  color: #252824;
  box-shadow: none;
  font:
    500 12px/24px system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-align: center;
  cursor: pointer;
}

.map-numbered-marker .map-marker-button:hover,
.map-numbered-marker .map-marker-button.is-selected {
  border-color: #845745;
  background: #845745;
  color: #fff;
}

#day-map button:focus-visible,
#day-map a:focus-visible,
.route-map-canvas:focus-visible {
  outline: 2px solid #845745;
  outline-offset: 3px;
}

.map-unavailable {
  margin: 12px 0 0;
  padding-left: 10px;
  border-left: 2px solid #845745;
  color: #666960;
  font-size: 13px;
  line-height: 1.6;
}

.route-map-canvas .leaflet-control-attribution {
  background: rgb(250 249 246 / 95%);
  color: #666960;
  font-size: 11px;
}

.route-map-canvas .leaflet-control-attribution a {
  color: #555d50;
}

.route-map-canvas .leaflet-popup-content-wrapper,
.route-map-canvas .leaflet-popup-tip {
  border-radius: 2px;
  background: #faf9f6;
  color: #252824;
  box-shadow: none;
}

.route-map-canvas .leaflet-popup-content-wrapper {
  border: 1px solid #dfdfd7;
}

.route-map-canvas .leaflet-popup-content {
  margin: 14px 28px 14px 16px;
  font-size: 13px;
  line-height: 1.6;
}

.route-map-canvas .leaflet-popup-close-button {
  color: #666960;
}

@media (max-width: 600px) {
  .route-map-canvas {
    height: 340px;
  }

  .map-controls {
    flex-direction: column;
    gap: 10px;
  }

  .map-stop-list {
    gap: 3px 16px;
  }
}
