/* Vattenkarta - gemensam stil for Kungsbackaan och Rolfsan */

#map {
  width: 95vw;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  height: 80vh;
  min-height: 600px;
}

.hover-label {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #000;
  color: #000;
  padding: 3px 6px;
  font-weight: 600;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
  font-size: 14px;
  line-height: 1.4;
}

.leaflet-popup-content a {
  color: #0056b3;
  text-decoration: none;
}

.leaflet-popup-content a:hover {
  text-decoration: underline;
}

.leaflet-container .leaflet-interactive,
.leaflet-container .leaflet-interactive:focus {
  outline: none;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(520px, 92vw);
  background: #fff;
  box-shadow: -6px 0 16px rgba(0, 0, 0, 0.2);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 180ms ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar.is-open {
  transform: translateX(0);
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f5f6f7;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar__title {
  font-weight: 700;
  font-size: 14px;
}

.sidebar__close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.sidebar__frame {
  flex: 1;
  width: 100%;
  border: 0;
}

/* Leaflet-kontroller ska ligga over kartlagren men under sidopanelen. */
.leaflet-top,
.leaflet-bottom {
  z-index: 500;
}

.tri-marker {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid #d40000;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.tri-marker.is-hover {
  border-left-width: 10px;
  border-right-width: 10px;
  border-bottom-width: 18px;
  border-bottom-color: #ff0000;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.atgard-marker {
  width: 22px;
  height: 22px;
  background: #1976d2;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 2px solid #fff;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}

.leaflet-control-zoom a,
.leaflet-control-layers-toggle,
.leaflet-bar a,
.leaflet-popup-close-button,
#sidebarClose,
.sidebar__close,
.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus,
.leaflet-popup-close-button:hover,
.leaflet-popup-close-button:focus,
#sidebarClose:hover,
#sidebarClose:focus,
.sidebar__close:hover,
.sidebar__close:focus {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.leaflet-control-layers,
.leaflet-control-layers label {
  font-size: 16px;
}

.leaflet-control-layers label {
  line-height: 1.5;
  margin-bottom: 4px;
}

.leaflet-control-layers input {
  transform: scale(1.15);
  margin-right: 6px;
}

@media (max-width: 700px) {
  #map {
    width: 100%;
    margin-left: 0;
    height: 75vh;
    min-height: 420px;
  }

  .leaflet-control-layers,
  .leaflet-control-layers label {
    font-size: 14px;
  }
}
