/**
 * HootBox - stylesheet voor het popup-element.
 * Plugin version: 0.9.11
 *
 * Basis: het native dialog-element (top layer, focus trap, Escape, inert achtergrond) met eigen
 * lay-outs: gecentreerd, balken, hoeken, zijpanelen, volledig scherm. Alle eigen classes onder
 * .yc-hb, tokens onder --yc-hb-*. Het uiterlijk van de kaart volgt de UIkit card-stijlen van
 * het thema (uk-card-default/primary/secondary), zodat de popup bij de site past.
 *
 * Licensed under the GNU General Public License version 2 or later.
 * See LICENSE.txt for the full license text.
 */

/* ---- Design tokens ---------------------------------------------------------------------- */
.yc-hb {
    --yc-hb-width: 560px;
    --yc-hb-margin: 24px;
    --yc-hb-edge: var(--yc-hb-margin); /* effectieve randafstand; op telefoons begrensd */
    --yc-hb-radius: 8px;
    --yc-hb-duration: 300ms;
    --yc-hb-overlay: rgba(0, 0, 0, 0.6);
    --yc-hb-pad: 32px;
    --yc-hb-gap: 16px;
    --yc-hb-info: #1e87f0;
    --yc-hb-success: #32d296;
    --yc-hb-warning: #faa05a;
    --yc-hb-danger: #f0506e;
    --yc-hb-close-size: 44px;
    --yc-hb-z: 1010;
    --yc-hb-shadow-small: 0 2px 8px rgba(0, 0, 0, 0.08);
    --yc-hb-shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.12);
    --yc-hb-shadow-large: 0 14px 25px rgba(0, 0, 0, 0.18);
}

.yc-hb[hidden] { display: none !important; }

/* ---- Dialog: UA-stijlen resetten, positionering per lay-out ------------------------------ */
.yc-hb__dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    width: min(var(--yc-hb-width), calc(100% - 2 * var(--yc-hb-edge)));
    max-width: none;
    max-height: calc(100dvh - 2 * var(--yc-hb-edge));
    overflow: visible;
    z-index: var(--yc-hb-z);
}

.yc-hb__dialog:not([open]) { display: none; }

.yc-hb__dialog::backdrop {
    background: transparent;
    transition: background var(--yc-hb-duration) ease, backdrop-filter var(--yc-hb-duration) ease;
}

.yc-hb--overlay .yc-hb__dialog::backdrop { background: var(--yc-hb-overlay); }
.yc-hb--overlay.yc-hb--blur .yc-hb__dialog::backdrop { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Balken: volle breedte langs boven- of onderrand, niet-blokkerend */
.yc-hb--top .yc-hb__dialog,
.yc-hb--bottom .yc-hb__dialog {
    width: calc(100% - 2 * var(--yc-hb-edge));
    left: var(--yc-hb-edge);
    right: var(--yc-hb-edge);
    margin: 0;
}
.yc-hb--top .yc-hb__dialog { top: var(--yc-hb-edge); bottom: auto; }
.yc-hb--bottom .yc-hb__dialog { bottom: var(--yc-hb-edge); top: auto; }

/* Hoeken */
.yc-hb--top-left .yc-hb__dialog,
.yc-hb--top-right .yc-hb__dialog,
.yc-hb--bottom-left .yc-hb__dialog,
.yc-hb--bottom-right .yc-hb__dialog { margin: 0; }
.yc-hb--top-left .yc-hb__dialog { top: var(--yc-hb-edge); left: var(--yc-hb-edge); right: auto; bottom: auto; }
.yc-hb--top-right .yc-hb__dialog { top: var(--yc-hb-edge); right: var(--yc-hb-edge); left: auto; bottom: auto; }
.yc-hb--bottom-left .yc-hb__dialog { bottom: var(--yc-hb-edge); left: var(--yc-hb-edge); right: auto; top: auto; }
.yc-hb--bottom-right .yc-hb__dialog { bottom: var(--yc-hb-edge); right: var(--yc-hb-edge); left: auto; top: auto; }

/* Zijpanelen: volle hoogte */
.yc-hb--left .yc-hb__dialog,
.yc-hb--right .yc-hb__dialog {
    margin: 0;
    top: 0;
    bottom: 0;
    height: 100dvh;
    max-height: none;
    width: min(var(--yc-hb-width), 100%);
}
.yc-hb--left .yc-hb__dialog { left: 0; right: auto; }
.yc-hb--right .yc-hb__dialog { right: 0; left: auto; }
.yc-hb--left .yc-hb__box,
.yc-hb--right .yc-hb__box { height: 100%; max-height: none; border-radius: 0; }

/* Volledig scherm */
.yc-hb--fullscreen .yc-hb__dialog {
    margin: 0;
    width: 100%;
    height: 100dvh;
    max-height: none;
}
.yc-hb--fullscreen .yc-hb__box { height: 100%; max-height: none; border-radius: 0; }

/* ---- De kaart --------------------------------------------------------------------------- */
.yc-hb__box {
    position: relative;
    box-sizing: border-box;
    max-height: calc(100dvh - 2 * var(--yc-hb-edge));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: var(--yc-hb-radius);
}

/* Themastijlen (uk-card-default/primary/secondary/muted) brengen hun eigen kleuren mee;
   alleen de custom variant leest de eigen tokens. */
.yc-hb__box--custom { background: var(--yc-hb-bg, #fff); color: var(--yc-hb-color, #333); }

.yc-hb--shadow-small .yc-hb__box { box-shadow: var(--yc-hb-shadow-small); }
.yc-hb--shadow-medium .yc-hb__box { box-shadow: var(--yc-hb-shadow-medium); }
.yc-hb--shadow-large .yc-hb__box { box-shadow: var(--yc-hb-shadow-large); }

.yc-hb__inner { padding: var(--yc-hb-pad); }
.yc-hb--pad-none .yc-hb__inner { padding: 0; }
.yc-hb--pad-small .yc-hb__inner { padding: 16px; }
.yc-hb--pad-large .yc-hb__inner { padding: 48px; }

.yc-hb__inner > * + * { margin-top: var(--yc-hb-gap); }
.yc-hb__content > :last-child { margin-bottom: 0; }

/* Koppen uit de sublayout volgen de kaartkleur. Een thema met lichte koppen (donkere site) zet
   h1 tot h6 globaal wit, en UIkit kleurt in een default-kaart alleen .uk-card-title; een kop die
   de bouwer in de popup zet was daardoor wit op wit (gemeten 1:1 op yoozecase.com). :where houdt
   de specificiteit laag; een bewuste uk-text-*-kleurklasse wint dus nog steeds. */
.yc-hb .yc-hb__box :where(h1, h2, h3, h4, h5, h6, .uk-h1, .uk-h2, .uk-h3, .uk-h4, .uk-h5, .uk-h6, .uk-heading-small, .uk-heading-medium, .uk-heading-large, .uk-heading-xlarge, .uk-heading-2xlarge):not(.uk-text-primary, .uk-text-secondary, .uk-text-muted, .uk-text-emphasis, .uk-text-danger, .uk-text-success, .uk-text-warning, .uk-text-background) { color: inherit; }

/* Builder-hint bij een lege popup. Staat alleen in de customizer in de HTML (template.php),
   dus bezoekers krijgen hem nooit te zien. Opacity .75 houdt de tekst boven 4.5:1 op wit
   (bij .5 mat hij 2.77:1, en dit is juist de tekst die de weg naar de sublayout wijst). */
.yc-hb__hint {
    padding: 16px;
    border: 1px dashed currentColor;
    border-radius: 4px;
    opacity: .75;
    font-size: .9rem;
    line-height: 1.5;
}
.yc-hb--previewing .yc-hb__hint { display: none; }

/* Een sluitknop binnenin mag niet over de kop vallen */
.yc-hb--close-inside .yc-hb__alert,
.yc-hb--close-inside .yc-hb__inner > .yc-hb__content:first-child { padding-right: calc(var(--yc-hb-close-size) - 8px); }

/* ---- Alert-kop -------------------------------------------------------------------------- */
.yc-hb__alert {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.yc-hb__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: color-mix(in srgb, currentColor 12%, transparent);
}
.yc-hb__icon svg { width: 26px; height: 26px; }
.yc-hb__icon--image { border-radius: 8px; background: none; object-fit: contain; }

.yc-hb__alert--info .yc-hb__icon { color: var(--yc-hb-info); }
.yc-hb__alert--success .yc-hb__icon { color: var(--yc-hb-success); }
.yc-hb__alert--warning .yc-hb__icon { color: var(--yc-hb-warning); }
.yc-hb__alert--danger .yc-hb__icon { color: var(--yc-hb-danger); }
/* Brand: de echte themakleur via de UIkit-tekstclass (yootheme-patterns §11) */
.yc-hb__alert--brand .yc-hb__icon { color: inherit; }
.yc-hb__alert--plain .yc-hb__icon { background: none; }

.yc-hb__alert-body { min-width: 0; flex: 1 1 auto; }
.yc-hb__title { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.3; color: inherit; }
.yc-hb__message { margin: 0; }
.yc-hb__message > :last-child { margin-bottom: 0; }

/* ---- Knoppen, checkbox --------------------------------------------------------------------- */
.yc-hb__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.yc-hb__btn { min-height: 44px; }

.yc-hb__dismiss {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    cursor: pointer;
    font-size: 0.9em;
    opacity: 0.85;
}

/* ---- Sluitknop -------------------------------------------------------------------------- */
.yc-hb__close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--yc-hb-close-size);
    height: var(--yc-hb-close-size);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}
.yc-hb__close svg { width: 22px; height: 22px; }
.yc-hb__close:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.yc-hb__close[hidden] { display: none; }

.yc-hb--close-outside .yc-hb__close {
    top: calc(-1 * var(--yc-hb-close-size) - 4px);
    right: 0;
    color: #fff;
    opacity: 0.9;
}
.yc-hb--close-outside .yc-hb__box { overflow: visible; }
.yc-hb--close-outside .yc-hb__inner { max-height: calc(100dvh - 2 * var(--yc-hb-edge) - var(--yc-hb-close-size)); overflow-y: auto; }
.yc-hb--fullscreen.yc-hb--close-outside .yc-hb__close,
.yc-hb--left.yc-hb--close-outside .yc-hb__close,
.yc-hb--right.yc-hb--close-outside .yc-hb__close { top: 6px; right: 6px; color: inherit; }

/* ---- Countdown --------------------------------------------------------------------------- */
.yc-hb__countdown { position: relative; }
.yc-hb__countdown-bar {
    height: 4px;
    overflow: hidden;
    border-radius: var(--yc-hb-radius) var(--yc-hb-radius) 0 0;
    background: color-mix(in srgb, currentColor 12%, transparent);
}
.yc-hb__countdown-bar span {
    display: block;
    height: 100%;
    width: 100%;
    background: currentColor;
    opacity: 0.55;
    transform-origin: left center;
    transform: scaleX(1);
}
.yc-hb--open .yc-hb__countdown-bar span { animation: yc-hb-count var(--yc-hb-autoclose, 10s) linear forwards; }
.yc-hb--paused .yc-hb__countdown-bar span { animation-play-state: paused; }
.yc-hb__countdown-num {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.75rem;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}
.yc-hb__countdown--number .yc-hb__countdown-bar { visibility: hidden; }
.yc-hb__countdown--bar .yc-hb__countdown-num { display: none; }
.yc-hb--close-inside .yc-hb__countdown-num { right: calc(var(--yc-hb-close-size) + 8px); }

@keyframes yc-hb-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---- Animaties -------------------------------------------------------------------------- */
/* Specificiteit (0,2,0): UIkit zet op .uk-card een eigen transition-shorthand van 0.1s zonder
   opacity. Met alleen .yc-hb__box (0,1,0) wint die, en dan haalt de open-animatie haar
   eindstand niet. Zie known-issues 2026-09-07. */
.yc-hb .yc-hb__box {
    transition: transform var(--yc-hb-duration) cubic-bezier(0.2, 0.8, 0.2, 1), opacity var(--yc-hb-duration) ease;
    opacity: 1;
    transform: none;
}

/* Beginstand (in) en eindstand (uit) per animatie */
.yc-hb--anim-in-fade.yc-hb--opening .yc-hb__box { opacity: 0; }
.yc-hb--anim-in-scale.yc-hb--opening .yc-hb__box { opacity: 0; transform: scale(0.9); }
.yc-hb--anim-in-slide-top.yc-hb--opening .yc-hb__box { opacity: 0; transform: translateY(-40px); }
.yc-hb--anim-in-slide-bottom.yc-hb--opening .yc-hb__box { opacity: 0; transform: translateY(40px); }
.yc-hb--anim-in-slide-left.yc-hb--opening .yc-hb__box { opacity: 0; transform: translateX(-40px); }
.yc-hb--anim-in-slide-right.yc-hb--opening .yc-hb__box { opacity: 0; transform: translateX(40px); }

.yc-hb--anim-out-fade.yc-hb--closing .yc-hb__box { opacity: 0; }
.yc-hb--anim-out-scale.yc-hb--closing .yc-hb__box { opacity: 0; transform: scale(0.9); }
.yc-hb--anim-out-slide-top.yc-hb--closing .yc-hb__box { opacity: 0; transform: translateY(-40px); }
.yc-hb--anim-out-slide-bottom.yc-hb--closing .yc-hb__box { opacity: 0; transform: translateY(40px); }
.yc-hb--anim-out-slide-left.yc-hb--closing .yc-hb__box { opacity: 0; transform: translateX(-40px); }
.yc-hb--anim-out-slide-right.yc-hb--closing .yc-hb__box { opacity: 0; transform: translateX(40px); }

/* Zijpanelen schuiven de volle breedte */
.yc-hb--left.yc-hb--anim-in-slide-left.yc-hb--opening .yc-hb__box,
.yc-hb--left.yc-hb--anim-out-slide-left.yc-hb--closing .yc-hb__box { transform: translateX(-100%); }
.yc-hb--right.yc-hb--anim-in-slide-right.yc-hb--opening .yc-hb__box,
.yc-hb--right.yc-hb--anim-out-slide-right.yc-hb--closing .yc-hb__box { transform: translateX(100%); }

.yc-hb--opening .yc-hb__dialog::backdrop,
.yc-hb--closing .yc-hb__dialog::backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

@media (prefers-reduced-motion: reduce) {
    .yc-hb { --yc-hb-duration: 0ms; }
    .yc-hb__box, .yc-hb__dialog::backdrop { transition: none; }
}

/* ---- Scroll-blokkering ------------------------------------------------------------------ */
html.yc-hb-lock, html.yc-hb-lock body { overflow: hidden; }

/* ---- Focus ------------------------------------------------------------------------------- */
.yc-hb__close:focus-visible,
.yc-hb__btn:focus-visible,
.yc-hb__dismiss input:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.yc-hb__dialog:focus { outline: none; }
.yc-hb__dialog:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

/* ---- Schermlezer-only ------------------------------------------------------------------ */
.yc-hb__sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---- Inline in de editor ---------------------------------------------------------------- */
.yc-hb--inline .yc-hb__dialog {
    position: static;
    display: block;
    margin: 0 auto;
    width: min(var(--yc-hb-width), 100%);
    max-height: none;
    z-index: auto;
}
.yc-hb--inline.yc-hb--top .yc-hb__dialog,
.yc-hb--inline.yc-hb--bottom .yc-hb__dialog,
.yc-hb--inline.yc-hb--fullscreen .yc-hb__dialog { width: 100%; height: auto; }
.yc-hb--inline.yc-hb--left .yc-hb__dialog,
.yc-hb--inline.yc-hb--right .yc-hb__dialog { height: auto; }
.yc-hb--inline .yc-hb__box { max-height: none; height: auto; overflow: visible; }
.yc-hb--inline.yc-hb--close-outside .yc-hb__close { top: 6px; right: 6px; color: inherit; }
.yc-hb--inline .yc-hb__countdown-bar span { animation: none; }

.yc-hb__badge {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    margin: 0 auto 10px;
    padding: 8px 12px;
    max-width: var(--yc-hb-width);
    border: 1px dashed currentColor; /* volgt de tekstkleur: zichtbaar op lichte en donkere secties */
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0.85;
}
.yc-hb__badge-warn { color: #b3261e; font-weight: 600; }
.yc-hb__badge-btn {
    margin-left: auto;
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.yc-hb__badge-btn:hover { background: rgba(127, 127, 127, 0.15); }
.yc-hb__badge-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.yc-hb--previewing .yc-hb__badge { display: none; }
.yc-hb--inline.yc-hb--top .yc-hb__badge,
.yc-hb--inline.yc-hb--bottom .yc-hb__badge,
.yc-hb--inline.yc-hb--fullscreen .yc-hb__badge { max-width: none; }

/* ---- Apparaten en telefoon-lay-out ------------------------------------------------------ */
@media (min-width: 960px) {
    .yc-hb--devices-mobile:not(.yc-hb--inline) { display: none !important; }
}
@media (max-width: 959px) {
    .yc-hb--devices-desktop:not(.yc-hb--inline) { display: none !important; }
}

@media (max-width: 639px) {
    .yc-hb { --yc-hb-pad: 20px; }
    .yc-hb:not(.yc-hb--inline) { --yc-hb-edge: min(var(--yc-hb-margin), 12px); }
    .yc-hb--pad-large .yc-hb__inner { padding: 28px; }
    .yc-hb__title { font-size: 1.15rem; }
    .yc-hb__icon { width: 40px; height: 40px; }
    .yc-hb__icon svg { width: 22px; height: 22px; }
    .yc-hb__actions .yc-hb__btn { flex: 1 1 auto; text-align: center; }

    .yc-hb--mobile-hidden:not(.yc-hb--inline) { display: none !important; }

    /* Telefoon: als onderbalk (Google-richtlijn tegen blokkerende interstitials) */
    .yc-hb--mobile-bottom:not(.yc-hb--inline) .yc-hb__dialog {
        inset: auto var(--yc-hb-edge) var(--yc-hb-edge) var(--yc-hb-edge);
        width: calc(100% - 2 * var(--yc-hb-edge));
        height: auto;
        margin: 0;
    }
    .yc-hb--mobile-bottom:not(.yc-hb--inline) .yc-hb__box { max-height: 60dvh; height: auto; border-radius: var(--yc-hb-radius); }
    .yc-hb--mobile-bottom:not(.yc-hb--inline) .yc-hb__dialog::backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

    .yc-hb--mobile-fullscreen:not(.yc-hb--inline) .yc-hb__dialog {
        inset: 0;
        width: 100%;
        height: 100dvh;
        max-height: none;
        margin: 0;
    }
    .yc-hb--mobile-fullscreen:not(.yc-hb--inline) .yc-hb__box { height: 100%; max-height: none; border-radius: 0; }
    .yc-hb--close-outside:not(.yc-hb--inline) .yc-hb__close { top: 6px; right: 6px; color: inherit; }
    .yc-hb--close-outside .yc-hb__inner { max-height: none; }
}

@media (max-width: 419px) {
    .yc-hb { --yc-hb-pad: 16px; }
    .yc-hb__alert { gap: 10px; }
}
