/*
 * WEBGLOBE MAINTAINER NOTES
 *
 * Style the public button depth interface and its responsive presentation.
 *
 * The selectors form a contract with the rendered markup and browser interactions. Preserve
 * keyboard focus, disabled/hidden states and the smaller-screen rules when adjusting the
 * cascade; an attractive desktop layout is not sufficient evidence of usable mobile forms.
 */
/* Shared lime-to-silver finish for public primary actions.
   Keep clipping on decorative layers so text, focus and loading states stay intact. */
body.public-site {
    --public-action-fill: linear-gradient(108deg, #d5ff49 0%, #cfff32 21%, #c7d3b6 100%);
    --public-action-edge: #d8e5bc;
}

body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn) {
    --public-action-cut: clamp(16px, 1.35em, 24px);
    position: relative;
    isolation: isolate;
    border-color: transparent !important;
    border-radius: 10px;
    color: #10212d;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none;
    text-shadow: none;
    transition: filter 160ms ease;
}

body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn)::before,
body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn)::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    border-radius: inherit;
    background: var(--public-action-edge);
    clip-path: polygon(0 0, calc(100% - var(--public-action-cut)) 0, 100% var(--public-action-cut), 100% 100%, 0 100%);
    pointer-events: none;
}

body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn)::after {
    inset: 1.5px;
    z-index: -1;
    border-radius: 8.5px;
    background: var(--public-action-fill);
    clip-path: polygon(0 0, calc(100% - var(--public-action-cut) + 1px) 0, 100% calc(var(--public-action-cut) - 1px), 100% 100%, 0 100%);
}

body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn):is(:hover, :active) {
    color: #10212d;
    box-shadow: none;
    text-shadow: none;
    transform: none;
}

@media (hover: hover) {
    body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn):hover:not(:disabled):not([aria-disabled="true"]) {
        filter: brightness(1.05);
    }
}

body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn):active:not(:disabled):not([aria-disabled="true"]) {
    filter: brightness(0.94);
}

/* Alleen taal en het mobiele menu behouden de 3D-bediening.
   De publieke scope houdt de webshop en het beheer apart. */
body.public-site :is(.main-nav__toggle, .toggle-switch) {
    --button-depth: 3px;
    --button-side: #142a3d;
    --button-edge: rgba(167, 207, 226, 0.4);
    --button-shadow: rgba(0, 8, 18, 0.32);
    --button-finish: linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 55%, rgba(10, 24, 0, 0.08));
    border: 1px solid var(--button-edge) !important;
    border-radius: 10px;
    background-image: var(--button-finish) !important;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.56),
        inset 0 -2px 0 rgba(19, 34, 0, 0.16),
        inset 1px 0 0 rgba(255, 255, 255, 0.22),
        0 var(--button-depth) 0 var(--button-side),
        0 calc(var(--button-depth) + 5px) 16px var(--button-shadow) !important;
    text-shadow: none;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

body.public-site .toggle-switch {
    border-radius: 999px;
}

@media (hover: hover) {
    body.public-site :is(.main-nav__toggle, .toggle-switch):not(:disabled):not([aria-disabled="true"]):hover {
        background-image: var(--button-finish) !important;
        transform: translateY(-2px);
        filter: brightness(1.05);
    }
}

/* De knop zakt bij indrukken in zijn onderrand. Focus blijft afzonderlijk zichtbaar. */
body.public-site :is(.main-nav__toggle, .toggle-switch):not(:disabled):not([aria-disabled="true"]):active {
    --button-depth: 1px;
    transform: translateY(3px);
}

body.public-site :is(button, input[type="submit"], input[type="button"], input[type="reset"], a.btn, .btn-card, .help-button, .tour-cta, .footer-nav-action, .main-nav__link, .toggle-switch, .footer-icon):focus-visible {
    outline: 3px solid var(--public-cyan);
    outline-offset: 7px;
}

body.public-site.page-home header > .hero-actions .hero-demo-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

body.public-site :is(.main-nav, footer) :focus-visible {
    outline-color: #83eaff;
}

body.public-site :is(button, input, a.btn, .help-button, .tour-cta):is(:disabled, [aria-disabled="true"]) {
    opacity: 0.55;
    filter: grayscale(0.5);
    transform: none;
    cursor: not-allowed;
}

body.public-site :is(.main-nav__toggle, .toggle-switch):is(:disabled, [aria-disabled="true"]) {
    --button-depth: 1px;
}

@media (prefers-reduced-motion: reduce) {
    body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn) {
        transition: none;
    }

    body.public-site :is(button, input, a.btn, .btn-card, .help-button, .tour-cta, .footer-nav-action, .main-nav__link, .toggle-switch, .footer-icon) {
        transition: none;
    }

    body.public-site :is(button, input, a.btn, .btn-card, .help-button, .tour-cta, .footer-nav-action, .main-nav__link, .toggle-switch, .footer-icon):is(:hover, :active) {
        transform: none !important;
    }
}

@media (forced-colors: active) {
    body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn) {
        color: ButtonText;
        background: Canvas !important;
        border: 1px solid ButtonText !important;
        filter: none;
    }

    body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn)::before,
    body.public-site :is(.btn:not(.btn-secondary):not(.error-page-secondary-btn):not(.hero-action-primary):not(.hero-demo-link), .btn-card, .help-button--primary, .demo-tour-primary, .consent-btn, .close-overlay-btn)::after {
        display: none;
    }

    body.public-site :is(.main-nav__toggle, .toggle-switch) {
        --button-finish: none;
    }

    body.public-site :is(button, input, a.btn, .btn-card, .help-button, .tour-cta, .footer-nav-action, .main-nav__link, .toggle-switch, .footer-icon) {
        border-color: ButtonText !important;
        background-image: none !important;
        box-shadow: none !important;
        filter: none;
    }
}
