#map-container:fullscreen, #map-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

#fullscreen-toggle:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

#map-caption {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 1.2em;
  padding: 8px 15px;
  border-radius: 8px;
  text-align: center;
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

#map-caption.visible {
  display: block;
  opacity: 1;
}

#map-caption.fade-out {
  opacity: 0;
}

#map {
  height: 100vh;
  width: 100%;
  position: relative;
}

#map.inactive {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

#toggle-map-interaction {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  min-width: max-content;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#toggle-map-interaction.active {
  background: #ff8c00;
  color: white;
}

#toggle-map-interaction.inactive {
  background: #45a049;
  color: white;
}

#toggle-map-interaction i {
  transition: transform 0.3s ease;
  font-size: 16px;
}

#toggle-map-interaction:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

@media (max-width: 767px) {
  #toggle-map-interaction {
    padding: 10px 16px;
    font-size: 13px;
  }
}

.popup-table {
  width: 100%;
  border-collapse: collapse;
}

.popup-table th, .popup-table td {
  padding: 5px;
  border: 1px solid white;
  font-weight: bold;
}

.popup-table tr {
  color: white;
}

.popup-table th {
  background-color: #f0f0f0;
  color: black;
  text-align: center;
}

.popup-table img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: white;
  padding: 3px;
  box-sizing: border-box;
  vertical-align: middle;
}

.popup-table img.icon-web, .popup-table img.icon-iheart {
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.leaflet-popup-close-button {
  background-color: #424242 !important;
  color: #dedede !important;
  border-radius: 50%;
  width: 24px !important;
  height: 24px !important;
  text-align: center !important;
  line-height: 22px !important;
  font-weight: bold !important;
  text-decoration: none !important;
  position: absolute !important;
  top: -1px !important;
  right: 2px !important;
  padding-top: 0px !important;
  padding-left: 3.5px !important;
}

.station-icon, .custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-sizing: border-box;
}

.station-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 3px solid var(--station-color);
}

.station-circle img, .marker-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.custom-tooltip {
  font-weight: bold;
  background-color: white;
  border-radius: 5px;
  padding: 5px;
  color: black;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-popup .leaflet-popup-content-wrapper {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.custom-popup .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.9);
}

.custom-popup.leaflet-popup-right .leaflet-popup-tip {
  left: auto;
  right: -10px;
}

.custom-popup.leaflet-popup-left .leaflet-popup-tip {
  left: -10px;
  right: auto;
}

.custom-popup.leaflet-popup-top .leaflet-popup-tip {
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.custom-popup.leaflet-popup-bottom .leaflet-popup-tip {
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

#chart-NSE {
  height: 200px !important;
  width: 100% !important;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Position Leaflet zoom controls */
.leaflet-control-zoom.leaflet-bar.leaflet-control {
  position: absolute;
  top: 20px;
  left: 20px;
  margin: 0;
}

.leaflet-control-zoom a {
  width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  font-size: 18px;
  font-weight: bold;
}