/*
 * Vloershop Core: egalinewijzer (.vs-egwijzer, shortcode [vs_egalinewijzer]).
 * Kleuren via de bekende --vs-*-variabelen met fallbacks, zoals de rest.
 *
 * Eén kolom, geen twee. Anders dan bij de rekenhulp zijn hier vijf vragen en
 * telt de uitkomst meerdere kaarten met een vergelijking; dat leest beter onder
 * elkaar dan naast elkaar, ook op een breed scherm.
 */

.vs-egwijzer {
    --vs-eg-fg: var(--vs-navy, #324696);
    --vs-eg-accent: var(--vs-orange, #fa6900);
    --vs-eg-soft: var(--vs-soft, #f4f5f7);
    --vs-eg-line: var(--vs-line, #e3e6ec);
    --vs-eg-grijs: #6b7280;
    --vs-eg-groen: #0f7b3f;
    --vs-eg-rood: #b4231c;
    margin: 32px 0;
    color: var(--vs-eg-fg);
}

/* ---------- formulier ---------- */

.vs-egwijzer__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 0 28px;
}

.vs-egwijzer__blok {
    border: 1px solid var(--vs-eg-line);
    border-radius: 4px;
    padding: 16px 18px 18px;
    margin: 0;
    background: #fff;
}

.vs-egwijzer__legend {
    padding: 0 6px;
    margin-left: -6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
}

.vs-egwijzer__hint {
    margin: 2px 0 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--vs-eg-grijs);
}

.vs-egwijzer__opties {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px;
}

.vs-egwijzer__optie {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--vs-eg-line);
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s;
}

.vs-egwijzer__optie:hover {
    border-color: var(--vs-eg-accent);
}

.vs-egwijzer__optie input {
    margin: 3px 0 0;
    flex: 0 0 auto;
}

.vs-egwijzer__optie span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vs-egwijzer__optie strong {
    font-size: 14px;
    font-weight: 600;
}

.vs-egwijzer__optie small {
    font-size: 12px;
    line-height: 1.5;
    color: var(--vs-eg-grijs);
}

.vs-egwijzer__optie:has(input:checked) {
    border-color: var(--vs-eg-accent);
    background: var(--vs-eg-soft);
}

.vs-egwijzer__velden {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.vs-egwijzer__veld {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.vs-egwijzer__veld span {
    font-weight: 600;
}

.vs-egwijzer__veld input {
    padding: 9px 10px;
    border: 1px solid var(--vs-eg-line);
    border-radius: 4px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
}

.vs-egwijzer__veld small {
    font-size: 12px;
    color: var(--vs-eg-grijs);
}

.vs-egwijzer__vinkjes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vs-egwijzer__vinkje {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.vs-egwijzer__vinkje span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
}

.vs-egwijzer__vinkje small {
    font-size: 12px;
    color: var(--vs-eg-grijs);
}

.vs-egwijzer__knop,
.vs-egwijzer__kar {
    align-self: flex-start;
    padding: 13px 26px;
    border: 0;
    border-radius: 4px;
    background: var(--vs-eg-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.vs-egwijzer__knop:hover,
.vs-egwijzer__kar:hover {
    filter: brightness(.94);
}

.vs-egwijzer__kar {
    margin-top: 8px;
    width: 100%;
    max-width: 420px;
}

.vs-egwijzer__kar[disabled] {
    opacity: .7;
    cursor: default;
}

.vs-egwijzer__karhint,
.vs-egwijzer__noscript {
    font-size: 12px;
    color: var(--vs-eg-grijs);
    margin: 6px 0 0;
}

/* ---------- stap voor stap ----------
 *
 * Zonder JavaScript staat .is-stapsgewijs er niet en zijn alle vijf de blokken
 * zichtbaar: dan is het een gewoon formulier. De JS zet die class en regelt het
 * verbergen met het hidden-attribuut, niet met CSS, zodat een verborgen stap ook
 * echt uit de tabvolgorde verdwijnt.
 */

.vs-egwijzer__voortgang {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
    counter-reset: none;
}

.vs-egwijzer__stap-bol {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 2px 10px;
    border-bottom: 3px solid var(--vs-eg-line);
    font-size: 12px;
    color: var(--vs-eg-grijs);
    text-align: center;
    min-width: 0;
}

.vs-egwijzer__stap-nummer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--vs-eg-line);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.vs-egwijzer__stap-titel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.vs-egwijzer__stap-bol.is-nu {
    border-bottom-color: var(--vs-eg-accent);
    color: var(--vs-eg-fg);
    font-weight: 600;
}

.vs-egwijzer__stap-bol.is-nu .vs-egwijzer__stap-nummer {
    background: var(--vs-eg-accent);
    border-color: var(--vs-eg-accent);
    color: #fff;
}

.vs-egwijzer__stap-bol.is-gedaan {
    cursor: pointer;
    border-bottom-color: var(--vs-eg-accent);
}

.vs-egwijzer__stap-bol.is-gedaan .vs-egwijzer__stap-nummer {
    border-color: var(--vs-eg-accent);
    color: var(--vs-eg-accent);
}

.vs-egwijzer__stap-bol.is-gedaan:hover .vs-egwijzer__stap-nummer {
    background: var(--vs-eg-soft);
}

.vs-egwijzer__nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.vs-egwijzer__terug {
    padding: 13px 20px;
    border: 1px solid var(--vs-eg-line);
    border-radius: 4px;
    background: #fff;
    color: var(--vs-eg-fg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.vs-egwijzer__terug:hover {
    border-color: var(--vs-eg-accent);
}

.vs-egwijzer__stapfout {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--vs-eg-rood);
    background: #fff;
    font-size: 14px;
    color: var(--vs-eg-rood);
}

.vs-egwijzer__opnieuw {
    margin: 12px 0 0;
    padding: 10px 18px;
    border: 1px solid var(--vs-eg-line);
    border-radius: 4px;
    background: #fff;
    color: var(--vs-eg-fg);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.vs-egwijzer__opnieuw:hover {
    border-color: var(--vs-eg-accent);
}

/* In stapsgewijze modus staat er een blok per keer, dus de marge eronder hoeft
   niet mee te tellen voor vijf blokken. */
.vs-egwijzer.is-stapsgewijs .vs-egwijzer__form {
    gap: 14px;
}

@media (max-width: 560px) {
    .vs-egwijzer__stap-titel {
        display: none;
    }

    .vs-egwijzer__stap-bol {
        padding: 6px 2px 8px;
    }

    .vs-egwijzer__nav {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .vs-egwijzer__nav button {
        width: 100%;
    }
}

/* ---------- uitkomst ---------- */

.vs-egwijzer__uitkomst {
    border: 1px solid var(--vs-eg-line);
    border-radius: 4px;
    padding: 20px 18px;
    background: var(--vs-eg-soft);
    margin: 0 0 32px;
}

.vs-egwijzer__kop {
    margin: 0 0 4px;
    font-size: 20px;
}

.vs-egwijzer__samenvatting {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--vs-eg-grijs);
}

.vs-egwijzer__melding {
    margin: 0;
    font-size: 14px;
}

.vs-egwijzer__waarschuwing {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-left: 3px solid var(--vs-eg-accent);
    background: #fff;
    font-size: 14px;
    line-height: 1.6;
}

.vs-egwijzer__kaart {
    position: relative;
    border: 1px solid var(--vs-eg-line);
    border-radius: 4px;
    background: #fff;
    padding: 16px 18px;
    margin: 0 0 12px;
}

.vs-egwijzer__kaart.is-gekozen {
    border-color: var(--vs-eg-accent);
    box-shadow: 0 0 0 1px var(--vs-eg-accent);
}

.vs-egwijzer__kies {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
    margin: 0 0 8px;
}

.vs-egwijzer__kies-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--vs-eg-accent);
}

.vs-egwijzer__kaart--extra .vs-egwijzer__kies-label {
    color: var(--vs-eg-grijs);
    margin-bottom: 8px;
}

.vs-egwijzer__beeld {
    float: right;
    width: 84px;
    height: auto;
    margin: 0 0 10px 14px;
    border-radius: 4px;
}

.vs-egwijzer__naam {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.4;
}

.vs-egwijzer__naam a {
    color: inherit;
    text-decoration: none;
}

.vs-egwijzer__naam a:hover {
    text-decoration: underline;
}

.vs-egwijzer__aantal {
    margin: 0 0 8px;
    font-size: 15px;
}

.vs-egwijzer__reken,
.vs-egwijzer__droog {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--vs-eg-grijs);
}

.vs-egwijzer__redenen {
    margin: 0 0 8px;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.65;
}

.vs-egwijzer__redenen li {
    margin: 0 0 3px;
}

.vs-egwijzer__nietvoorraad {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--vs-eg-rood);
}

.vs-egwijzer__gereedschap {
    margin: 18px 0 0;
}

.vs-egwijzer__gereedschap h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.vs-egwijzer__gereedschap ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
}

.vs-egwijzer__gereedschap li {
    background: #fff;
    border: 1px solid var(--vs-eg-line);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
}

.vs-egwijzer__gereedschap small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--vs-eg-grijs);
}

.vs-egwijzer__prijs {
    color: var(--vs-eg-grijs);
    font-size: 13px;
}

.vs-egwijzer__afgevallen {
    margin: 18px 0 0;
    font-size: 13px;
}

.vs-egwijzer__afgevallen summary {
    cursor: pointer;
    font-weight: 600;
}

.vs-egwijzer__afgevallen ul {
    margin: 10px 0 0;
    padding-left: 18px;
    line-height: 1.7;
    color: var(--vs-eg-grijs);
}

/* ---------- uitleg en tabel ---------- */

.vs-egwijzer__uitleg h2,
.vs-egwijzer__tabel-wrap h2 {
    font-size: 20px;
    margin: 28px 0 10px;
}

.vs-egwijzer__uitleg h3 {
    font-size: 16px;
    margin: 20px 0 8px;
}

.vs-egwijzer__uitleg p,
.vs-egwijzer__tabel-wrap > p {
    font-size: 15px;
    line-height: 1.75;
    margin: 0 0 12px;
}

.vs-egwijzer__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vs-egwijzer__tabel {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 760px;
}

.vs-egwijzer__tabel th,
.vs-egwijzer__tabel td {
    border-bottom: 1px solid var(--vs-eg-line);
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
    line-height: 1.55;
}

.vs-egwijzer__tabel th {
    background: var(--vs-eg-soft);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.vs-egwijzer__tabel a {
    color: inherit;
}

.vs-egwijzer__bron {
    font-size: 12px;
    color: var(--vs-eg-grijs);
    margin: 10px 0 0;
}

@media (max-width: 640px) {
    .vs-egwijzer__kar {
        max-width: none;
    }

    .vs-egwijzer__beeld {
        width: 64px;
    }
}
