/* =============================================================
   WP Locatietool Pro — frontend.css  v4.8.31
   Volledig herschreven — geen duplicaten, geen !important cascade
   ============================================================= */

/* ── CSS variabelen (overschreven via wp_head vanuit PHP settings) ── */
:root {
  --wplp-cluster-color: #147d81;
  --wplp-cluster-size:  52px;
  --wplp-cluster-pulse: 8;
  --wplp-item-bg:       rgba(20,125,129,.04);
  --wplp-divider-display:   none;
  --wplp-divider-width:     80%;
  --wplp-divider-thickness: 1px;
  --wplp-divider-color:     #d7dde2;
}

/* ══════════════════════════════════════════════════════════════
   1. LAYOUT
   ══════════════════════════════════════════════════════════════ */

.wplp-full-wrap {
  max-width: 1760px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}
.wplp-full-grid {
  display: grid;
  grid-template-columns: minmax(380px,520px) minmax(760px,1fr);
  gap: 24px;
  align-items: start;
  justify-content: center;
}
.wplp-topfilters {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid #dbe0e5;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wplp-panel,
.wplp-map-card {
  background: #fff;
  border: 1px solid #dbe0e5;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,.05);
}
.wplp-panel {
  height: 760px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.wplp-map-card {
  min-width: 0;
  padding: 8px;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.wplp-map-canvas {
  overflow: hidden;
  min-height: 760px;
  background: #f5f5f5;
}

@media (max-width: 1400px) {
  .wplp-full-wrap { max-width: 1660px; }
  .wplp-full-grid { grid-template-columns: minmax(360px,500px) minmax(620px,1fr); }
}
@media (max-width: 980px) {
  .wplp-full-wrap  { padding: 0 12px; width: min(100vw, calc(100vw - 24px)); }
  .wplp-full-grid  { grid-template-columns: 1fr; }
  .wplp-panel      { height: auto; }
  .wplp-list       { max-height: 420px; }
  .wplp-filter-group { display: block; }
  .wplp-filter-label { min-width: 0; padding-top: 0; margin-bottom: 6px; }
  .wplp-map-canvas { min-height: 520px; }
}

/* ══════════════════════════════════════════════════════════════
   2. FILTERBAR
   ══════════════════════════════════════════════════════════════ */

.wplp-filter-group  { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.wplp-filter-label  { font-size: 13px; font-weight: 700; color: #5b6b74; min-width: 72px; padding-top: 9px; }
.wplp-filter-chips  { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }

.wplp-chip {
  appearance: none;
  border: 1px solid #d1d9df;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.wplp-chip:hover,
.wplp-chip.is-active {
  background: var(--wplp-cluster-color);
  border-color: var(--wplp-cluster-color);
  color: #fff;
}

.wplp-taxonomy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-height: 40px;
  overflow: hidden;
}
.wplp-taxonomy-row.expanded { max-height: none; }

.wplp-taxonomy-more {
  appearance: none;
  border: 1px solid #d1d9df;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--wplp-cluster-color);
  margin-left: 84px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .2s ease, background .2s ease;
}
.wplp-taxonomy-more:hover        { border-color: var(--wplp-cluster-color); background: #f3fbfb; }
.wplp-taxonomy-more.is-hidden    { display: none; }
.wplp-taxonomy-more-label        { line-height: 1; }
.wplp-taxonomy-arrow             { display: inline-block; font-size: 12px; transition: transform .2s ease; }
.wplp-taxonomy-more.is-open .wplp-taxonomy-arrow { transform: rotate(180deg); }

/* ══════════════════════════════════════════════════════════════
   3. LOCATIELIJST
   ══════════════════════════════════════════════════════════════ */

.wplp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.wplp-panel-head h3 { margin: 0; font-size: 22px; line-height: 1.2; }

.wplp-reset {
  appearance: none;
  border: 1px solid var(--wplp-cluster-color);
  background: #fff;
  color: var(--wplp-cluster-color);
  border-radius: 14px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s ease, color .2s ease;
}
.wplp-reset:hover { background: var(--wplp-cluster-color); color: #fff; }

.wplp-search-row { margin-bottom: 10px; }
.wplp-search {
  width: 100%;
  border: 1px solid #d1d9df;
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  box-sizing: border-box !important; /* override theme box-sizing: content-box op input[type=search] */
  -webkit-appearance: none;
}

.wplp-list-wrap { position: relative; flex: 1 1 auto; min-height: 0; margin-top: 2px; }
.wplp-scroll-hint { display: none; }
.wplp-list-wrap.has-overflow .wplp-scroll-hint { opacity: .85; }

.wplp-list {
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: #8aa7ab #edf2f3;
}
.wplp-list::-webkit-scrollbar       { width: 12px; }
.wplp-list::-webkit-scrollbar-track { background: #edf2f3; border-radius: 999px; }
.wplp-list::-webkit-scrollbar-thumb { background: #8aa7ab; border-radius: 999px; border: 2px solid #edf2f3; }

.wplp-item {
  position: relative;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--wplp-item-bg);
  transition: background .2s ease;
}
.wplp-item:hover,
.wplp-item.is-active { background: rgba(20,125,129,.07); }

/* Optioneel scheidingslijntje */
.wplp-item + .wplp-item::before {
  content: '';
  display: var(--wplp-divider-display);
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--wplp-divider-width);
  height: var(--wplp-divider-thickness);
  background: var(--wplp-divider-color);
  border-radius: 999px;
}

.wplp-item-title {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  color: #111827;
  margin-bottom: 3px;
  line-height: 1.2;
}
.wplp-item-title:hover { color: var(--wplp-cluster-color); }

.wplp-item-text    { line-height: 1.3; margin-top: 2px; }
.wplp-item-actions { margin-top: 6px; }
.wplp-item-meta    { color: #5b6b74; font-size: 13px; margin-top: 6px; line-height: 1.22; }

.wplp-item-preview {
  color: #6b7280;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

.wplp-more-toggle {
  appearance: none;
  border: 0;
  background: none;
  color: var(--wplp-cluster-color);
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  margin-top: 4px;
}

.wplp-item-more { display: none; margin-top: 10px; }
.wplp-item.is-expanded .wplp-item-more    { display: block; }
.wplp-item.is-expanded .wplp-item-preview { display: none; }

.wplp-detail-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--wplp-cluster-color);
  text-decoration: none;
  font-weight: 600;
}
.wplp-detail-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════
   4. CLUSTER MARKERS
   ══════════════════════════════════════════════════════════════ */

.wplp-cluster-icon {
  background: transparent;
  border: none;
  border-radius: 999px;
}
.wplp-cluster-bubble-img,
.wplp-google-cluster-img {
  display: block;
  width: var(--wplp-cluster-size);
  height: var(--wplp-cluster-size);
  transform-origin: center center;
  animation: wplpClusterAmbient 2.4s ease-in-out infinite;
}
.wplp-cluster-icon:hover .wplp-cluster-bubble-img,
.wplp-cluster-icon.is-animated .wplp-cluster-bubble-img,
.wplp-google-cluster-img:hover,
.wplp-google-cluster-img.is-animated {
  animation: wplpClusterHover 1.1s ease-in-out infinite;
}

@keyframes wplpClusterAmbient {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(20,125,129,0)); }
  50%     { transform: scale(calc(1 + var(--wplp-cluster-pulse) / 220));
            filter: drop-shadow(0 0 6px rgba(20,125,129,.14)); }
}
@keyframes wplpClusterHover {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(20,125,129,0)); }
  50%     { transform: scale(calc(1 + var(--wplp-cluster-pulse) / 110));
            filter: drop-shadow(0 0 12px rgba(20,125,129,.30)); }
}

/* ══════════════════════════════════════════════════════════════
   5. POPUP
   
   HTML-structuur (frontend.js):
     .wplp-popup-shell.has-image / .no-image  (overflow: visible)
       <button .wplp-popup-close>             (absolute, 3/4 buiten rechterbovenhoek)
       <div .wplp-popup-image>                (overflow: hidden voor border-radius)
         <img>
       <div .wplp-popup-body>
   ══════════════════════════════════════════════════════════════ */

/* Leaflet wrapper — overflow visible zodat close-knop buiten valt */
.leaflet-popup,
.leaflet-popup-content-wrapper,
.leaflet-popup-content { overflow: visible; }

.leaflet-popup-content-wrapper {
  padding: 0;
  border: none;
  outline: none;
  border-radius: 18px;
  box-shadow: none;
  background: transparent;
}
.leaflet-popup-content {
  margin: 0;
  padding: 0;
  width: 260px;
  min-width: 260px;
  background: transparent;
}

/* Google wrapper — overflow visible */
.gm-style .gm-style-iw-c,
.gm-style .gm-style-iw,
.gm-style .gm-style-iw-d,
.gm-style .gm-style-iw-chr { overflow: visible; }

.gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  background: transparent !important;
  max-width: none !important;
}
/* gm-style-iw-chr is de wrapper om de native close button — leegmaken */
.gm-style .gm-style-iw-chr {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
.gm-style .gm-style-iw-d {
  padding: 0 !important;
  overflow: visible !important;
  width: 260px;
  max-width: 260px;
}
/* Verberg de InfoWindow staart/pijl */
.gm-style .gm-style-iw-tc,
.gm-style .gm-style-iw-tc::after { display: none !important; }

/* Verberg native sluitknoppen */
.leaflet-container a.leaflet-popup-close-button,
.gm-style .gm-ui-hover-effect { opacity: 0; pointer-events: none; }

/* Geen focus-outlines op popup-elementen */
.leaflet-popup-content-wrapper:focus,
.leaflet-popup-content-wrapper *:focus,
.gm-style .gm-style-iw-c:focus,
.gm-style .gm-style-iw-c *:focus,
.gm-style .gm-style-iw-d:focus,
.wplp-popup-shell:focus,
.wplp-popup-shell *:focus,
.wplp-popup-close:focus,
.wplp-popup-close:focus-visible,
.wplp-popup-detail-link:focus,
.wplp-popup-detail-link:focus-visible { outline: none; box-shadow: none; }

.leaflet-popup-content-wrapper,
.wplp-popup-shell,
.wplp-popup-shell * { -webkit-tap-highlight-color: transparent; }

/* Shell — overflow visible zodat close-knop buiten valt */
.wplp-popup-shell {
  position: relative;
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15,23,42,.16);
  overflow: visible;
}

/* Close button — middelpunt op rechterbovenhoek, 3/4 buiten popup */
.wplp-popup-close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  transform-origin: center center;
  transition: transform 0.22s ease;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  margin: 0;
  background: var(--wplp-cluster-color);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  cursor: pointer;
  z-index: 10000;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.wplp-popup-close::before,
.wplp-popup-close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2.5px;
  background: #fff;
  border-radius: 999px;
  transform-origin: center center;
}
.wplp-popup-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.wplp-popup-close::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.wplp-popup-close:hover   { transform: translate(50%,-50%) rotate(90deg); }

/* Afbeelding — overflow hidden hier voor border-radius, NIET op shell */
.wplp-popup-image {
  display: block;
  width: 100%;
  height: 125px;
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #e5e7eb;
  box-sizing: border-box;
}
.wplp-popup-image img {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 125px;
  min-height: 125px;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

/* Body */
.wplp-popup-body {
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px 16px;
  background: #fff;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
}
.wplp-popup-shell.no-image .wplp-popup-body { border-radius: 18px; }

.wplp-popup-title { font-size: 16px; font-weight: 700; line-height: 1.25; color: #0f172a; }
.wplp-popup-text  { margin-top: 8px; font-size: 14px; line-height: 1.45; color: #374151; }
.wplp-popup-linkwrap { margin-top: 12px; }

.wplp-popup-detail-link { color: var(--wplp-cluster-color); font-weight: 700; text-decoration: none; outline: none; }
.wplp-popup-detail-link:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .leaflet-popup-content,
  .gm-style .gm-style-iw-d,
  .wplp-popup-shell {
    width: calc(100vw - 64px);
    min-width: calc(100vw - 64px);
    max-width: calc(100vw - 64px);
  }
}

/* ══════════════════════════════════════════════════════════════
   6. DETAILPAGINA (single-location template)
   ══════════════════════════════════════════════════════════════ */

.wplp-single-wrap  { width: min(1100px,calc(100vw - 48px)); margin: 48px auto; padding: 0 24px; box-sizing: border-box; }
.wplp-single-card  { background: #fff; border: 1px solid #dbe0e5; border-radius: 24px; padding: 28px; box-shadow: 0 8px 28px rgba(0,0,0,.05); }
.wplp-single-back  { display: inline-block; margin-bottom: 18px; color: var(--wplp-cluster-color); text-decoration: none; font-weight: 600; }
.wplp-single-title { margin: 0 0 24px; }
.wplp-single-specs { background: #f3f7f8; border: 1px solid #dbe0e5; border-radius: 18px; padding: 18px 20px; margin-bottom: 24px; }
.wplp-single-specs-row { margin-bottom: 8px; color: #374151; }
.wplp-single-specs-row:last-child { margin-bottom: 0; }
.wplp-single-content { line-height: 1.7; color: #1f2937; }
.wplp-single-content img { max-width: 100%; height: auto; border-radius: 16px; }

/* ══════════════════════════════════════════════════════════════
   7. ADMIN HELPERS
   ══════════════════════════════════════════════════════════════ */
.wplp-toggle-row { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
