/*
 * Sowecare keuzehulp - opmaak op de tokens van het Sowecare-theme.
 * Donkerblauwe band (zoals de CTA-blokken van de site), witte antwoordkaarten.
 */

/* Verberg plugin license-warning (dev-mode zonder licentie) */
body .aw-notice-license-error {
    display: none !important;
}


/* Wrapper: rood achtergrond (sowecare-huisstijl) */
body .velo-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    font-family: var(--font-body);
    border: none;
    border-radius: var(--r-lg);
    background: var(--ink);
    box-shadow: var(--shadow-md);
    max-width: 1100px;
    overflow: visible;
    text-align: left;
    color: #fff;
    /* Voorkomt overlap tussen back-knop en H2: elk direct child op eigen regel */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Vraag-titel: wit op rood, wit accent-line */
body .velo-wrapper h2.velo-title-steps {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px;
    padding: 0 0 0 14px;
    border-left: 4px solid #fff;
    color: #fff;
    text-align: left;
    line-height: 1.35;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Terug-knop: wit-op-transparent op rode wrapper */
body .velo-wrapper button.velo-frontend-back-button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    margin: 0 0 20px;
    align-self: flex-start;
    position: static !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 80px;
    transition: all 0.2s ease;
}
body .velo-wrapper button.velo-frontend-back-button:hover {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

/* Cards-grid, override plugin flex-layout */
body .velo-wrapper .velo-choices-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 16px !important;
    flex: none !important;
    align-items: stretch;
}

/* Individuele antwoord-card: wit-op-rood, hover met verhoogde shadow */
body .velo-wrapper .velo-inner-choice {
    flex: unset !important;
    margin: 0 !important;
    min-height: 120px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--r-md);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
body .velo-wrapper .velo-inner-choice:hover {
    border: 2px solid #fff !important;
    padding: 20px 16px !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}
body .velo-wrapper .velo-inner-choice .velo-choice-image {
    max-width: 100%;
    max-height: 140px;
    height: auto;
    border-radius: var(--r-sm);
    object-fit: contain;
}
body .velo-wrapper .velo-inner-choice .velo-result-choice-title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
}

/* Loading-state van plugin overschrijven */
body .velo-wrapper .velo-loading {
    display: flex !important;
    justify-content: center;
    gap: 6px;
    padding: 40px 0;
    position: static !important;
    width: auto !important;
    height: auto !important;
}
body .velo-wrapper .velo-loading div {
    position: static !important;
    left: auto !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50%;
    background: #fff;
    opacity: 0.4;
    animation: aw-velo-pulse 1.4s ease-in-out infinite;
}
body .velo-wrapper .velo-loading div:nth-child(2) { animation-delay: 0.2s; }
body .velo-wrapper .velo-loading div:nth-child(3) { animation-delay: 0.4s; }

@keyframes aw-velo-pulse {
    0%, 80%, 100% { opacity: 0.4; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* Eind-scherm titel + card-grid */
body .velo-wrapper h2.velo-title-all-results {
    font-family: var(--font-body);
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin: 8px 0 24px;
    border: none;
    padding: 0;
    color: #fff;
}
body .velo-wrapper .velo-final-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 24px !important;
    margin-bottom: 40px;
    justify-items: center;
}
body .velo-wrapper .velo-final-items a.velo-inner-choice {
    max-width: 320px;
    width: 100%;
}

/* Waarom-tekst-blok (geïnjecteerd door JS): wit-op-rood met wit accent */
body .aw-keuzehulp-why {
    max-width: 720px;
    margin: 24px auto;
    padding: 24px 28px;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #fff;
    border-radius: var(--r-sm);
}
body .aw-keuzehulp-why h3 {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #fff;
}
body .aw-keuzehulp-why p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    color: #fff;
}

/* CTA-blok (geïnjecteerd door JS) */
body .aw-keuzehulp-cta {
    max-width: 720px;
    margin: 20px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
body .aw-keuzehulp-cta a {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: all 0.2s ease;
    text-align: center;
    flex: 1 1 200px;
    display: inline-block;
}
/* Primary CTA: wit met rode tekst (contrast op rode wrapper) */
body .aw-keuzehulp-cta .aw-keuzehulp-cta-primary {
    background: #fff;
    color: var(--ink);
}
body .aw-keuzehulp-cta .aw-keuzehulp-cta-primary:hover {
    background: var(--ink);
    color: #fff;
}
/* Secondary CTA: outline-only wit */
body .aw-keuzehulp-cta .aw-keuzehulp-cta-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}
body .aw-keuzehulp-cta .aw-keuzehulp-cta-secondary:hover {
    background: #fff;
    color: var(--ink);
}

/* Responsive */
@media (max-width: 767px) {
    body .velo-wrapper {
        padding: 20px 16px 32px;
        border-radius: var(--r-md);
    }
    body .velo-wrapper h2.velo-title-steps {
        font-size: 20px;
    }
    body .velo-wrapper .velo-choices-wrapper,
    body .velo-wrapper .velo-final-items {
        grid-template-columns: 1fr !important;
    }
    body .aw-keuzehulp-cta a {
        flex: 1 1 100%;
    }
}

/* Koppen in de display-letter van de site */
body .velo-wrapper h2.velo-title-steps,
body .velo-wrapper h2.velo-title-all-results {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--fs-h3);
    letter-spacing: -.01em;
    border-left-color: var(--red);
}
body .velo-wrapper .velo-inner-choice {
    color: var(--ink);
    border-radius: var(--r-md);
}
body .velo-wrapper .velo-inner-choice:hover {
    border-color: var(--brand-4) !important;
}
body .velo-wrapper .velo-inner-choice .velo-result-choice-title {
    font-family: var(--font-head);
    font-weight: 600;
}
body .velo-wrapper button.velo-frontend-back-button {
    border-radius: var(--r-pill);
    padding: .55em 1.2em;
    font-family: var(--font-head);
    font-weight: 600;
}
body .velo-wrapper button.velo-frontend-back-button:hover {
    color: var(--ink);
}
body .aw-keuzehulp-why {
    background: var(--band-inset, rgba(255,255,255,.08));
    border-left-color: var(--red);
    border-radius: var(--r-md);
}
body .aw-keuzehulp-why h3 {
    font-family: var(--font-head);
}
body .aw-keuzehulp-cta {
    gap: .8rem;
}
body .aw-keuzehulp-cta a.btn {
    flex: 0 1 auto;
    padding: .95em 1.6em;
    border-radius: var(--r-pill);
    justify-content: center;
}

/* Adviesformulier na de keuzehulp: knop in de vorm van de site */
.aw-kh-advies .gform_wrapper .gform_footer .gform_button {
    background: var(--red);
    color: #fff;
    border: 0;
    border-radius: var(--r-pill);
    padding: .95em 1.6em;
    font-family: var(--font-head);
    font-weight: 600;
}
.aw-kh-advies .gform_wrapper .gform_footer .gform_button:hover {
    background: var(--red-deep);
}
.aw-kh-advies .gform_wrapper {
    --gf-color-primary: var(--brand) !important;
    --gf-color-primary-rgb: 49, 62, 136 !important;
    --gf-ctrl-border-color: var(--line-strong);
    --gf-ctrl-radius: var(--r-sm);
}

/* Mobiel: compacte antwoordkaarten, zodat alle antwoorden in beeld passen. */
@media (max-width: 767px) {
    body .velo-wrapper .velo-inner-choice,
    body .velo-wrapper .velo-inner-choice:hover {
        min-height: 0;
        padding: 14px 16px !important;
        transform: none;
    }
    body .velo-wrapper .velo-choices-wrapper {
        gap: 10px !important;
    }
    body .aw-keuzehulp-cta a.btn {
        flex: 1 1 100%;
    }
}
