/* Onderdelen (inc/parts.php): alleen de vaste werking. De vormgeving zit in het blok zelf;
   een blok mag de wrapper stylen via .spb-header--<slug>, .spb-mega--<slug> en .spb-popup--<slug>. */
.spb-header { position: relative; z-index: 50; }
.spb-header--sticky { position: sticky; top: 0; }
.admin-bar .spb-header--sticky { top: var(--wp-admin--admin-bar--height, 0px); }

.spb-mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; max-height: calc(100dvh - 100%); overflow: auto; }
.spb-mega[hidden] { display: none; }

.spb-popup { border: 0; padding: 0; margin: auto; background: transparent; color: inherit; width: fit-content; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; }
.spb-popup::backdrop { background: rgb(0 0 0 / .55); }
.spb-popup__close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--c-surface, #fff); color: var(--c-ink, #111); cursor: pointer; box-shadow: 0 1px 4px rgb(0 0 0 / .18); }
.spb-popup__close::before, .spb-popup__close::after { content: ""; position: absolute; left: 12px; top: 19px; width: 16px; height: 2px; background: currentColor; transform: rotate(45deg); }
.spb-popup__close::after { transform: rotate(-45deg); }
.spb-popup__close:focus-visible { outline: 2px solid var(--c-primary, #000); outline-offset: 2px; }
html.spb-lock { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
	.spb-popup[open] { animation: spb-popup-in .18s ease-out; }
	@keyframes spb-popup-in { from { opacity: 0; transform: translateY(8px); } }
}
