/* SVG STYLING */

.svg-infographic {
  width: 100%;
  height: 70vh;
  overflow: hidden;
}

.svg-infographic svg {
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* POP-UP STYLING */

/* Overlay container */
.svg-popup[hidden] {
  display: none;
}

.svg-popup {
  position: fixed;
  inset: 0; /* top:0, right:0, bottom:0, left:0 */
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Donkere achtergrond */
.svg-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

/* Venster */
.svg-popup__dialog {
  position: relative;
  /* breedte: volle viewportbreedte, maar max 1200px */
  width: min(100vw - 2rem, 1200px);
  max-width: 1200px;

  /* hoogte: meegroeien met content, maar niet hoger dan de viewport */
  max-height: calc(100vh - 6rem); /* laat boven/onder wat ruimte over */
  overflow-y: auto;               /* als content hoger is → intern scrollen */

  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  z-index: 1;
  box-sizing: border-box;
}


/* Titel */
.svg-popup__title {
  margin: 0 2rem 0.75rem 0;
  font-size: 1.25rem;
}

/* Afbeelding en credit*/
.svg-popup__image-wrapper {
  position: relative;
  margin-bottom: 0.75rem;
}

.svg-popup__image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Credit rechtsonder OP de foto */
.photo-credit {
  position: absolute;
  bottom: 5px;
  right: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.5rem;
  color: #f4f4f4;
  pointer-events: none;
}

/* Tekst */
.svg-popup__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Sluitknop */
.svg-popup__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: #000;
}

.svg-popup-content {
  display: none;
}

/* Legenda */

.svg-legend{
  display: flex;
  flex-wrap: wrap;              /* automatisch naar volgende regel */
  justify-content: center;       /* elke regel gecentreerd */
  gap: 10px 18px;                /* rij-gap, kolom-gap */
  margin: 16px auto 0;
  padding: 0 12px;
  max-width: 1000px;             /* optioneel, voorkomt superbrede rijen */
  font-family: "Poppins", sans-serif;
}

.svg-legend__item{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;           /* item blijft in 1 stuk, wrap gebeurt tussen items */
  font-size: 12px;
  line-height: 1.2;
}

.svg-legend__swatch{
  width: 14px;
  height: 14px;
  border-radius: 3px;            /* vierkantje met licht afgeronde hoeken */
  background: var(--swatch);
  /* border: 1px solid rgba(0,0,0,0.15); */
  display: block;
  flex: 0 0 auto;
}

.svg-legend__label{
  font-weight: 600;
  color: #333;
  line-height: 1;        /* voorkomt optische zakking */
  display: block;
}

/* Hover look */

/* Alleen echte klikbare popup-items highlighten */
.svg-infographic svg .svg-clickable {
  cursor: pointer;
}

/* Hover effect: outline + subtiele "oplicht" */
.svg-infographic svg .svg-clickable:hover > * {
  stroke: #333;
  filter: brightness(1.2);
}

/* Als iets geen stroke heeft (bv. rect), geef het er alsnog één */
.svg-infographic svg .svg-clickable:hover rect,
.svg-infographic svg .svg-clickable:hover path,
.svg-infographic svg .svg-clickable:hover polygon,
.svg-infographic svg .svg-clickable:hover circle,
.svg-infographic svg .svg-clickable:hover ellipse,
.svg-infographic svg .svg-clickable:hover line,
.svg-infographic svg .svg-clickable:hover polyline {
  stroke: #333;
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

/* Geen outline om tekst */
.svg-infographic svg .svg-clickable text {
  stroke: none !important;
  filter: none;
}