/* ==========================================================================
   Vulcor Keuzehulp – Front-end wizard
   ========================================================================== */

.vk-keuzehulp {
    /* Colors derive entirely from the theme's leftheme.json palette variables. */
    --vk-sidebar: var(--primary);
    --vk-sidebar-dark: var(--primary-darkened);
    --vk-accent: var(--secondary);
    --vk-accent-dark: var(--secondary-darkened);
    --vk-ink: var(--black);
    --vk-muted: color-mix(in srgb, var(--black) 55%, var(--white));
    --vk-bg: var(--gray);
    --vk-card-border: var(--darkgray);

    box-sizing: border-box;
    color: var(--vk-ink);
    font-size: 16px;
    line-height: 1.5;
}
.vk-keuzehulp *,
.vk-keuzehulp *::before,
.vk-keuzehulp *::after { box-sizing: inherit; }

.vk-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    overflow: hidden;
    min-height: 520px;
}

/* ── Sidebar ───────────────────────────────────────────────────────────── */

.vk-sidebar {
    background: var(--vk-sidebar);
    color: var(--white);
    padding: 34px 30px;
    display: flex;
    flex-direction: column;
    /* Diagonal top edge (mirror of the home-hero bottom edge): right side 70px lower than the left top */
    clip-path: polygon(0 0, 100% 15px, 100% 100%, 0 100%);
}
.vk-sidebar__eyebrow {
    margin: 0 0 28px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--white) 85%, transparent);
}

.vk-steps-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.vk-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--white) 18%, transparent);
    color: color-mix(in srgb, var(--white) 55%, transparent);
    transition: color .15s;
}
.vk-step:last-child { border-bottom: none; }
.vk-step.is-clickable { cursor: pointer; }
.vk-step__num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid color-mix(in srgb, var(--white) 45%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.vk-step__label { font-size: 15px; font-weight: 600; }
.vk-step.is-active { color: var(--white); }
.vk-step.is-active .vk-step__num { background: var(--white); color: var(--vk-sidebar); border-color: var(--white); }
.vk-step.is-done { color: color-mix(in srgb, var(--white) 90%, transparent); }
.vk-step.is-done .vk-step__num { background: color-mix(in srgb, var(--white) 18%, transparent); border-color: color-mix(in srgb, var(--white) 50%, transparent); color: var(--white); }

/* Help / quote box */
.vk-quote-box {
    margin-top: auto;
    background: var(--white);
    padding: 20px;
    color: var(--vk-sidebar-dark);
}
.vk-quote-box__heading { margin: 0 0 14px; font-size: 14px; font-weight: 700; color: var(--vk-sidebar-dark); }
.vk-quote-box__btn {
    display: inline-block;
    border: 1px solid var(--vk-sidebar);
    color: var(--vk-sidebar-dark);
    text-decoration: none;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s, color .15s;
}
.vk-quote-box__btn:hover { background: var(--vk-sidebar); color: var(--white); }

/* ── Main ──────────────────────────────────────────────────────────────── */

.vk-main {
    padding: 40px 48px 48px;
    display: flex;
    flex-direction: column;
}
.vk-step-counter {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--vk-muted);
}
.vk-panel {
    padding: 10px 0px;
    display: flex;
    flex-direction: column;
}
.vk-panel__title {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}
.vk-panel__desc {
    margin: 0 0 26px;
    font-size: 16px;
    color: var(--vk-muted);
}

/* Options */
.vk-options { display: flex; flex-direction: column; gap: 14px; }
.vk-option {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin: 0;
    text-align: left;
    background: var(--white);
    border: 1px solid var(--vk-card-border);
    padding: 18px 22px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.vk-option:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--white)); }
.vk-option:hover .vk-option__desc { color: var(--white); }
.vk-option__dot {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 22%, var(--white));
    position: relative;
    transition: background .15s;
}
.vk-option__body { display: flex; flex-direction: column; gap: 3px; }
.vk-option__text { font-size: 19px; font-weight: 600; }
.vk-option__desc { font-size: 13px; color: var(--vk-muted); }

.vk-option.is-selected {
    border-color: var(--vk-sidebar);
    background: color-mix(in srgb, var(--primary) 10%, var(--white));
    box-shadow: inset 0 0 0 1px var(--vk-sidebar);
}
.vk-option.is-selected .vk-option__dot { background: var(--vk-sidebar); }
.vk-option.is-selected .vk-option__dot::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--white);
}

/* Actions */
.vk-panel__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}
.vk-btn {
    font: inherit;
    font-weight: 700;
    margin: 0;
    border: none;
    padding: 12px 22px;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}
.vk-btn--next { background: var(--vk-accent); color: var(--white); }
.vk-btn--next:hover { background: var(--vk-accent-dark); }
.vk-btn--next:disabled { opacity: .45; cursor: not-allowed; }
.vk-btn--back { background: transparent; color: var(--vk-muted); padding-left: 4px; }
.vk-btn--back:hover { color: var(--vk-ink); }

/* Loader */
.vk-loader {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 60px 0;
    text-align: center;
}
.vk-loader__spinner {
    width: 46px;
    height: 46px;
    border: 4px solid color-mix(in srgb, var(--primary) 16%, var(--white));
    border-top-color: var(--vk-sidebar);
    animation: vk-spin .8s linear infinite;
}
.vk-loader__text { margin: 0; font-size: 18px; font-weight: 600; color: var(--vk-ink); }
@keyframes vk-spin { to { transform: rotate(360deg); } }

.vk-empty { padding: 40px; color: var(--vk-muted); }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    /* Stack as a single column and let the sidebar's children flow into it,
       so the quote box can be ordered below the questions. */
    .vk-layout {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .vk-sidebar { display: contents; }
    .vk-sidebar__eyebrow { display: none; }

    /* Steps: horizontal, scrollable. Blue bar stays solid; the steps fade
       into the blue at the trailing edge via a sticky gradient overlay. */
    .vk-steps-nav {
        order: 1;
        position: relative;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 22px;
        overflow-x: auto;
        background: var(--vk-sidebar);
        padding: 18px 24px;
        scrollbar-width: none;
    }
    .vk-steps-nav::-webkit-scrollbar { display: none; }
    .vk-steps-nav::after {
        content: "";
        position: sticky;
        right: -30px;
        align-self: stretch;
        flex: 0 0 56px;
        margin-left: -56px; /* overlay the last steps instead of adding width */
        background: linear-gradient(to right, transparent, var(--vk-sidebar));
        pointer-events: none;
        transition: opacity .2s;
    }
    /* No more steps hidden to the right → hide the fade so the last step is clear. */
    .vk-steps-nav.is-scroll-end::after { opacity: 0; }
    .vk-step {
        flex: 0 0 auto;
        padding: 0;
        border-bottom: none;
        white-space: nowrap;
    }

    .vk-main { order: 2; padding: 30px 0 36px; }

    .vk-quote-box { order: 3; margin-top: 24px; }

    .vk-panel__title { font-size: 24px; }
}
