/* twinpacT Impactkaart — alles gescoped onder .ik zodat het niet botst met de site-CSS */
.ik {
  --ik-aubergine: #491844;
  --ik-geel: #ffff8c;
  --ik-lichtgeel: #ffffc4;
  --ik-lavendel: #ece8f4;
  --ik-groen: #085a46;
  --ik-mint: #ddf3e6;
  --ik-paars: #6e27d2;
  --ik-roze: #ff96dc;
  --ik-tekst: #2b1029;
  --ik-muted: #6d5a6b;
  --ik-lijn: #e4dcea;
  --ik-radius: 24px;
  --ik-kop: "Bricolage Grotesque", "Work Sans", system-ui, sans-serif;
  --ik-body: "Work Sans", system-ui, -apple-system, sans-serif;
  font-family: var(--ik-body);
  color: var(--ik-tekst);
  font-size: 16px;
  line-height: 1.5;
}
.ik *, .ik *::before, .ik *::after { box-sizing: border-box; }

/* ---------- filterbalk ---------- */
.ik-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 16px;
}
.ik-field { position: relative; flex: 1 1 200px; min-width: 0; }
.ik-field--search { flex: 2 1 260px; }
.ik-field label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.ik-input, .ik-select {
  width: 100%; height: 48px; padding: 0 44px 0 18px;
  border: 1px solid var(--ik-lijn); border-radius: 999px; background: #fff;
  font: 400 15px/1 var(--ik-body); color: var(--ik-tekst);
  appearance: none; -webkit-appearance: none; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ik-input:focus, .ik-select:focus { border-color: var(--ik-paars); box-shadow: 0 0 0 3px rgba(110, 39, 210, .15); }
.ik-select { cursor: pointer; }
.ik-select:disabled { cursor: default; color: var(--ik-muted); background: #faf8fc; }
.ik-field::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; pointer-events: none;
  border-right: 2px solid var(--ik-aubergine); border-bottom: 2px solid var(--ik-aubergine);
  transform: translateY(-70%) rotate(45deg);
}
.ik-field--search::after {
  width: 14px; height: 14px; border: 2px solid var(--ik-aubergine); border-radius: 50%;
  transform: translateY(-50%); right: 20px;
}

/* ---------- kop met telling ---------- */
.ik-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 0 0 14px; }
.ik-count { font: 700 28px/1.1 var(--ik-kop); color: var(--ik-aubergine); margin: 0; letter-spacing: -.01em; }
.ik-count em { font-style: normal; color: var(--ik-paars); }
.ik-crumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.ik-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 0; border-radius: 999px; background: var(--ik-lavendel); color: var(--ik-aubergine);
  font: 600 14px/1 var(--ik-body); cursor: pointer;
}
.ik-chip:hover { background: #ddd5ee; }
.ik-chip--reset { background: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 0 6px; }

/* ---------- kaart + lijst ---------- */
.ik-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px;
  height: 640px;
}
.ik-map {
  position: relative; border-radius: var(--ik-radius); overflow: hidden;
  background: var(--ik-lavendel); isolation: isolate; min-height: 0;
}
.ik-map .leaflet-container { width: 100%; height: 100%; background: #f6f3fa; font-family: var(--ik-body); }
.ik-list {
  border: 1px solid var(--ik-lijn); border-radius: var(--ik-radius); background: #fff;
  overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 8px;
  scrollbar-width: thin; scrollbar-color: #d6cce0 transparent;
}
.ik-item {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; padding: 10px; border: 0; border-radius: 16px; background: transparent;
  text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.ik-item:hover, .ik-item.is-active { background: var(--ik-lavendel); }
.ik-item:focus-visible { outline: 2px solid var(--ik-paars); outline-offset: -2px; }
.ik-item__name { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--ik-aubergine); }
.ik-item__meta { display: block; font-size: 13px; color: var(--ik-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ik-item__go {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ik-aubergine); text-decoration: none; font-weight: 700;
}
.ik-item__go:hover { background: var(--ik-geel); }
.ik-empty { padding: 28px 20px; text-align: center; color: var(--ik-muted); }
.ik-empty strong { display: block; font: 700 20px/1.2 var(--ik-kop); color: var(--ik-aubergine); margin-bottom: 6px; }
.ik-empty a { color: var(--ik-paars); font-weight: 600; }

/* ---------- logo-bolletje (marker + lijst) ---------- */
.ik-logo {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--ik-lavendel); display: grid; place-items: center;
  font: 700 15px/1 var(--ik-kop); color: var(--ik-aubergine);
}
.ik-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ik-pin { background: none; border: 0; }
.ik-pin .ik-logo {
  width: 40px; height: 40px; border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(73, 24, 68, .35);
  transition: transform .15s;
}
.ik-pin:hover .ik-logo, .ik-pin.is-active .ik-logo { transform: scale(1.18); border-color: var(--ik-geel); }

.ik-cluster { background: none; border: 0; }
.ik-cluster div {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: var(--ik-aubergine); color: var(--ik-geel);
  font: 700 15px/1 var(--ik-kop);
  box-shadow: 0 0 0 5px rgba(73, 24, 68, .18), 0 2px 8px rgba(73, 24, 68, .3);
  transition: transform .15s;
}
.ik-cluster:hover div { transform: scale(1.08); }

/* ---------- popup ---------- */
.ik .leaflet-popup-content-wrapper { border-radius: 20px; padding: 0; overflow: hidden; box-shadow: 0 8px 28px rgba(73, 24, 68, .25); }
.ik .leaflet-popup-content { margin: 0; width: 280px !important; font-family: var(--ik-body); }
.ik .leaflet-popup-close-button { width: 32px; height: 32px; top: 8px; right: 8px; border-radius: 50%; background: #fff; color: var(--ik-aubergine); font: 400 22px/30px var(--ik-body); }
.ik-card__img { display: block; width: 100%; height: 150px; object-fit: cover; background: var(--ik-lavendel); }
.ik-card__body { padding: 14px 18px 18px; }
.ik-card__name { margin: 0 0 4px; font: 700 18px/1.25 var(--ik-body); color: var(--ik-aubergine); }
.ik-card__tag { margin: 0 0 8px; font-size: 14px; color: var(--ik-tekst); }
.ik-card__place { margin: 0 0 12px; font-size: 13px; color: var(--ik-muted); }
.ik-card__chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; }
.ik-card__chips span { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--ik-mint); color: var(--ik-groen); }
.ik-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 44px; border-radius: 999px; background: var(--ik-geel); color: var(--ik-aubergine) !important;
  font: 700 15px/1 var(--ik-body); text-decoration: none;
}
.ik-btn:hover { background: #f5f56a; }

/* ---------- kaartvlakken ---------- */
.ik .leaflet-interactive:focus { outline: none; }
.ik .leaflet-control-zoom { border: 0; box-shadow: 0 2px 8px rgba(73, 24, 68, .2); border-radius: 14px; overflow: hidden; }
.ik .leaflet-control-zoom a { color: var(--ik-aubergine); width: 36px; height: 36px; line-height: 36px; }
.ik .leaflet-tooltip.ik-tip {
  background: var(--ik-aubergine); color: #fff; border: 0; border-radius: 999px; padding: 4px 12px;
  font: 600 13px/1.3 var(--ik-body); box-shadow: none;
}
.ik .leaflet-tooltip.ik-tip::before { display: none; }

/* ---------- mobiel ---------- */
@media (max-width: 900px) {
  .ik-body { grid-template-columns: 1fr; height: auto; }
  .ik-map { height: 62vh; min-height: 380px; }
  .ik-list { max-height: 520px; }
  .ik-count { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .ik * { transition: none !important; }
}

/* ---------- embed-modus (iframe op twinpact.nl) ---------- */
.ik-full { display: none; }
.ik--embed { box-sizing: border-box; height: 100vh; display: flex; flex-direction: column; padding: 2px; }
.ik--embed .ik-body { flex: 1; height: auto; min-height: 0; }
.ik--embed .ik-map { height: auto; min-height: 0; }
@media (max-width: 700px), (max-height: 560px) {
  .ik--embed .ik-bar, .ik--embed .ik-head, .ik--embed .ik-list { display: none; }
  .ik--embed .ik-body { grid-template-columns: 1fr; }
  .ik--embed .ik-map { border-radius: 16px; }
  .ik-full {
    display: inline-flex; align-items: center; gap: 6px; position: absolute; z-index: 1000; right: 10px; top: 10px;
    height: 36px; padding: 0 14px; border-radius: 999px; background: var(--ik-geel); color: var(--ik-aubergine);
    font: 700 13px/1 var(--ik-body); text-decoration: none; box-shadow: 0 2px 8px rgba(73, 24, 68, .25);
  }
  .ik-full__n { font-weight: 600; }
}
/* smal iframe (bv. tekstkolom op twinpact.nl): kaart vult de ruimte, lijst verborgen */
@media (max-width: 900px) {
  .ik--embed .ik-body { grid-template-columns: 1fr; height: auto; }
  .ik--embed .ik-list { display: none; }
  .ik--embed .ik-map { height: auto; min-height: 0; }
  .ik--embed .ik-count { font-size: 20px; }
  .ik--embed .ik-head { margin-bottom: 8px; }
  .ik--embed .ik-bar { margin-bottom: 10px; gap: 8px; }
  .ik--embed .ik-input, .ik--embed .ik-select { height: 40px; font-size: 14px; }
}
