/* Schoolkaart: interactieve werkgebiedkaart
   Kleuren en lettertypes zijn aan te passen via de custom properties hieronder. */
.schoolkaart {
  --sk-navy: #29265b;
  --sk-orange: #f39208;
  --sk-active: #7a6cc4;
  --sk-radius: 24px;
  --sk-font-title: inherit;
  --sk-font-body: inherit;
  position: relative;
  container-type: inline-size;
  color: var(--sk-navy);
}
.schoolkaart__map svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Klikbare schoolgroepen */
.schoolkaart .sk-school { cursor: pointer; outline: none; }
.schoolkaart .sk-hit { fill: transparent; pointer-events: all; cursor: pointer; }
.schoolkaart .sk-school .sk-label { transition: fill .15s ease; }
.schoolkaart .sk-school.is-hover .sk-label,
.schoolkaart .sk-school:focus-visible .sk-label { fill: var(--sk-orange); }
.schoolkaart .sk-school.is-active .sk-label { fill: var(--sk-active); }
.schoolkaart .sk-hit.is-focus {
  stroke: var(--sk-orange);
  stroke-width: .6;
}
/* Handig tijdens het testen: voeg class "sk-debug" toe aan .schoolkaart */
.schoolkaart.sk-debug .sk-hit {
  fill: rgba(243, 146, 8, .16);
  stroke: var(--sk-orange);
  stroke-width: .4;
  stroke-dasharray: 1.2 1;
}

/* Pop-up */
.schoolkaart__popup {
  position: absolute;
  top: 0;
  left: 0;
  width: min(430px, 48%);
  max-height: 100%;
  overflow: auto;
  box-sizing: border-box;
  padding: clamp(16px, 3cqi, 40px);
  background: #fff;
  border-radius: var(--sk-radius);
  box-shadow: 0 12px 40px rgba(41, 38, 91, .14);
  z-index: 5;
}
.schoolkaart__popup[hidden] { display: none; }
.schoolkaart__popup:not([hidden]) { animation: sk-in .18s ease-out; }
@keyframes sk-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .schoolkaart__popup:not([hidden]) { animation: none; }
  .schoolkaart .sk-school .sk-label { transition: none; }
}
.sk-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--sk-navy);
  cursor: pointer;
}
.sk-popup__close:hover { background: #f1f2fa; }
.sk-popup__close:focus-visible,
.sk-popup__actions a:focus-visible { outline: 2px solid var(--sk-orange); outline-offset: 2px; }
.sk-popup__photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: calc(var(--sk-radius) * .75);
  margin: 24px 0 18px;
}
.sk-popup__title {
  margin: 0 0 6px;
  font-family: var(--sk-font-title);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4cqi, 1.6rem);
  line-height: 1.15;
  color: var(--sk-navy);
  padding-right: 36px;
}
.sk-popup__photo + .sk-popup__title { padding-right: 0; }
.sk-popup__address {
  font-family: var(--sk-font-body);
  font-size: 1rem;
  line-height: 1.45;
}
.sk-popup__address p { margin: 0; padding: 0; }
.sk-popup__actions {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}
.sk-popup__actions a {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--sk-orange);
  border-radius: 8px;
  color: var(--sk-orange);
  background: #fff;
  transition: background .15s ease, color .15s ease;
}
.sk-popup__actions a:hover { background: var(--sk-orange); color: #fff; }
.sk-popup__actions svg { width: 26px; height: 26px; }

/* Smalle containers: pop-up onder de kaart in plaats van eroverheen */
@container (max-width: 640px) {
  .schoolkaart__popup {
    position: relative;
    width: auto;
    max-height: none;
    margin-top: 12px;
    box-shadow: 0 6px 24px rgba(41, 38, 91, .12);
  }
  .sk-popup__photo { margin-top: 20px; }
}
