/*
 * FAQ-accordion.
 *
 * Bouwt voort op de Foundation-accordion die al in legacy-theme.css zit (.accordion,
 * .accordion-item, .accordion-title, .accordion-content) en op de Foundation-plugin in
 * legacy-theme.js. Hier staan alleen de afwijkingen van de Foundation-defaults, want die zijn
 * qua typografie en kleur niet die van deze site.
 *
 * Wordt na legacy-theme.css geladen, zie Hamaka\Page\PageController::loadRequirements().
 * Zie llm/docs/knowledge/frontend/legacy-theme-restore.md voor waarom dit een los bestand is.
 */

.faq-section {
    padding: 25px 0;
}

@media print, screen and (min-width: 40em) {
    .faq-section {
        padding: 50px 0;
    }
}

.faq-accordion {
    background: transparent;
    margin-bottom: 0;
}

.faq-accordion__item + .faq-accordion__item {
    margin-top: 8px;
}

.faq-accordion__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    padding: 1rem 3rem 1rem 1.25rem;
    border: 1px solid #e6e6e6;
    background-color: #fefefe;
    color: #0a0a0a;
    transition: background-color .2s ease-out, border-color .2s ease-out;
}

.faq-accordion__title:hover,
.faq-accordion__title:focus {
    background-color: #f7f7f7;
    border-color: #cacaca;
    color: #0a0a0a;
}

.faq-accordion__item.is-active > .faq-accordion__title {
    background-color: #ffcf00;
    border-color: #ffcf00;
}

/* Foundation zet hier een + / – tekstteken neer; vervangen door een chevron die meedraait. */
.faq-accordion__title::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 1.25rem;
    width: .6rem;
    height: .6rem;
    margin-top: -.4rem;
    border-right: 2px solid #0a0a0a;
    border-bottom: 2px solid #0a0a0a;
    transform: rotate(45deg);
    transition: transform .2s ease-out;
}

.faq-accordion__item.is-active > .faq-accordion__title::before {
    /* Foundation zet via .is-active>.accordion-title een '-' terug; die wint anders op specificiteit. */
    content: "";
    margin-top: -.15rem;
    transform: rotate(225deg);
}

.faq-accordion__content {
    padding: 1.25rem;
    border: 1px solid #e6e6e6;
    border-top: 0;
    background-color: #fefefe;
    color: #0a0a0a;
}

.faq-accordion__content > :last-child {
    margin-bottom: 0;
}
