@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

.map-ui {
  width: 100%; 
  height: 100vh;  
  height: 100svh;  
  height: 100dvh;   
}  
  
.valais-map {     
  width: 100%;  
  height: 100%; 
  min-height: 100%; 
  position: absolute; 
  inset: 0;
} 

.map-ui,
.map-ui * {
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif; 
}

.map-ui-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.map-ui-anchor {
  position: absolute;
  z-index: 1000;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(32, 184, 249, 0.35), rgba(10, 36, 113, 0.95));
  color: #ffffff;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.map-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.map-loading__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(12, 16, 30, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.map-loading__spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #20B8F9;
  animation: map-spin 1s linear infinite;
}

.map-loading__text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@keyframes map-spin {
  to {
    transform: rotate(360deg);
  }
}

.map-ui-anchor--br {
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
}

.map-ui-anchor--bl {
  left: calc(16px + env(safe-area-inset-left));
  bottom: calc(16px + env(safe-area-inset-bottom));
}

.map-ui-logo {
  line-height: 0;
}

.map-ui-anchor--tl {
  left: calc(16px + env(safe-area-inset-left));
  top: calc(12px + env(safe-area-inset-top));
}

.map-ui-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(12, 16, 30, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
}

.map-ui-lang__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em; 
  text-decoration: none; 
  text-transform: uppercase; 
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.map-ui-lang__link:hover,
.map-ui-lang__link:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.map-ui-lang__link.is-active {
  color: #0c101e;
  background: #ffffff;
}

.map-ui-anchor--tr {
  right: calc(16px + env(safe-area-inset-right));
  top: calc(16px + env(safe-area-inset-top));
}

.leaflet-pane.retour-point-pane {
  z-index: 2000 !important;
}

.map-ui-filter {
  bottom: calc(26px + env(safe-area-inset-bottom));
}

.map-ui-card .form-select {
  min-width: 160px;
}

.retour-panel-card .accordion-body {
  max-height: 60vh;
  overflow: auto;
  padding-top: 0.5rem;
}

.retour-panel-card .accordion-button {
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  box-shadow: none;
}

.retour-panel-card .accordion-button:focus {
  box-shadow: none;
}

.retour-panel-card .accordion-button::after {
  opacity: 0.6;
}

.retour-role-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
  border: 1px solid rgba(12, 16, 30, 0.25);
}

.retour-point {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  cursor: pointer;
}

.canton-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(12, 16, 30, 0.06);
  border: 1px solid rgba(12, 16, 30, 0.12);
}

.leaflet-tooltip.retour-tooltip {
  background: rgba(12, 16, 30, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 8px 10px; 
  font-size: 12px;
  line-height: 1.35; 
  min-width: 175px;
  max-width: 300px;
  white-space: normal;
  pointer-events: none;
}

.leaflet-tooltip.retour-tooltip::before {
  border-top-color: rgba(12, 16, 30, 0.9);
}

.leaflet-tooltip.retour-tooltip .retour-tooltip__commune {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.leaflet-tooltip.retour-tooltip .retour-tooltip__heading {
  font-weight: 600;
}

.leaflet-tooltip.retour-tooltip .retour-tooltip__meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.leaflet-tooltip.retour-tooltip .retour-tooltip__block + .retour-tooltip__block {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.leaflet-tooltip.installation-tooltip {
  background: rgba(255, 255, 255, 0.95);
  color: #0c101e;
  border: 1px solid rgba(12, 16, 30, 0.2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.3;
}

.leaflet-tooltip.installation-tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.95);
}

.leaflet-control-zoom {
  display: none;
}

.mask-pane svg,
.outline-pane svg {
  will-change: transform;
}

.watercourses-layer {
  filter: saturate(1.35) brightness(1.08) contrast(1.15);
}


@media (max-width: 768px) {
  .map-ui-lang {
    padding: 3px 5px;
  }

  .map-ui-lang__link {
    min-width: 28px;
    height: 26px;
    padding: 0 6px;
    font-size: 11px;
  }

  .retour-panel {
    width: min(360px, 90vw);
  }

  .map-ui-filter {
    max-width: 80vw;
  }
}

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

.leaflet-control-attribution.leaflet-control a svg {
    display: none !important;
}
