/* ============================================================================
   map.css — Map container and Leaflet overrides
   ============================================================================ */

/* ---- Map container ----------------------------------------------------- */
.left-panel {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 !important;
  height: calc(100vh - 60px - 60px);
  bottom: 60px;
}

#map {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
  background: transparent !important;
}
.leaflet-container { background: transparent !important; }

/* ---- North arrow ------------------------------------------------------- */
.north-arrow {
  position: absolute;
  bottom: 35px;
  right: 220px;
  z-index: 1000;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.north-arrow svg,
.north-arrow img { width: 100%; height: 100%; }

/* ---- Live train markers ----------------------------------------------- */
.cr-train-marker { background: transparent; border: none; }
.cr-train-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
  transform-origin: center center;
}
.cr-train-icon img { width: 100%; height: 100%; pointer-events: none; }

/* ---- Train direction toggle ------------------------------------------- */
.train-direction-toggle {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: none; /* Hidden by default, shown only in Passenger Operations */
  background: rgba(255, 255, 255, 0.97);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  border: 1.5px solid rgb(128, 39, 108);
}

.train-direction-toggle.visible {
  display: flex;
}

.direction-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  font-family: 'DM Sans', Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgb(128, 39, 108);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.15s, color 0.15s;
}

.direction-btn + .direction-btn {
  border-left: 1.5px solid rgb(128, 39, 108);
}

.direction-btn:hover,
.direction-btn.active {
  background: rgb(128, 39, 108);
  color: #fff;
}
