/* Shared presentation for native disclosures. Each component keeps its own content and grouping. */
:is(.aku-audit-faq-list, .aku-faq-columns-grid, .aku-case-process-list, .aku-seo-scope-list, .aku-service-catalog-categories) {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: clip;
    border: 1px solid #bed4d6;
    border-radius: 18px;
    background: #fff;
}

.aku-faq-columns-grid > .aku-faq-column {
    border: 0;
    border-radius: 0;
}

:is(.aku-audit-faq-item, .aku-case-process-step, .aku-seo-scope-step, .aku-service-catalog-category) {
    min-width: 0;
    margin: 0 !important;
}

:is(.aku-audit-faq-item, .aku-faq-column, .aku-case-process-step, .aku-seo-scope-step, .aku-service-catalog-category)
+ :is(.aku-audit-faq-item, .aku-faq-column, .aku-case-process-step, .aku-seo-scope-step, .aku-service-catalog-category) {
    border-top: 1px solid #d3e3e3;
}

:is(.aku-audit-faq-item, .aku-case-process-step, .aku-seo-scope-step, .aku-service-catalog-category, .aku-seo-price-factors__grid > details) {
    --accordion-inset: clamp(16px, 2vw, 30px);

    & > summary {
        position: relative;
        box-sizing: border-box;
        min-width: 0;
        padding-inline-end: calc(var(--accordion-inset) + 48px);
        list-style: none;
        cursor: pointer;
        overflow-wrap: anywhere;
    }

    & > summary::-webkit-details-marker { display: none; }

    & > summary::before,
    & > summary::after {
        content: '';
        position: absolute;
        top: 50%;
        pointer-events: none;
    }

    & > summary::after {
        inset-inline-end: var(--accordion-inset);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #e8f4f2;
        transform: translateY(-50%);
    }

    & > summary::before {
        z-index: 1;
        inset-inline-end: calc(var(--accordion-inset) + 12px);
        box-sizing: border-box;
        width: 8px;
        height: 8px;
        border: solid #215e66;
        border-width: 0 2px 2px 0;
        transform: translateY(-70%) rotate(45deg);
    }

    &[open] { background: #f2f8f6; }
    &[open] > summary { color: #195a62; }
    &[open] > summary::after { background: #bde3de; }
    &[open] > summary::before { transform: translateY(-30%) rotate(225deg); }

    & > summary:focus-visible {
        outline: 3px solid #397580;
        outline-offset: -4px;
    }

    @media (hover: hover) {
        & > summary:hover { background: #eaf5f2; }
    }

    @media (prefers-reduced-motion: no-preference) {
        & > summary::before { transition: transform .22s ease; }
    }
}

@supports selector(details::details-content) and (interpolate-size: allow-keywords) {
    @media (prefers-reduced-motion: no-preference) {
        details:is(.aku-audit-faq-item, .aku-case-process-step, .aku-seo-scope-step, .aku-service-catalog-category, .aku-seo-price-factors__grid > details) {
            &::details-content {
                interpolate-size: allow-keywords;
                block-size: 0;
                overflow: clip;
                transition: block-size .28s ease, content-visibility .28s allow-discrete;
            }

            &[open]::details-content { block-size: auto; }

            /* Keep these answers laid out while the native details content closes. */
            &:not([open]) > :is(.aku-audit-faq-answer, .aku-audit-faq-copy, .aku-seo-scope-body) { display: grid !important; }
        }
    }
}
