/* FAQ accordion based on native details/summary: keyboard and screen reader accessible without JavaScript */

/*
 * The element may sit directly in a Bootstrap .row (flex container) without a column class.
 * A flex item without a fixed basis takes the width of its content: narrow while all questions
 * are closed, full width once a long answer is open. Always use the full row width.
 */
.row > .frame-type-amjsp_faq {
    flex: 0 0 100%;
    max-width: 100%;
}

.frame-type-amjsp_faq,
.faq-accordion,
.faq-accordion__item {
    width: 100%;
}

.faq-accordion {
    margin: 0 0 30px;
    border-top: 1px solid #e3e3e3;
}

.faq-accordion__item {
    border-bottom: 1px solid #e3e3e3;
}

.faq-accordion__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    cursor: pointer;
    list-style: none;
}

.faq-accordion__summary::-webkit-details-marker {
    display: none;
}

.faq-accordion__summary::after {
    content: "+";
    flex: 0 0 auto;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: #ef8007;
    transition: transform 0.2s ease;
}

.faq-accordion__item[open] > .faq-accordion__summary::after {
    transform: rotate(45deg);
}

.faq-accordion__summary:hover .faq-accordion__question {
    color: #ef8007;
}

.faq-accordion__summary:focus-visible {
    outline: 2px solid #ef8007;
    outline-offset: 4px;
}

.faq-accordion__question {
    margin: 0;
}

.faq-accordion__answer {
    padding: 0 40px 16px 0;
}

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

@media (prefers-reduced-motion: reduce) {
    .faq-accordion__summary::after {
        transition: none;
    }
}
