/*
 * Collapsible sections styled like the legacy site's accordion.js widget
 * (legacy Content/accordion.css, Accordion v3.3.0 by Michał Strumpf, MIT).
 *
 * Built on native <details>/<summary> instead of the legacy script: inline <script> tags don't
 * run after Blazor's enhanced navigation, and <details> needs no JavaScript. Each section opens
 * and closes on its own, as legacy's separately-initialized accordions did.
 *
 * Markup:
 *   <details class="ac">
 *     <summary class="ac-trigger"><h2 class="ac-header">Title</h2></summary>
 *     <div class="ac-panel">...</div>
 *   </details>
 */

.ac {
    margin-top: 10px;
    border: 1px solid #eee;
    background-color: #fff;
    box-sizing: border-box;
}

.ac > .ac-trigger {
    font: bold 16px "Arial", sans-serif;
    color: #111;
    text-align: left;
    padding: 10px 30px 10px 10px;
    display: block;
    cursor: pointer;
    position: relative;
    list-style: none;
    transition: color 0.25s ease;
}

/* Hide the browser's own disclosure triangle; the +/– marker below replaces it. */
.ac > .ac-trigger::-webkit-details-marker {
    display: none;
}

.ac > .ac-trigger::after {
    content: "+";
    text-align: center;
    width: 15px;
    transform: translate(0, -50%);
    position: absolute;
    right: 10px;
    top: 50%;
}

.ac[open] > .ac-trigger::after {
    content: "–";
}

.ac > .ac-trigger:focus {
    color: #8a8a8a;
}

/* The heading inside <summary> keeps the section in the page outline for screen readers
   but takes the trigger's look rather than the browser's large h2 style. */
.ac > .ac-trigger > .ac-header {
    font: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
    display: inline;
}

.ac > .ac-panel {
    font: 15px/24px "Arial", sans-serif;
    color: #111;
    padding: 10px;
}

.ac > .ac-panel p:last-child {
    margin-bottom: 0;
}
