/**
 * WIBON-checklist: zelfde wizard-stijl op /user/checklist en in de klic_viewer-poort.
 * Neon-achtergrond (centraal helder, naar buiten transparant), donkere kaart, stappen, foto.
 */
.clsv-survey,
.clsv-survey * {
    box-sizing: border-box;
}

.clsv-survey {
    --dur-track: 0.52s;
    --color-bg: #0a0a0b;
    --color-surface: #141416;
    --color-primary: #ffffff;
    --color-brand: #ccff00;
    --color-text: #e5e7eb;
    --color-text-dim: #9ca3af;
    --color-border: #2a2a2e;
    --radius-md: 16px;
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-track: 0.52s;
    --brand-glow: 0 0 28px rgba(204, 255, 0, 0.22);
    --card-glow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(204, 255, 0, 0.12);
    color: var(--color-text);
    font-family: "Inter", system-ui, sans-serif;
    line-height: 1.6;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 1;
    width: 100%;
}

.clsv-survey-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #121315;
    overflow-x: hidden;
}

/* Vaste neon wash (geen opeenvolgende “donkere” stappen) */
.clsv-survey .clsv-neon-bg,
.clsv-gate .clsv-neon-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: transparent;
    backdrop-filter: blur(2px) saturate(1.12) brightness(1.02);
    -webkit-backdrop-filter: blur(2px) saturate(1.12) brightness(1.02);
}

.clsv-survey .clsv-neon-bg::before,
.clsv-gate .clsv-neon-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 95% 72% at 50% 46%,
            rgba(220, 255, 100, 0.5) 0%,
            rgba(204, 255, 0, 0.28) 32%,
            rgba(255, 255, 255, 0.12) 52%,
            transparent 72%),
        radial-gradient(ellipse 65% 95% at 50% 50%,
            rgba(204, 255, 0, 0.18) 0%,
            rgba(255, 255, 255, 0.05) 45%,
            transparent 70%);
}

/* Viewer: overlay; standalone: normale flow */
.clsv-gate {
    position: fixed;
    inset: 0;
    z-index: 5001;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.clsv-gate .clsv-survey {
    flex: 0 1 auto;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

/* ── Finaletje na opslaan (standalone) ── */
.clsv-survey .checklist-finale {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
}
.clsv-survey .checklist-finale.is-visible {
    visibility: visible;
    pointer-events: auto;
}
.clsv-survey .checklist-finale-wash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, #f8ff6a 0%, #e8ff3d 35%, #ccff00 70%, #b8e800 100%);
    opacity: 0;
    transform: scale(1.05);
}
.clsv-survey .checklist-finale.is-visible .checklist-finale-wash {
    animation: clsv-checklist-finale-wash-in 1.05s var(--ease-premium) forwards;
}
@keyframes clsv-checklist-finale-wash-in {
    0% { opacity: 0; transform: scale(1.12); }
    100% { opacity: 1; transform: scale(1); }
}
.clsv-survey .checklist-finale-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 24px;
    max-width: 320px;
    opacity: 0;
    transform: translateY(12px);
}
.clsv-survey .checklist-finale.is-visible.is-animating .checklist-finale-inner {
    animation: clsv-checklist-finale-inner-in 0.55s var(--ease-premium) 0.35s forwards;
}
@keyframes clsv-checklist-finale-inner-in {
    to { opacity: 1; transform: translateY(0); }
}
.clsv-survey .checklist-finale-svg {
    width: 112px;
    height: 112px;
    display: block;
    margin: 0 auto 16px;
    filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.18));
}
.clsv-survey .checklist-finale-svg .finale-burst {
    transform-origin: 60px 60px;
    opacity: 0;
}
.clsv-survey .checklist-finale.is-animating .checklist-finale-svg .finale-burst {
    animation: clsv-checklist-finale-burst 1.1s var(--ease-premium) 0.15s forwards;
}
@keyframes clsv-checklist-finale-burst {
    0% { opacity: 0; transform: scale(0.6); }
    40% { opacity: 0.9; transform: scale(1.05); }
    100% { opacity: 0.55; transform: scale(1.25); }
}
.clsv-survey .checklist-finale-svg .finale-ring-bg {
    fill: none;
    stroke: rgba(10, 10, 10, 0.12);
    stroke-width: 3;
}
.clsv-survey .checklist-finale-svg .finale-ring {
    fill: none;
    stroke: #0a0a0a;
    stroke-width: 4;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 60px 60px;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
}
.clsv-survey .checklist-finale.is-animating .checklist-finale-svg .finale-ring {
    animation: clsv-checklist-finale-ring 0.85s var(--ease-premium) 0.2s forwards;
}
@keyframes clsv-checklist-finale-ring {
    to { stroke-dashoffset: 0; }
}
.clsv-survey .checklist-finale-svg .finale-check {
    fill: none;
    stroke: #0a0a0a;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 72;
    stroke-dashoffset: 72;
}
.clsv-survey .checklist-finale.is-animating .checklist-finale-svg .finale-check {
    animation: clsv-checklist-finale-check 0.45s var(--ease-premium) 0.75s forwards;
}
@keyframes clsv-checklist-finale-check {
    to { stroke-dashoffset: 0; }
}
.clsv-survey .checklist-finale-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0a0a0a;
    margin: 0 0 6px;
}
.clsv-survey .checklist-finale-sub {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(10, 10, 10, 0.55);
    margin: 0;
}
.clsv-survey-page.checklist-finale-lock {
    overflow: hidden;
}

/* ── Binnenframe ── */
.clsv-survey .clsv-survey-container {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 28px 20px max(24px, env(safe-area-inset-bottom, 0px));
    min-height: 100vh;
    min-height: 100dvh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}
.clsv-gate .clsv-survey .clsv-survey-container {
    min-height: 0;
    padding: 20px 16px 20px;
}

@media (min-width: 900px) {
    .clsv-survey .clsv-survey-container {
        max-width: min(92vw, 720px);
        padding: 36px 32px 28px;
    }
}

.clsv-survey header {
    text-align: center;
    margin-bottom: 28px;
}
.clsv-survey .logo {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 22px;
}
.clsv-survey .logo img {
    height: 100%;
    width: auto;
}
.clsv-survey h1.checklist-project-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--color-primary);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
@media (min-width: 900px) {
    .clsv-survey h1.checklist-project-title { font-size: 26px; }
}
.clsv-survey .checklist-header-line {
    color: var(--color-text-dim);
    font-size: 13px;
    line-height: 1.45;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}
.clsv-survey .checklist-header-line + .checklist-header-line { margin-top: 6px; }
.clsv-survey .checklist-klic-label {
    display: inline-block;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    margin-right: 8px;
    font-size: 12px;
}
.clsv-survey .subtitle {
    color: var(--color-text-dim);
    font-size: 13px;
}
.clsv-survey .checklist-shell {
    background: linear-gradient(165deg, rgba(18, 18, 22, 0.95) 0%, rgba(10, 10, 12, 0.98) 100%);
    border: 1px solid rgba(204, 255, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 26px 22px 22px;
    margin-bottom: 20px;
    box-shadow: var(--card-glow);
    backdrop-filter: blur(16px);
}
@media (min-width: 900px) {
    .clsv-survey .checklist-shell { padding: 32px 36px 28px; }
}
.clsv-survey .step-indicator {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
}
.clsv-survey .step-dot {
    height: 3px;
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    transition: background 0.38s var(--ease-premium), box-shadow 0.38s var(--ease-premium);
}
.clsv-survey .step-dot.active {
    background: var(--color-brand);
    box-shadow: var(--brand-glow);
}
.clsv-survey .questions-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: min(52vh, 420px);
}
@media (min-width: 900px) {
    .clsv-survey .questions-viewport { min-height: min(48vh, 480px); }
}
.clsv-survey .questions-track {
    --slide-count: 1;
    --slide-index: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: calc(var(--slide-count) * 100%);
    transform: translateX(calc(var(--slide-index) * (-100% / var(--slide-count))));
    transition: transform var(--dur-track) var(--ease-premium);
    will-change: transform;
    align-items: flex-start;
}
.clsv-survey .questions-track > .question {
    flex: 0 0 calc(100% / var(--slide-count));
    width: calc(100% / var(--slide-count));
    max-width: calc(100% / var(--slide-count));
    min-width: 0;
    box-sizing: border-box;
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-premium);
}
.clsv-survey .questions-track > .question.active {
    opacity: 1;
    pointer-events: auto;
}
.clsv-survey h2 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    line-height: 1.35;
}
@media (min-width: 900px) {
    .clsv-survey h2 { font-size: 19px; margin-bottom: 22px; }
}
/* Smalle telefoons: één knop per rij, groter tikvlak */
@media (max-width: 380px) {
    .clsv-survey .photo-row label.file-pick {
        flex: 1 1 100%;
        min-width: 0;
    }
}
.clsv-survey .options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.clsv-survey .option {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    padding: 16px 18px;
    min-height: 48px;
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: border-color 0.18s, background 0.18s, transform 0.08s;
    display: flex;
    align-items: center;
    gap: 14px;
}
.clsv-survey .option:hover {
    background: rgba(204, 255, 0, 0.06);
    border-color: rgba(204, 255, 0, 0.3);
}
.clsv-survey .option:active { transform: scale(0.98); }
.clsv-survey .option.selected {
    background: rgba(204, 255, 0, 0.12);
    border-color: rgba(204, 255, 0, 0.55);
    box-shadow: 0 0 20px rgba(204, 255, 0, 0.12);
}
.clsv-survey .option i { font-size: 18px; color: var(--color-text-dim); }
.clsv-survey .option.selected i { color: var(--color-brand); }
.clsv-survey .nav-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    align-items: stretch;
}
.clsv-survey .btn-prev {
    flex: 0 0 auto;
    min-width: 108px;
    min-height: 48px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-dim);
    border: 1px solid var(--color-border);
    padding: 16px 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
    font-family: inherit;
}
.clsv-survey .btn-prev:hover:not(:disabled) {
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}
.clsv-survey .btn-prev:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.clsv-survey .btn-next {
    flex: 1;
    background: var(--color-brand);
    color: #0a0a0a;
    border: none;
    padding: 16px 18px;
    min-height: 48px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.18s, box-shadow 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 28px rgba(204, 255, 0, 0.25);
    font-family: inherit;
}
.clsv-survey .btn-next:disabled {
    background: #2a2a2e;
    color: #6b6b73;
    cursor: not-allowed;
    box-shadow: none;
}
.clsv-survey .btn-next:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(204, 255, 0, 0.32);
}
.clsv-survey .footer-note {
    text-align: center;
    font-size: 11px;
    color: var(--color-text-dim);
    margin-top: auto;
    padding: 20px 0 8px;
    opacity: 0.55;
    line-height: 1.5;
}
.clsv-survey .guest-tip {
    font-size: 12px;
    color: var(--color-text-dim);
    line-height: 1.5;
    margin-bottom: 20px;
}
.clsv-survey .guest-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
    padding: 16px;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}
.clsv-survey .guest-input:focus {
    border-color: rgba(204, 255, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(204, 255, 0, 0.12);
}
.clsv-survey .photo-row {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}
/* Twee duidelijke acties op mobiel: camera (capture) + galerij (multiple) */
.clsv-survey .clsv-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}
.clsv-survey .photo-row label.file-pick {
    display: inline-flex;
    flex: 1 1 calc(50% - 5px);
    min-width: min(100%, 140px);
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    padding: 12px 14px;
    border: 1px dashed rgba(204, 255, 0, 0.28);
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
    text-align: center;
    line-height: 1.25;
}
.clsv-survey .photo-row label.file-pick--primary {
    border-style: solid;
    border-color: rgba(204, 255, 0, 0.5);
    background: rgba(204, 255, 0, 0.08);
    color: var(--color-text);
}
.clsv-survey .photo-row label.file-pick:hover {
    border-color: rgba(204, 255, 0, 0.45);
    background: rgba(204, 255, 0, 0.05);
}
.clsv-survey .photo-row label.file-pick--primary:hover {
    background: rgba(204, 255, 0, 0.12);
    border-color: rgba(204, 255, 0, 0.65);
}
.clsv-survey .photo-row input[type="file"] { display: none; }
.clsv-survey .photo-row .photo-status {
    font-size: 12px;
    color: var(--color-text-dim);
    margin-top: 10px;
    min-height: 1.2em;
}
.clsv-survey .photo-row.disabled label.file-pick { opacity: 0.35; pointer-events: none; }
.clsv-survey .photo-row.photo-required label.file-pick { border-color: rgba(204, 255, 0, 0.5); }
.clsv-survey .photo-row.photo-required .subtitle { color: #e5e7eb; }

.clsv-survey .checklist-photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    min-height: 0;
}
.clsv-survey .checklist-photo-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}
.clsv-survey .checklist-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.clsv-survey .checklist-photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.clsv-survey .checklist-photo-remove:hover {
    background: rgba(220, 50, 50, 0.9);
}

/* Viewer: overslaan */
.clsv-survey .clsv-skip-link {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    text-align: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.clsv-survey .clsv-skip-link:hover {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (prefers-reduced-motion: reduce) {
    .clsv-survey { --dur-track: 0.01ms; }
    .clsv-survey .questions-track > .question {
        opacity: 1;
        transition: none;
    }
    .clsv-survey .questions-track > .question:not(.active) {
        opacity: 0;
        pointer-events: none;
    }
    .clsv-survey .checklist-finale-wash {
        animation: none !important;
        opacity: 0.95;
        transform: none;
    }
    .clsv-survey .checklist-finale.is-visible.is-animating .checklist-finale-inner {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .clsv-survey .checklist-finale-svg .finale-ring,
    .clsv-survey .checklist-finale-svg .finale-check,
    .clsv-survey .checklist-finale-svg .finale-burst {
        animation: none !important;
        stroke-dashoffset: 0 !important;
        opacity: 1;
        transform: none;
    }
}

/* Optionele checklist vanuit viewer-toolbar (niet-blokkerend; gate blijft z-index 5001) */
.clsv-gate.clsv-float {
    display: none;
    z-index: 4990;
}
.clsv-gate.clsv-float.is-open {
    display: flex;
}
.clsv-float-close {
    position: fixed;
    top: max(16px, env(safe-area-inset-top, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    z-index: 4995;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
