/* =========================
   Grundlayout
========================= */

html, body {
  height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

/* =========================
   Header
========================= */

header {
  background-color: #2c3e50;
  color: white;
  padding: 12px 20px;
}

header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

/* =========================
   Karta
========================= */

#map {
  width: 100%;
  height: 80vh;
  min-height: 600px;
}

/* =========================
   Tooltip (hover-text)
========================= */

.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);
}

/* =========================
   Popup-justering
========================= */

.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;
}

/* =========================
   Ta bort svart fokus-ram
========================= */

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

/* =========================
   Sidebar för dokument
========================= */

.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; /* över kartan */
  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 ska inte ligga över sidpanelen */
.leaflet-top,
.leaflet-bottom {
  z-index: 500;
}

/* =========================
   Vandringshinder – triangelmarkör
========================= */
.tri-marker {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid #d40000; /* röd */
  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; /* lite ljusare röd */
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.45));
}
/* =========================
   Åtgärder – kvadratisk markör med Å
========================= */  
.atgard-marker {
  width: 22px;
  height: 22px;
  background: #1976d2;        /* blå */
  color: #ffffff;             /* vitt Å */
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;         /* gör den kvadratisk med lite rundade hörn */
  border: 2px solid white;
  box-shadow: 0 0 3px rgba(0,0,0,0.4);
}

/* Ta bort streck/understrykning under zoomknappar och close-knappar */
.leaflet-control-zoom a,
.leaflet-control-layers-toggle,
.leaflet-bar a,
.leaflet-popup-close-button,
#sidebarClose,
.sidebar__close {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Om temat lägger fokuslinjer/understrykningar */
.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;
}
