/* ==========================================================================
   AED Keuzehulp – Frontend styles
   ========================================================================== */

.aed-keuzehulp {
    max-width: 900px;
    margin: 0 auto;
    font-family: inherit;
}

/* Progress bar */
.aed-progress-wrap {
    max-width: 200px;
    margin-left: auto;
    margin-bottom: 20px;
}

.aed-progress {
    background: #e5e7eb;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.aed-progress__bar {
    height: 100%;
    background: #e63946;
    border-radius: 4px;
    transition: width 0.35s ease;
}

.aed-progress__label {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 4px 0 0;
    text-align: right;
}

.aed-step-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-top: 12px;
    border: 2px solid #d1d5db;
}
.aed-step-card h1, .aed-step-card h2, .aed-step-card h3, .aed-step-card h4 {
    color: var(--e-global-color-primary);
}

/* Step */
.aed-step {
    animation: aed-fadein 0.25s ease;
}

@keyframes aed-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aed-step-header {
    margin-bottom: 16px;
}

.aed-step__title {
    font-size: 1.5rem;
    margin: 0 0 10px;
    color: #fff;
}

.aed-step__description {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* Answer buttons */
.aed-step__answers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.aed-answer-btn {
    flex: 0 0 calc(33.333% - 8px);
    min-width: 160px;
    padding: 14px 18px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.aed-answer-img {
    max-width: 80px!important;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 8px;
    object-fit: contain;
}

.aed-answer-btn.is-selected .aed-answer-img {
    filter: brightness(0) invert(1);
}

.aed-answer-btn:hover,
.aed-answer-btn:focus {
    border-color: #e63946;
    outline: none;
}

.aed-answer-btn.is-selected {
    background: #e63946;
    border-color: #e63946;
    color: #fff;
}

/* Buttons */
.aed-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.aed-btn--primary {
    background: #e63946;
    color: #fff;
}

.aed-btn--primary:hover {
    background: #c1121f;
    color: #fff;
}

.aed-btn--secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.aed-btn--secondary:hover {
    background: #e5e7eb;
}

.aed-btn--back {
    background: none;
    color: #6b7280;
    padding: 8px 0;
    font-size: 0.9rem;
}

.aed-btn--back:hover {
    color: #111827;
}

/* Contact form */
.aed-step--contact {
    animation: aed-fadein 0.25s ease;
    position: relative;
}

/* White overlay while submitting */
.aed-submit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 4px;
    z-index: 10;
}

/* Loading spinner on button */
.aed-btn--loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.aed-btn--loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aed-spin 0.65s linear infinite;
}

@keyframes aed-spin {
    to { transform: rotate(360deg); }
}

.aed-contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aed-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aed-field label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

.aed-field .required {
    color: #e63946;
}

.aed-field input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.15s;
}

.aed-field input:focus {
    border-color: #e63946;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.aed-error {
    color: #dc2626;
    font-size: 0.9rem;
    margin: 0;
}

/* Consent checkbox */
.aed-field--consent {
    flex-direction: row;
}

.aed-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
}

.aed-field--consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
    flex: 0 0 auto;
    cursor: pointer;
}

.aed-consent__text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #374151;
}

.aed-consent__text a {
    color: #1b3c72;
    text-decoration: underline;
}

/* Result texts (below product grid) */
.aed-result-texts {
    margin-top: 32px;
}

.aed-result-text {
    margin-bottom: 24px;
}

.aed-result-text:last-child    { margin-bottom: 0; }
.aed-result-text p:first-child { margin-top: 0; }
.aed-result-text p:last-child  { margin-bottom: 0; }

/* Results */
.aed-results {
    animation: aed-fadein 0.25s ease;
    margin-top: 24px;
}


.aed-results__list {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

/* Product card — vertical, matches defibrion.com style */
.aed-product {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.aed-product__img-wrap {
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 200px;
}

.aed-product__image {
    width: 100%;
    max-width: 180px;
    height: 180px;
    object-fit: contain;
}

.aed-product__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.aed-product__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.aed-product__price {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.aed-product__price .woocommerce-Price-amount {
    color: inherit;
}

.aed-price-class {
    display: inline-block;
    white-space: nowrap;
    line-height: 0;
    vertical-align: middle;
    padding: 0;
    margin: 0;
}

.aed-price-class__icon {
    display: inline-block;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background-color: #1b3c72;
    color: #ffffff;
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.aed-price-class__icon + .aed-price-class__icon {
    margin-left: 4px;
}

.aed-results__section-title {
    margin: 28px 0 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--e-global-color-primary, #1b3c72);
}

.aed-results__section-title:first-child {
    margin-top: 0;
}

.aed-product__link {
    margin-top: auto;
    text-align: center;
    padding: 11px 20px;
    font-size: 0.95rem;
}

/* Short description (cabinets) — only ul/ol blocks survive the Scorer filter */
.aed-product__short-desc ul,
.aed-product__short-desc ol {
    margin: 0 0 8px;
    padding-left: 20px;
}
.aed-product__short-desc li {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #374151;
    margin-bottom: 4px;
}
.aed-product__short-desc li:last-child {
    margin-bottom: 0;
}

/* USP list */
.aed-product__usps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aed-usp {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #374151;
}

.aed-usp__icon {
    font-weight: 700;
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
}

.aed-usp--match .aed-usp__icon {
    color: #16a34a;
}

.aed-usp--no-match .aed-usp__icon {
    color: #dc2626;
}

/* Question tip / infobox */
.aed-question-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(228, 3, 46, 0.06);
    border-radius: 6px;
    padding: 14px 16px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
}

.aed-question-tip__icon {
    flex-shrink: 0;
    color: #E4032E;
    margin-top: 1px;
    display: flex;
}

.aed-question-tip__content {
    flex: 1;
    min-width: 0;
}

.aed-question-tip__content p {
    margin: 0;
}

.aed-question-tip__content p + p {
    margin-top: 0.5em;
}

.aed-question-tip__content a {
    color: #E4032E;
    text-decoration: underline;
}

.aed-question-tip__content a:hover {
    text-decoration: none;
}

/* Welcome screen */
.aed-step--welcome {
    text-align: left;
}

.aed-welcome__title {
    margin: 0 0 12px;
}

.aed-welcome__content {
    margin-bottom: 28px;
    font-size: 1rem;
    line-height: 1.7;
}

.aed-welcome__content p {
    margin-bottom: 20px;
}

.aed-welcome__content p:first-child {
    margin-top: 0;
}

.aed-welcome__content p:last-child {
    margin-bottom: 0;
}

.aed-welcome__actions {
    display: flex;
    justify-content: flex-start;
}

@media (max-width: 600px) {
    .aed-answer-btn {
        flex: 1 1 100%;
    }

    .aed-results__list {
        grid-template-columns: 1fr;
    }

    .aed-welcome__actions .aed-btn {
        width: 100%;
    }
}

/* Honeypot (spam-bescherming) — visueel én voor screenreaders verborgen; bots zien het veld wel in de DOM. */
.aed-field--website {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
