@page {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Base styles */
body {
  color: #666;
  font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  font-feature-settings: normal;
  line-height: inherit;
  margin: 0;
}

*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: inherit;
  font-weight: inherit;
  color: #333;
  margin: 0;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


.route-color-swatch {
  min-width: 29px;
  height: 29px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: -0.5px;
  padding: 0 2px;
  flex-shrink: 0;
  font-weight: bold;
  color: white;
}

/* Map Styles */

.map-container {
  height: 100vh;
  position: relative;
}

.map {
  width: 100%;
  height: 100vh;
  min-height: 350px;

}

@media screen and (min-width: 768px) {
  .timetable-page .map {
    min-height: 450px;
  }
}

.map .maplibregl-popup-content .popup-title {
  margin: 0 20px 5px 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.map .maplibregl-popup-content .popup-label {
  border-bottom: 1px solid #e0e0e0;
  padding-top: 0.5rem;
}

.map .maplibregl-popup-content .route-list {
  margin-bottom: 1rem;
  margin-top: 0.25rem;
}

.map .maplibregl-popup-content .map-route-item {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.map .maplibregl-popup-content .map-route-item:hover {
  text-decoration: none;
}

.timetable-page
  .map
  .maplibregl-popup-content
  a.map-route-item
  .underline-hover:hover {
  text-decoration: underline;
}

.map .maplibregl-popup-content .maplibregl-popup-close-button {
  padding: 0 5px;
}

.map .maplibregl-popup-content .upcoming-stops {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  line-height: 1;
  padding-top: 5px;
}

.timetable-page
  .map
  .maplibregl-popup-content
  .upcoming-stops div:nth-child(1) {
  font-weight: bold;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 3px;
  margin-bottom: -3px;
}

.timetable-page
  .map
  .maplibregl-popup-content
  .upcoming-stops div:nth-child(2) {
  font-weight: bold;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 3px;
  margin-bottom: -3px;
}

.timetable-page
  .map
  .maplibregl-popup-content
  .upcoming-stops
  div:nth-child(2n-1) {
  text-align: right;
  font-weight: bold;
}

.map .maplibregl-popup-content .vehicle-updated {
  padding-top: 5px;
  font-size: 10px;
  text-align: right;
}

.map .vehicle-popup .maplibregl-popup-content {
  padding-bottom: 5px;
}

.map-legend {
  padding: 0 10px;
}

@media screen and (min-width: 768px) {
.map-legend {
    padding: 10px;
    background-color: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: absolute;
    left: 10px;
    bottom: 35px;
    z-index: 1;
  }
}

.map-legend .legend-item {
  padding: 4px 0;
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 4px;
}

.map-legend .legend-item .legend-icon {
  width: 22px;
  padding-top: 3px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.map-legend .legend-item .legend-text {
  font-size: 12px;
}

.stop-marker {
  background: #ffffff;
  border: 2px solid #3f4a5c;
  border-radius: 50%;
  width: 12px;
  height: 12px;
}


.map-legend {
    display: none;
  }
}



.route-description {
  padding-left: 20px;
  font-size: 1.25rem;
  background-color: #2CC0D8;
  color: #ffffff;
  margin-top: 0.2em;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px black;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}



