/* =============================================================================
   poll.css — Stichting Autobelangen Poll
   ============================================================================= */

/* === Tokens ================================================================ */
:root {
    --c-primary:       #0070b9;
    --c-primary-dark:  #005a94;
    --c-primary-light: #e8f4fc;
    --c-accent:        #e63946;
    --c-dark:          #0c1420;
    --c-gray-50:       #f8f9fb;
    --c-gray-100:      #f0f2f5;
    --c-gray-200:      #e2e5ea;
    --c-gray-300:      #c8cdd6;
    --c-gray-400:      #9ca3af;
    --c-gray-500:      #6b7280;
    --c-gray-700:      #374151;
    --c-white:         #ffffff;

    --radius-sm:   4px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    --shadow-card: 0 1px 2px rgba(0,0,0,.05), 0 4px 12px rgba(0,0,0,.05), 0 20px 48px rgba(0,0,0,.07);
    --shadow-btn:  0 1px 2px rgba(0,0,0,.08), 0 2px 8px rgba(0,112,185,.18);
    --shadow-blue: 0 4px 20px rgba(0,112,185,.38);

    --ease:     cubic-bezier(.4,0,.2,1);
    --ease-out: cubic-bezier(0,0,.2,1);
}

/* === Reset ================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--c-dark);
    background: #eaecf0;
    background-image: radial-gradient(ellipse 90% 50% at 50% -5%, rgba(0,112,185,.08) 0%, transparent 65%);
    min-height: 100dvh;
}

a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }

/* === Pagina ================================================================ */
.poll-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.25rem;
}
@media (max-width: 540px) {
    .poll-page { align-items: flex-start; padding: 2.25rem 1rem 3.5rem; }
}

.poll-column {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.poll-logo-link { display: block; text-decoration: none; }
.poll-logo-img  {
    height: 48px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.12));
    transition: filter 200ms ease, transform 200ms ease;
}
.poll-logo-link:hover .poll-logo-img {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.16));
    transform: translateY(-1px);
}
@media (max-width: 540px) { .poll-logo-img { height: 38px; } }

.poll-main { width: 100%; }

.poll-footer {
    text-align: center;
    font-size: .8125rem;
    color: var(--c-gray-400);
}

/* === Card ================================================================== */
.poll-card {
    background: var(--c-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0,0,0,.05);
    padding: 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.375rem;
}
@media (max-width: 540px) {
    .poll-card { padding: 1.625rem 1.25rem; border-radius: var(--radius-lg); gap: 1.125rem; }
}
@media (max-width: 380px) {
    .poll-card { padding: 1.375rem 1rem; }
    .poll-card__title { font-size: 1.3125rem; }
}

/* === Iconen ================================================================ */
.poll-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.poll-icon svg { width: 22px; height: 22px; }

.poll-icon--pending { background: #dbeafe; color: #1d6fb8; }
.poll-icon--check   { background: #dbeafe; color: #1d6fb8; }
.poll-icon--success { background: #d1fae5; color: #059669; }
.poll-icon--neutral { background: var(--c-gray-100); color: var(--c-gray-500); }

/* === Typografie ============================================================ */
.poll-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-dark);
    line-height: 1.2;
    letter-spacing: -.03em;
}
.poll-card__question {
    font-size: .9375rem;
    color: var(--c-gray-500);
    margin-top: .25rem;
    line-height: 1.5;
}
.poll-card__body {
    font-size: .9375rem;
    color: var(--c-gray-700);
    line-height: 1.7;
}

/* === Header: icoon + tekst naast elkaar =================================== */
/* Gebruikt door: confirm_prompt, confirmed, already_*, welkom */
.poll-card-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
}
.poll-card-header__text { flex: 1; min-width: 0; }
.poll-card-header__text .poll-card__title { margin-top: .15rem; }
.poll-card-header__text .poll-card__question { margin-top: .25rem; }

/* Legacy alias (bestaande views) */
.poll-confirmed-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
}
.poll-confirmed-header > div { flex: 1; min-width: 0; }
.poll-confirmed-header .poll-icon { flex-shrink: 0; margin-top: .15rem; }

/* Prompt header variant (confirm_prompt view) */
.poll-prompt-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
}
.poll-prompt-header__text { flex: 1; min-width: 0; }
.poll-prompt-header__text .poll-card__title { margin-top: .15rem; }

/* === Divider =============================================================== */
.poll-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--c-gray-400);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.poll-divider::before,
.poll-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--c-gray-200);
}

/* === Keuze badge (klein, inline) ========================================== */
.poll-answer-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .8rem;
    border-radius: var(--radius-full);
    font-size: .875rem;
    font-weight: 700;
    width: fit-content;
    margin-top: .375rem;
}
.answer-yes { background: #d1fae5; color: #065f46; }
.answer-no  { background: #fee2e2; color: #991b1b; }

/* === Keuzeweergave (groot blok op confirm pagina) ========================= */
.poll-choice-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 2px solid;
}
.poll-choice-display--yes { background: #f0fdf4; border-color: #86efac; }
.poll-choice-display--no  { background: #fff5f5; border-color: #fca5a5; }

.poll-choice-display__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.poll-choice-display--yes .poll-choice-display__icon { background: #dcfce7; color: #16a34a; }
.poll-choice-display--no  .poll-choice-display__icon { background: #fee2e2; color: #dc2626; }
.poll-choice-display__icon svg { width: 20px; height: 20px; }

.poll-choice-display__label { display: flex; flex-direction: column; gap: .15rem; }
.poll-choice-display__answer {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.15;
}
.poll-choice-display--yes .poll-choice-display__answer { color: #14532d; }
.poll-choice-display--no  .poll-choice-display__answer { color: #7f1d1d; }
.poll-choice-display__sub {
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.4;
    opacity: .65;
}

/* === Knoppen =============================================================== */
.poll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .875rem 1.75rem;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    min-height: 52px;
    letter-spacing: -.01em;
    transition: background 160ms var(--ease), border-color 160ms var(--ease),
                box-shadow 160ms var(--ease), transform 80ms var(--ease);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.poll-btn:active { transform: translateY(1px); }
.poll-btn:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; }

.poll-btn--primary {
    background: var(--c-primary);
    color: var(--c-white);
    border-color: var(--c-primary);
    box-shadow: var(--shadow-btn);
}
.poll-btn--primary:hover {
    background: var(--c-primary-dark);
    border-color: var(--c-primary-dark);
    box-shadow: var(--shadow-blue);
    color: var(--c-white);
    text-decoration: none;
    transform: translateY(-1px);
}
.poll-btn--primary:active { transform: translateY(0); box-shadow: var(--shadow-btn); }
.poll-btn--primary:disabled {
    background: var(--c-gray-300);
    border-color: var(--c-gray-300);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.poll-btn--outline {
    background: var(--c-gray-50);
    color: var(--c-gray-700);
    border-color: var(--c-gray-200);
}
.poll-btn--outline:hover {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
    color: var(--c-primary-dark);
    text-decoration: none;
}

.poll-btn--full { width: 100%; }

.poll-btn--yes {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    box-shadow: 0 2px 8px rgba(22,163,74,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}
.poll-btn--yes:hover {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22,163,74,.35);
}

.poll-btn--no {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220,38,38,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}
.poll-btn--no:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,.35);
}

@media (max-width: 540px) {
    .poll-btn { min-height: 56px; font-size: 1rem; }
}

.poll-btn-group { display: flex; flex-direction: column; gap: .5rem; }

/* === Gewijzigd notice ====================================================== */
.poll-changed-notice {
    display: inline-block;
    font-size: .6875rem;
    font-weight: 700;
    color: #065f46;
    background: #d1fae5;
    border-radius: var(--radius-full);
    padding: .175rem .625rem;
    margin-bottom: .25rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* === Formulier ============================================================= */
.poll-form { display: flex; flex-direction: column; gap: .875rem; }

.poll-form__label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--c-gray-700);
    margin-bottom: .375rem;
}

.poll-form__row { display: flex; gap: .5rem; }
.poll-form__row .poll-form__input { flex: 1; min-width: 0; }
.poll-form__row .poll-btn { flex-shrink: 0; }
@media (max-width: 420px) {
    .poll-form__row { flex-direction: column; }
    .poll-form__row .poll-btn { width: 100%; }
}

.poll-form__input {
    width: 100%;
    padding: .75rem 1rem;
    font-family: inherit;
    font-size: .9375rem;
    color: var(--c-dark);
    background: var(--c-gray-50);
    border: 1.5px solid var(--c-gray-200);
    border-radius: var(--radius-md);
    min-height: 52px;
    transition: border-color 150ms, box-shadow 150ms, background 150ms;
    -webkit-appearance: none;
}
.poll-form__input:focus {
    outline: none;
    background: var(--c-white);
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(0,112,185,.12);
}
.poll-form__input::placeholder { color: var(--c-gray-300); }

.poll-form__error {
    font-size: .8125rem;
    color: var(--c-accent);
    font-weight: 500;
    min-height: 1.2em;
    margin-top: .125rem;
}

.poll-form__success {
    align-items: center;
    gap: .75rem;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: .875rem 1.125rem;
    color: #065f46;
    font-weight: 600;
    font-size: .9375rem;
}
.poll-form__success:not([hidden]) { display: flex; }
.poll-form__success svg { width: 20px; height: 20px; flex-shrink: 0; }

.poll-form__error-msg:not([hidden]) { display: block; }
.poll-form__error-msg {
    background: #fff5f5;
    border: 1.5px solid #fecaca;
    border-radius: var(--radius-md);
    padding: .875rem 1rem;
    color: #991b1b;
    font-size: .875rem;
    font-weight: 500;
}

/* === Nieuwsbrief =========================================================== */
.poll-newsletter { display: flex; flex-direction: column; gap: .875rem; }
.poll-newsletter__intro { font-size: .9375rem; color: var(--c-gray-700); line-height: 1.65; }

/* === CTA kaarten =========================================================== */
.poll-ctas { display: flex; flex-direction: column; gap: .5rem; }

.poll-cta-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .875rem;
    padding: .875rem 1rem;
    border: 1.5px solid var(--c-gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--c-dark);
    background: var(--c-gray-50);
    transition: border-color 150ms, box-shadow 150ms, background 150ms, transform 100ms;
}
.poll-cta-card:hover {
    border-color: var(--c-gray-300);
    background: var(--c-white);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transform: translateY(-1px);
    color: var(--c-dark);
    text-decoration: none;
}
.poll-cta-card:active { transform: translateY(0); }

/* Calculator kaart: blauw accent */
.poll-cta-card--blue {
    background: var(--c-primary-light);
    border-color: #bfdbf7;
}
.poll-cta-card--blue:hover {
    background: #d8edf9;
    border-color: var(--c-primary);
    box-shadow: 0 2px 8px rgba(0,112,185,.12);
}

/* Icon box */
.poll-cta-card__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.poll-cta-card__icon svg { width: 19px; height: 19px; }
.poll-cta-card__icon--blue { background: #dbeafe; color: #1d6fb8; }
.poll-cta-card__icon--gray { background: var(--c-gray-200); color: var(--c-gray-500); }

/* Logo box (calculator) */
.poll-cta-card__logo-box {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(0,112,185,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.poll-cta-card__logo { width: 32px; height: 32px; object-fit: contain; display: block; }

/* Tekst */
.poll-cta-card__text { flex: 1; min-width: 0; }
.poll-cta-card__text strong {
    display: block;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--c-dark);
    line-height: 1.3;
}
.poll-cta-card__text span {
    font-size: .8125rem;
    color: var(--c-gray-500);
    line-height: 1.4;
}

/* Pijl */
.poll-cta-card__arrow {
    width: 15px;
    height: 15px;
    color: var(--c-gray-300);
    flex-shrink: 0;
    transition: color 150ms, transform 180ms var(--ease-out);
}
.poll-cta-card:hover .poll-cta-card__arrow {
    color: var(--c-gray-500);
    transform: translateX(3px);
}
.poll-cta-card--blue:hover .poll-cta-card__arrow { color: var(--c-primary); }

/* === Modal ================================================================= */
.poll-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12,20,32,.5);
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 100;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.poll-modal-backdrop:not([hidden]) { display: flex; }

.poll-modal {
    background: var(--c-white);
    border-radius: var(--radius-xl);
    padding: 2rem 1.875rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    animation: modalIn 200ms var(--ease-out);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.96) translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.poll-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-gray-100);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--c-gray-500);
    transition: background 150ms, color 150ms;
}
.poll-modal__close:hover { background: var(--c-gray-200); color: var(--c-dark); }
.poll-modal__close svg { width: 14px; height: 14px; }

.poll-modal__title {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--c-dark);
    letter-spacing: -.02em;
    padding-right: 2rem;
}
.poll-modal__body { font-size: .9375rem; color: var(--c-gray-700); line-height: 1.6; }
.poll-modal__actions { display: flex; flex-direction: column; gap: .5rem; margin-top: .25rem; }

@media (max-width: 400px) {
    .poll-cta-card__text strong { font-size: .875rem; }
    .poll-cta-card__text span   { font-size: .75rem; }
    .poll-cta-card { padding: .75rem .875rem; gap: .75rem; }
}