/*
  MSV onepager · alleen toestanden en onderdelen die native Elementor niet kan opmaken.
  De gewone opmaak (kleuren, maten, typografie) staat in de editor: Global Variables en globale klassen.
*/

/* Vaste header en rustig scrollen naar ankers */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
.elementor-location-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .elementor-location-header { top: 32px; }
html:has(body.admin-bar) { scroll-padding-top: 128px; }
::selection { background: #CDBFAD; color: #293237; }
input, textarea { caret-color: #2C4656; }

/* Diashow */
.diashow-hoofd[data-vorm="breed"] .diashow-beeld,
.diashow-hoofd[data-vorm="staand"] .diashow-beeld { object-fit: contain; }
.diashow-pijl svg, .diashow-pauze svg { display: block; }
.diashow-duim:hover .diashow-duim-beeld { opacity: .85; }
.diashow-duim[aria-pressed="true"] .diashow-duim-beeld { opacity: 1; outline: 3px solid #4C6676; outline-offset: -3px; }
.diashow-hoek .diashow-duim[aria-pressed="true"] .diashow-duim-beeld { outline-color: #5E7752; }

/* Lightbox */
.msv-lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.msv-lightbox::backdrop { background: rgba(20, 26, 30, .92); }
.msv-lightbox__binnen { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 72px 84px; box-sizing: border-box; }
.msv-lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; }
.msv-lightbox button { position: absolute; display: grid; place-items: center; padding: 0; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.msv-lightbox button:focus { background: rgba(255, 255, 255, .12); color: #fff; }
.msv-lightbox button:hover { background: rgba(255, 255, 255, .24); }
.msv-lightbox__sluit { top: 16px; right: 16px; }
.msv-lightbox__vorige { left: 16px; top: 50%; transform: translateY(-50%); }
.msv-lightbox__volgende { right: 16px; top: 50%; transform: translateY(-50%); }
.msv-lightbox__teller { position: absolute; bottom: 14px; left: 72px; right: 72px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: #fff; font-size: .875rem; }
.msv-lightbox__bijschrift { font-weight: 600; font-size: .9375rem; }
.msv-lightbox__bijschrift:empty { display: none; }

/* Kavelkaart (situatietekening met klikvlakken) */
.kavelkaart .kk-svg { display: block; width: 100%; height: auto; }
.kk-straat { font-family: "Montserrat", sans-serif; font-size: 46px; fill: #6B6660; }
.kk-kavel { cursor: pointer; }
.kk-kavel path { fill: rgba(76, 102, 118, .22); stroke: #4C6676; stroke-width: 4; stroke-opacity: .9; transition: fill .4s ease, stroke-width .2s ease; }
.kk-kavel--hoek path { fill: rgba(94, 119, 82, .26); stroke: #5E7752; }
.kk-kavel:hover path { fill: rgba(76, 102, 118, .36); }
.kk-kavel--hoek:hover path { fill: rgba(94, 119, 82, .4); }
.kk-kavel.is-aangewezen path { fill: rgba(76, 102, 118, .42); stroke-width: 6; }
.kk-kavel--hoek.is-aangewezen path { fill: rgba(94, 119, 82, .46); }
.kk-kavel.is-gekozen path { fill: rgba(76, 102, 118, .62); stroke: #2C4656; stroke-width: 9; stroke-opacity: 1; }
.kk-kavel--hoek.is-gekozen path { fill: rgba(94, 119, 82, .66); stroke: #3F5236; }
.kk-kavel.is-verkocht { cursor: not-allowed; }
.kk-kavel.is-verkocht path { fill: rgba(120, 120, 120, .45); stroke: #8A8178; }

/* Kavellijst: gekozen en aangewezen */
.kavel-optie:has(input:checked) { border-color: #4C6676; background-color: #EEF2F4; }
.kavel-optie.is-hoek:has(input:checked) { border-color: #5E7752; background-color: #EEF2EA; }
.kavel-optie.is-aangewezen { border-color: #4C6676; background-color: #F2F5F7; }
.kavel-optie.is-hoek.is-aangewezen { border-color: #5E7752; background-color: #F2F5EF; }

/* Foutmeldingen */
.msv-fout { color: #A3322A; font-size: .875rem; line-height: 1.4; margin: 0; }
.msv-fout--kavel:not(:empty) { margin: -8px 0 16px; font-weight: 600; }
.veld-invoer[aria-invalid="true"] { border-color: #A3322A; }
.biljet-samenvatting.is-fout { color: #A3322A; }

/* Bevestiging */
.biljet-formulier.form-state-success .biljet-velden { display: none; }
.bedankt-vink svg { width: 72px; height: 72px; display: block; }
.bedankt__cirkel { fill: #5E7752; }
.bedankt__haak { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 0; }
.form-state-success .bedankt__haak { animation: msv-vink .6s .15s ease-out both; }
@keyframes msv-vink { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
.bedankt__chip { display: inline-flex; align-items: baseline; gap: 8px; background: #4C6676; color: #fff; padding: 8px 12px; font-size: .875rem; }
.bedankt__chip b { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.125rem; }
.bedankt__chip--hoek { background: #5E7752; }

/* Tijdlijn: lopende fase */
.fase.is-nu .fase-stip { background-color: #2C4656; outline: 6px solid rgba(44, 70, 86, .16); }
.fase.is-voorbij .fase-stip { background-color: #4C6676; border-color: #4C6676; }
.fase.is-voorbij .fase-titel, .fase.is-voorbij p:not(.fase-status) { opacity: .72; }
.fase.is-nu .fase-status, .fase.is-binnenkort .fase-status { display: inline-flex; }
.fase-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.fase.is-binnenkort .fase-status { color: #4C6676; }

/* Ingelogd: de WordPress-balk is 32 px hoog, tot 782 px breed 46 px, en scrolt onder 600 px mee (header dan tegen de bovenkant) */
@media (max-width: 782px) {
  .admin-bar .elementor-location-header { top: 46px; }
  html:has(body.admin-bar) { scroll-padding-top: 142px; }
}
@media (max-width: 767px) {
  html { scroll-padding-top: 76px; }
  html:has(body.admin-bar) { scroll-padding-top: 122px; }
  .msv-lightbox__binnen { padding: 64px 8px 96px; }
}
@media (max-width: 600px) {
  .admin-bar .elementor-location-header { top: 0; }
  html:has(body.admin-bar) { scroll-padding-top: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .form-state-success .bedankt__haak { animation: none; }
  .diashow-beeld { transition: none; }
}
