/* ===========================
   Labels & helpers
   =========================== */
label.form-label,
label.small-label {
    font-size: clamp(0.85rem,2vw,1rem);
    margin-bottom: .10rem;
}

.form-label-responsive {
    font-size: clamp(0.9rem,1.5vw,1rem);
}

.uppercase-input {
    text-transform: uppercase;
}

.lowercase-input {
    text-transform: lowercase;
}

/* ===========================
   Checkbox groups
   =========================== */
.form-check-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-check-vertical {
    flex-direction: column;
    gap: .25rem;
    padding-left: 1rem;
}

.form-check-input {
    border: 1px solid #666;
    cursor: pointer;
}

    .form-check-input:checked {
        background-color: #FE6803;
        border-color: #FE6803;
    }

.form-check-label {
    cursor: pointer;
}

/* ===========================
   Phone field
   =========================== */
.form-phone-field .dropdown-toggle {
    font-size: .875rem;
    padding: .375rem .5rem;
    line-height: 1.2;
    min-width: 80px;
}

.form-phone-field img {
    display: inline-block;
    vertical-align: middle;
}

.form-phone-field input.form-control {
    min-width: 0;
}

.form-phone-field .dropdown-menu .dropdown-item {
    font-size: .875rem;
    padding: .35rem .75rem;
}

/* ===========================
   Flags in <select>
   =========================== */
select.form-country-select option {
    background-repeat: no-repeat;
    background-size: 20px 14px;
    padding-left: 26px;
}

/* ===========================
   Home buttons
   =========================== */
.home-button {
    margin: 1rem 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: transform .2s ease, box-shadow .2s ease;
    font-weight: 500;
    border: none;
    padding: 1rem 1.25rem;
    border-radius: 1.3rem;
    font-size: 1.1rem;
    box-shadow: inset 0 0 0 rgba(255,255,255,.2), 0 4px 6px rgba(0,0,0,.1);
    background-blend-mode: overlay;
    color: #fff;
}

    .home-button:hover {
        transform: scale(1.03);
        box-shadow: 0 6px 12px rgba(0,0,0,.15);
        filter: brightness(1.1);
        background: linear-gradient(to right,#ff944d,#FE6803);
    }

    .home-button:active {
        transform: scale(0.97);
        box-shadow: 0 3px 6px rgba(0,0,0,.2) inset;
    }

/* ===========================
   Button wrapper
   =========================== */

.button-wrapper {
    display: flex;
    justify-content: center; /* center by default */
    align-items: center;
    gap: 1rem; /* spacing between buttons */
    margin-top: 1rem;
    flex-wrap: wrap; /* wrap on small screens */
}

    /* Optional alignment variants */
    .button-wrapper.left {
        justify-content: flex-start;
    }

    .button-wrapper.right {
        justify-content: flex-end;
    }

/* Optional full-width row helper if needed */
.button-row {
    width: 100%;
}

/* ===========================
   Gradient button variants
   =========================== */
.btn-gradient-primary {
    background: linear-gradient(to right, #FE6803, #ff944d);
    color: #fff;
    border: none;
    transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.btn-gradient-secondary {
    background: linear-gradient(45deg,#6c757d,#adb5bd);
    color: #fff;
}

.btn-gradient-tertiary {
    background: linear-gradient(45deg,#4c6ef5,#74c0fc);
    color: #fff;
}

.btn-gradient-primary:hover {
    background: linear-gradient(to right, #e85e00, #ff7b00); /* donkerder */
    box-shadow: 0 0 0 .18rem rgba(254,104,3,.45), 0 6px 12px rgba(0,0,0,.25);
    filter: none; /* niet alleen brightness, echt donkerder kleur */
}

    .btn-gradient-secondary:hover,
    .btn-gradient-tertiary:hover,
    .btn-gradient-warning:hover {
        filter: brightness(1.05);
        box-shadow: 0 0 0 .14rem rgba(254,104,3,.38), 0 6px 12px rgba(0,0,0,.25);
    }

.btn-gradient-warning {
    background: linear-gradient(180deg, #ffd54d 0%, #ffc107 60%, #ffb100 100%);
    color: #111;
    border: none;
}

    .btn-gradient-warning:focus-visible {
        outline: none;
        box-shadow: 0 0 0 .2rem rgba(255,193,7,.45);
    }

.btn-gradient-primary:active {
    background: linear-gradient(to right, #cc5200, #ff6a00);
    transform: scale(0.97);
    box-shadow: 0 2px 4px rgba(0,0,0,.3) inset;
}

/* ===========================
   Outline button variants
   =========================== */
.btn-outline-primary {
    border: 1px solid #0d6efd;
    color: #0d6efd;
    background: transparent;
    border-radius: .5rem;
    padding: .45rem .75rem;
    font-size: 1rem;
    transition: background-color .2s ease,color .2s ease;
}

    .btn-outline-primary:hover {
        background-color: #0d6efd;
        color: #fff;
    }

    .btn-outline-primary:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

.btn-outline-secondary {
    background: linear-gradient(to bottom, #f9f9f9, #f1f1f1); /* zacht wit/grijs vlak */
    color: #2a2a2a; /* donkergrijze tekst, goed leesbaar */
    font-weight: 600;
    border: 1px solid #c6c6c6; /* subtiel grijs randje */
    border-radius: .9rem;
    padding: .65rem 1.4rem;
    font-size: 1rem;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,.08) inset;
}

    .btn-outline-secondary:hover {
        background: #6c757d;
        color: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,.15);
    }

    .btn-outline-secondary:active {
        background: #5c636a;
        color: #fff;
        transform: scale(0.98);
        box-shadow: 0 2px 6px rgba(0,0,0,.25) inset;
    }

    .btn-outline-secondary:disabled {
        opacity: .6;
        cursor: not-allowed;
        background: #e9ecef;
        color: #999;
    }

.btn-outline-success {
    border: 1px solid #28a745;
    color: #28a745;
    background: transparent;
    border-radius: .5rem;
    padding: .45rem .75rem;
    font-size: 1rem;
    transition: background-color .2s ease,color .2s ease;
}

    .btn-outline-success:hover {
        background-color: #28a745;
        color: #fff;
    }

    .btn-outline-success:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

.btn-outline-danger {
    border: 1px solid #dc3545;
    color: #dc3545;
    background: transparent;
    border-radius: .5rem;
    padding: .45rem .75rem;
    font-size: 1rem;
    transition: background-color .2s ease,color .2s ease;
}

    .btn-outline-danger:hover {
        background-color: #dc3545;
        color: #fff;
    }

    .btn-outline-danger:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

/* ===========================
   CTA button variants
   =========================== */

.btn-cta-size {
    padding: .9rem 1.6rem;
    border-radius: 1.3rem;
    font-weight: 700;
    min-width: 170px;
    font-size: clamp(.98rem, 1.9vw, 1.12rem);
}

.form-button-full,
.form-button-full > button {
    display: block;
    width: 100% !important;
    max-width: none;
    box-sizing: border-box;
}

/* ===========================
   Icon inheritance
   =========================== */
.btn i, .icon-only i {
    color: inherit !important;
}

    .btn i + span {
        margin-left: .5rem;
    }

/* ===========================
   Form-field action buttons
   =========================== */
.ff-action {
    --ff-action-size: 40px;
    width: var(--ff-action-size);
    height: var(--ff-action-size);
    min-width: var(--ff-action-size);
    min-height: var(--ff-action-size);
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .ff-action i {
        font-size: 1.25rem;
        line-height: 1;
    }

    .ff-action.sm {
        --ff-action-size: 36px;
    }

    .ff-action.lg {
        --ff-action-size: 44px;
    }

    .ff-action.btn-outline-primary,
    .ff-action.btn-outline-secondary,
    .ff-action.btn-outline-success,
    .ff-action.btn-outline-danger {
        padding: 0;
    }

/* ===========================
   Compact buttons
   =========================== */
.btn-compact {
    font-size: clamp(.75rem,1.8vw,1rem) !important;
    padding: .5rem 1rem;
    border-radius: .75rem;
    transition: transform .2s ease, box-shadow .2s ease;
    font-weight: 500;
    box-shadow: inset 0 0 0 rgba(255,255,255,.2), 0 4px 6px rgba(0,0,0,.1);
    background-blend-mode: overlay;
    border: none;
    outline: none;
}

    .btn-compact:hover {
        transform: scale(1.03);
        box-shadow: 0 6px 12px rgba(0,0,0,.15);
        filter: brightness(1.1);
    }

    .btn-compact:active {
        transform: scale(0.97);
        box-shadow: 0 3px 6px rgba(0,0,0,.2) inset;
    }

        .btn-compact:focus,
        .btn-compact:active:focus {
            box-shadow: 0 0 0 .2rem rgba(254,104,3,.3);
            outline: none;
        }

/* ===========================
   Icon-only (generic)
   =========================== */
.icon-only {
    background: transparent;
    border-radius: 12px;
    padding: .45rem .7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .2s ease, background-color .2s ease;
    border: 1px solid #444;
    color: #fff;
}

.header-light .icon-only, .footer-light .icon-only {
    border-color: #bbb;
    color: #333;
}

.header-dark .icon-only, .footer-dark .icon-only {
    border-color: #444;
    color: #eee;
}

/* ===========================
   Header
   =========================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    padding: 1rem 2rem;
    background: linear-gradient(to right, #ffe8cc, #ffd6b3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

/* Home and Language */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    z-index: 1;
}

/* Dark mode header */
.header-dark {
    background: #1e1e1e;
    color: #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.7);
    border-bottom: 1px solid #333;
}

    .header-dark .header-title {
        color: #fff;
    }

    .header-dark .header-icon {
        color: #ddd;
    }

        .header-dark .header-icon:hover {
            color: #f97316;
        }

/* Logo */
.header-logo {
    width: clamp(96px, 18vw, 192px);
    height: auto;
    max-width: 192px;
    min-width: 96px;
}

.header-alt-logo {
    display: none;
    width: 200px;
    height: auto;
    margin-bottom: 0.25rem;
}

.logo-button {
    background: none;
    border: none;
    padding: 0;
}

    .logo-button:hover {
        cursor: pointer;
    }

/* Title */
.header-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: bold;
    color: #4a4a4a;
    white-space: nowrap;
}

    .header-title.full {
        display: inline;
    }

    .header-title.short {
        display: none;
    }

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 0;
}

/* Connection Wifi Icon */
.connection-status i {
    font-size: 1.25rem;
}

@keyframes blink-icon {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

.online {
    color: #28a745; /* green */
}

.api-down {
    color: #007bff; /* blue */
    animation: blink-icon 1s infinite;
}

.signalr-down {
    color: #6c757d; /* gray */
    animation: blink-icon 1s infinite;
}

.offline {
    color: #dc3545; /* red */
    animation: blink-icon 1s infinite;
}

/* Header and Footer Icons */
.header-icon, .footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    padding: .45rem .6rem;
    border-radius: 12px;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

    .header-icon i, .footer-icon i {
        font-size: 1.5rem;
        line-height: 1;
        transition: color .2s ease, transform .2s ease;
    }

.header-light .header-icon i, .footer-light .footer-icon i {
    color: #000;
}

.header-dark .header-icon i, .footer-dark .footer-icon i {
    color: #fff;
}

.header-light .header-icon:hover i,
.footer-light .footer-icon:hover i,
.header-dark .header-icon:hover i,
.footer-dark .footer-icon:hover i {
    color: #FE6803;
    transform: scale(1.1);
}

.header-icon:focus-visible, .footer-icon:focus-visible, .icon-only:focus-visible {
    outline: none;
    box-shadow: 0 0 0 .18rem rgba(254,104,3,.35);
    border-radius: 12px;
}

/* ===========================
   Footer
   =========================== */

/* Footer */
.footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    padding: 0.5rem 1rem;
    z-index: 999;
    border-top: 1px solid transparent;
}

/* Match header-light */
.footer-light {
    background: linear-gradient(to right, #ffe8cc, #ffd6b3);
    color: #4a4a4a;
    border-top-color: rgba(0,0,0,0.06);
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

/* Match header-dark */
.footer-dark {
    background: #1e1e1e;
    color: #eee;
    border-top-color: #333;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.7);
}

.footer-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.footer-light .language-popup {
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
}

.footer-dark .language-popup {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #eee;
}

/* Mobile */
.responsive-footer {
    display: none;
}

/* ===========================
   Logo button
   =========================== */
.logo-button {
    background: transparent;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.btn-image, .btn-image-alt {
    display: inline-block;
    height: auto;
}

/* ===========================
   Dropdown items (general)
   =========================== */
.dropdown-item.d-flex.align-items-center img {
    margin-right: .5rem;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: rgba(254,104,3,.08);
    color: inherit;
}

/* ===========================
   Language selection
   =========================== */

/* Language selector container */
.language-selector {
    margin-left: auto;
}

    /* Dropdown menu appearance */
    .language-selector .dropdown-menu {
        border-radius: 0.6rem;
        padding: 0.5rem;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        min-width: 180px;
    }

    .language-selector .dropdown-menu {
        max-height: 60vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 10010;
    }

        .language-selector .dropdown-menu .dropdown-item.active,
        .language-selector .dropdown-menu .dropdown-item.active:hover,
        .language-selector .dropdown-menu .dropdown-item.active:focus {
            background-color: #FE6803;
            color: #fff;
            font-weight: 700;
        }

            .language-selector .dropdown-menu .dropdown-item.active .bi-check-lg {
                color: #fff;
            }

        .language-selector .dropdown-menu .dropdown-item span.me-auto {
            flex: 1 1 auto;
        }

/* Language Popup */
.language-popup {
    position: fixed;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 6px;
    padding: 0.5rem;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Plain toggle button (borderless) */
.language-toggle-plain {
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    padding: .25rem .5rem;
    cursor: pointer;
}

    .language-toggle-plain:focus,
    .language-toggle-plain:hover {
        background: transparent;
        box-shadow: none !important;
        outline: none;
    }

.country-menu {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 10010;
}

.dropdown-menu {
    z-index: 2000;
}

    .dropdown-menu .dropdown-item {
        display: flex;
        align-items: center;
    }

        .dropdown-menu .dropdown-item img {
            margin-right: .5rem;
        }

        .dropdown-menu .dropdown-item .bi-check-lg {
            margin-left: .5rem;
        }

/* ===========================
   Popup
   =========================== */

/* Popup modal */
.popup-container.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--overlay-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

/* popup not modal */
.popup-container.non-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

/* Popup */
.popup-box {
    background: var(--surface-bg);
    color: var(--surface-fg);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    min-width: 300px;
    max-width: 50vw;
    box-shadow: var(--surface-shadow);
    padding: 1.5rem;
    position: relative;
    font-size: clamp(0.85rem, 2vw, 1.1rem);
}

/* Popup Header */
.popup-header {
    color: var(--surface-fg);
    border-bottom: 1px solid var(--surface-border);
    padding: 0.75rem 1rem;
    border-radius: 6px 6px 0 0;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    position: relative;
}

/* Instruction */
.popup-instruction {
    border: 1px solid var(--surface-border);
    color: var(--surface-fg);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0 2rem;
}

/* Buttons */
.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    /* kill any IconOnly defaults */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #FE6803;
    padding: .25rem;
    border-radius: .5rem;
    line-height: 1;
}

    .popup-close i {
        color: inherit !important; /* keep icon orange */
        font-size: 1.1rem;
    }

    .popup-close:hover {
        color: #ff944d;
        background: transparent;
    }

    .popup-close:focus-visible {
        outline: none;
        box-shadow: 0 0 0 .18rem rgba(254,104,3,.35);
        border-radius: .5rem;
    }

/* ===========================
   Captcha
   =========================== */

/* Captcha Wrapper */
.captcha-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0;
    overflow: hidden;
    box-sizing: border-box;
}

    .captcha-wrapper .g-recaptcha {
        transform: scale(1.1);
        transform-origin: top center;
    }

.recaptcha-terms {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
}

/* ===========================
   Instruction Box
   =========================== */

/* Panel layout; color/contrast komt uit .ui-surface + theme tokens */
.instruction-panel {
    position: relative;
    width: min(96%, 980px);
    margin: 0 auto;
    text-align: center;
}

/* Titling */
.instruction-title {
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    font-weight: 700;
    margin: 0 0 .25rem 0;
    color: inherit; /* laat theme bepalen */
}

/* Body copy */
.instruction-body {
    font-size: clamp(.9rem, 2vw, 1.1rem);
    line-height: 1.45;
}

/* === Instruction toggle (info spot) ===
   Scales with viewport; draws its own ring & disc;
   themable via .theme-dark (on the button or a parent). */
.instruction-toggle-spot {
    /* sizing */
    --spot-size: clamp(48px, 6.5vw, 72px);
    /* LIGHT defaults */
    --spot-ring: #FE6803; /* outer ring */
    --spot-disc: #ffffff; /* inner disc */
    --spot-icon: #FE6803; /* 'i' color */

    position: relative;
    width: var(--spot-size);
    height: var(--spot-size);
    border-radius: 50%;
    padding: 0;
    /* kill generic icon-only border/background */
    border: none !important;
    background: transparent !important;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    /* Outer orange ring */
    .instruction-toggle-spot::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: var(--spot-ring);
    }

    /* Inner disc; its inset defines ring thickness */
    .instruction-toggle-spot::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        inset: clamp(5px, 0.9vw, 7px); /* ring thickness */
        background: var(--spot-disc);
    }

    /* The 'i' icon */
    .instruction-toggle-spot i {
        position: relative; /* above pseudo elements */
        z-index: 1;
        color: var(--spot-icon) !important;
        font-size: calc(var(--spot-size) * 0.52);
        line-height: 1;
    }

    /* Hover / focus */
    .instruction-toggle-spot:hover {
        filter: brightness(1.03);
    }

    .instruction-toggle-spot:focus-visible {
        outline: none;
        box-shadow: 0 0 0 .18rem rgba(254,104,3,.35);
        border-radius: 50%;
    }

    /* DARK variant – either button has .theme-dark,
   or a parent wraps it (both supported): */
    .instruction-toggle-spot.theme-dark,
    .theme-dark .instruction-toggle-spot {
        --spot-ring: #FE6803; /* keep orange ring as requested */
        --spot-disc: #000000; /* black inner disc */
        --spot-icon: #ffffff; /* white 'i' */
        box-shadow: 0 8px 20px rgba(0,0,0,.45);
    }


/* Placeholder rij voor de spot */
.instruction-placeholder {
    display: flex;
    justify-content: center;
    margin: .75rem 0 1rem;
}

/* ===========================
   Theme tokens
   =========================== */

/* Light theme (default) */
:root {
    /* Surfaces / cards */
    --surface-bg: #ffffff;
    --surface-fg: #222222;
    --surface-border: #d0d3d6;
    --surface-muted: #6c757d;
    --surface-shadow: 0 2px 10px rgba(0,0,0,.15);
    /* Links */
    --link-color: #0a58ca;
    /* Inputs */
    --input-bg: #ffffff;
    --input-fg: #212529;
    --input-border: #ced4da;
    /* overlay */
    --overlay-dim: rgba(0,0,0,.50);
}

/* Dark theme */
body.app-dark,
body.theme-dark {
    --surface-bg: #35383d;
    --surface-fg: #f1f3f5;
    --surface-border: #4c4f54;
    --surface-muted: #aab0b6;
    --surface-shadow: 0 8px 24px rgba(0,0,0,.45);
    --link-color: #8ecaff;
    --input-bg: #26292e;
    --input-fg: #e9ecef;
    --input-border: #474b51;
    --overlay-dim: rgba(0,0,0,.65);
}

.theme-dark {
    --surface-bg: #35383d;
    --surface-fg: #f1f3f5;
    --surface-border: #4c4f54;
    --input-bg: #26292e;
    --input-fg: #e9ecef;
    --input-border: #474b51;
    --overlay-dim: rgba(0,0,0,.65);
}

.theme-light {
    --surface-bg: #ffffff;
    --surface-fg: #222;
    --surface-border: #d0d3d6;
    --input-bg: #fff;
    --input-fg: #212529;
    --input-border: #ced4da;
    --overlay-dim: rgba(0,0,0,.50);
}

/* == Generic “surface” (card/panel) == Use for popups, forms, boxes, etc. */
.ui-surface {
    background: var(--surface-bg);
    color: var(--surface-fg);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    box-shadow: var(--surface-shadow);
}

    /* Default spacing helpers for surfaces */
    .ui-surface.padded {
        padding: 1rem;
    }

    /* Links inside surfaces adopt theme */
    .ui-surface a {
        color: var(--link-color);
        text-decoration: none;
    }

        .ui-surface a:hover {
            text-decoration: underline;
        }

/* Muted text helper */
.ui-muted {
    color: var(--surface-muted) !important;
}

/* ============================
   1) Dropdowns (globaal) – dark
   ============================ */
.app-dark .dropdown-menu {
    background: #2f3237;
    color: #e9ecef;
    border: 1px solid #474b51;
    box-shadow: 0 12px 28px rgba(0,0,0,.45);
}

    .app-dark .dropdown-menu .dropdown-item {
        color: inherit;
    }

        .app-dark .dropdown-menu .dropdown-item:hover,
        .app-dark .dropdown-menu .dropdown-item:focus {
            background: rgba(255,255,255,.06);
            color: #fff;
        }

        .app-dark .dropdown-menu .dropdown-item.active,
        .app-dark .dropdown-menu .dropdown-item.active:hover {
            background: #FE6803 !important;
            color: #fff !important;
        }

            /* Vinkje in actieve item (waar je het gebruikt) */
            .app-dark .dropdown-menu .dropdown-item.active .bi-check-lg,
            .app-dark .dropdown-menu .dropdown-item.active .check {
                color: #fff !important;
            }

/* ============================
   2) Header/Footer taalkeuze
   ============================ */
/* behoud jouw bestaande light styles; voeg dark variant toe */
.header-dark .language-selector .dropdown-menu,
.footer-dark .language-selector .dropdown-menu,
.footer-dark .language-popup .dropdown-menu,
.app-dark .language-selector .dropdown-menu {
    background: #2f3237;
    color: #e9ecef;
    border: 1px solid #474b51;
    --bs-dropdown-color: #e9ecef;
    --bs-dropdown-link-color: #e9ecef;
    --bs-dropdown-link-hover-color: #fff;
    --bs-dropdown-bg: #2f3237;
}

.footer-dark .language-selector .dropdown-item {
    color: inherit;
}

    .footer-dark .language-selector .dropdown-item:hover,
    .footer-dark .language-selector .dropdown-item:focus {
        background: rgba(255,255,255,.06);
        color: #fff;
    }

    .footer-dark .language-selector .dropdown-item.active {
        background: #FE6803;
        color: #fff;
    }

/* ============================
   3) Telefoon land-select (FormPhoneField)
   ============================ */
.app-dark .form-phone-field .dropdown-menu {
    background: #2f3237;
    color: #e9ecef;
    border: 1px solid #474b51;
}

    .app-dark .form-phone-field .dropdown-menu .dropdown-item:hover {
        background: rgba(255,255,255,.06);
    }

    .app-dark .form-phone-field .dropdown-menu .dropdown-item.active {
        background: #FE6803;
        color: #fff;
    }

/* ============================
   4) Adres land-select (FormCountryList)
   ============================ */
.app-dark .form-country-list .dropdown-menu,
.app-dark .form-country .dropdown-menu {
    background: #2f3237;
    color: #e9ecef;
    border: 1px solid #474b51;
}

    .app-dark .form-country-list .dropdown-menu .dropdown-item:hover {
        background: rgba(255,255,255,.06);
    }

    .app-dark .form-country-list .dropdown-menu .dropdown-item.active {
        background: #FE6803;
        color: #fff;
    }

/* Als je een native <select> toont (fallback), dan alleen het veld zelf: */
.app-dark select.form-country-select {
    background: #2e3237;
    color: #e9ecef;
    border-color: #474b51;
}

/* ============================
   5) FormPopup – dark variant
   ============================ */
.app-dark .popup-container.modal { /* overlay mag donkerder */
    background-color: rgba(0,0,0,.65);
}

.app-dark .popup-box {
    background-color: #2f3237;
    color: #e9ecef;
    border: 1px solid #474b51;
    box-shadow: 0 18px 40px rgba(0,0,0,.55);
}

.app-dark .popup-header {
    background-color: #292c31;
    color: #fff;
    border-bottom: 1px solid #474b51;
}

.app-dark .popup-instruction {
    background: #2a2d32;
    border-color: #474b51;
    color: #cfd5db;
}

/* ============================
   6) MessageBox – dark variant
   ============================ */
/* Gebruik dezelfde tokens; pas de class-namen aan als jouw component anders heet */
.app-dark .messagebox,
.app-dark .message-box,
.app-dark .alert-dialog { /* zet hier de juiste root-class van jouw MessageBox component */
    background: #2f3237;
    color: #e9ecef;
    border: 1px solid #474b51;
    box-shadow: 0 18px 40px rgba(0,0,0,.55);
}

    .app-dark .messagebox .title,
    .app-dark .message-box .title {
        color: #fff;
    }

    .app-dark .messagebox .instruction,
    .app-dark .message-box .instruction {
        background: #2a2d32;
        border: 1px solid #474b51;
        color: #cfd5db;
    }

/* ============================
   7) Scanner
   ============================ */

/* Scan mode */
#scanBody .hint-manual {
    display: none;
}

#scanBody .hint-scan {
    display: block;
}

/* Manual mode */
#scanBody.mode-manual .hint-manual {
    display: block;
}

#scanBody.mode-manual .hint-scan {
    display: none;
}

/* ============================
   8) Buttons
   ============================ */

body.app-dark .btn-gradient-primary {
    background: linear-gradient(to right, #ff7b00, #ff944d);
    box-shadow: 0 3px 10px rgba(0,0,0,.4);
}

    body.app-dark .btn-gradient-primary:hover {
        background: linear-gradient(to right, #e45d00, #ff6a00);
        box-shadow: 0 0 0 .18rem rgba(254,104,3,.45), 0 6px 16px rgba(0,0,0,.4), 0 0 10px rgba(254,104,3,.4);
    }

body.app-dark .btn-outline-secondary {
    background: #2f3237;
    color: #f1f3f5;
    border-color: #555;
    box-shadow: 0 2px 6px rgba(0,0,0,.25) inset;
}

    body.app-dark .btn-outline-secondary:hover {
        background: #6c757d;
        color: #fff;
        box-shadow: 0 0 0 .15rem rgba(255,255,255,.15);
    }

/* ===========================
   Layout wrapper
   =========================== */

/* layout container */
.layout-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.splashscreen {
    position: fixed;
    inset: 0;
    background-color: #FE6803;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    .splashscreen img {
        max-width: 200px;
    }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.2); /* semi-transparant */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-in-out;
}

    .loading-overlay.show {
        opacity: 1;
    }

.fade {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

    .fade.show {
        opacity: 1;
    }

.preload-holder {
    display: none;
}

.page-fade {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

    .page-fade.fade-in {
        opacity: 1;
    }

/* Input form */
input.form-control,
textarea.form-control,
select.form-control {
    font-size: clamp(1rem, 2vw, 1rem);
    padding: 0.4rem 0.6rem;
    line-height: 1.4;
    height: auto;
}

    input.form-control:focus,
    select.form-control:focus,
    textarea.form-control:focus {
        border-color: #FE6803;
        box-shadow: 0 0 0 0.2rem rgba(254, 104, 3, 0.25);
        outline: none;
    }

    input.form-control::placeholder {
        color: #bbb;
        opacity: 1;
    }

    input.form-control.invalid {
        border-color: #dc3545;
        padding-right: calc(1.5em + 0.75rem);
        background-image: url("data:image/svg+xml,...");
        background-repeat: no-repeat;
        background-position: right calc(0.375em + 0.1875rem) center;
        background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    }

        input.form-control.invalid:focus {
            border-color: #dc3545;
            box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
        }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 767px) {
    /* iOS will not zoom if font-size >= 16 */
    input.form-control {
        font-size: 16px;
    }

    .form-check-horizontal {
        flex-direction: column;
        gap: .25rem;
        padding-left: 1rem;
    }

    .popup-box {
        max-width: 90vw;
    }

    .header {
        flex-direction: column;
        padding: 0.5rem;
    }

    .header-left {
        justify-content: center;
        width: 100%;
    }

    .header-right {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        flex-direction: row;
        gap: 0.25rem;
        z-index: 1200;
    }

    .header-right .home-nav-button,
    .header-right .logout-nav-button,
    .header-right .language-selector {
        display: none;
    }

    .header-center {
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }

    .header-title.full {
        display: none;
    }

    .header-title.short {
        display: inline;
        font-size: clamp(1.2rem, 4vw, 2.0rem);
    }

    .header-logo {
        display: none;
    }

    .header-alt-logo {
        display: block;
        width: clamp(56px, 18vw, 150px);
        height: auto;
        margin-top: 0.5rem;
        align-self: center;
    }

    .connection-status {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        z-index: 1200;
    }

    .responsive-footer {
        display: block;
    }

    .captcha-wrapper .g-recaptcha {
        transform: scale(0.85);
    }
}
