/* LW Rail Map Core — Public Map Styles */

/* Legend */
.lw-rail-map-legend {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 10;
  width: 320px;
  max-width: calc(100% - 32px);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10, 22, 35, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  color: #ffffff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.lw-rail-legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px 14px;
}

.lw-rail-legend-title {
  font-weight: 800;
  font-size: 18px;
}

.lw-rail-legend-toggle {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6a313;
  color: #0a1623;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}

.lw-rail-legend-body {
  padding: 10px 14px 14px 14px;
}

.lw-rail-legend-row {
  display: grid;
  grid-template-columns: 22px 18px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  user-select: none;
}

.lw-rail-legend-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f6a313;
  cursor: pointer;
}

.lw-rail-legend-row.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.lw-rail-legend-swatch {
  width: 18px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}

/* Swatch colours */
.lw-rail-legend-swatch.main { background: #000000; }
.lw-rail-legend-swatch.metro { background: #7a1fa2; }
.lw-rail-legend-swatch.tram { background: #e65100; }
.lw-rail-legend-swatch.heritage { background: #2e7d32; }
.lw-rail-legend-swatch.stations { background: #005bbb; }

.lw-rail-legend-text {
  font-size: 15px;
  font-weight: 650;
  color: #ffffff;
}

/* Popup: blue, radius 5, white text */
.maplibregl-popup-content {
  background: #005bbb !important;
  color: #ffffff !important;
  border-radius: 5px !important;
  padding: 10px 12px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25) !important;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
}

.maplibregl-popup-close-button {
  color: #ffffff !important;
  font-size: 18px !important;
  opacity: 0.9 !important;
}

.maplibregl-popup-close-button:hover {
  opacity: 1 !important;
  background: transparent !important;
}

.maplibregl-popup-tip {
  border-top-color: #005bbb !important;
  border-bottom-color: #005bbb !important;
}

.lw-rail-popup-title {
  font-weight: 800;
  font-size: 14px;
  margin: 0 0 6px 0;
}

.lw-rail-popup-link a {
  color: #ffffff !important;
  text-decoration: underline;
  font-weight: 700;
}

/* Attribution styling */
.maplibregl-ctrl-attrib {
  background: rgba(10, 22, 35, 0.72) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.maplibregl-ctrl-attrib a {
  color: #ffffff !important;
  text-decoration: underline;
}
