/* ==========================================================================
   ACCORDION BLOCK
   ========================================================================== */

/* Individual accordion item wrapper */
.block-accordions .accordion { margin-bottom: 10px; }

/* -------------------------------------------------------------------------
   TRIGGER BUTTON
   The trigger is a <button> for native keyboard and AT support.
   We reset browser button styles then apply Toast accordion styling.
   ------------------------------------------------------------------------- */
.block-accordions .accordion .accordion-title {
    /* Reset default <button> browser styles */
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    width: 100%;

    /* Toast accordion styles */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--brand-2);
    color: #fff;
    padding: 1rem 1.5rem 1rem 4.5rem;
    cursor: pointer;
    transition: background-color 0.25s;
    position: relative;
}

/* Active (open) state */
.block-accordions .accordion.active .accordion-title { background-color: var(--brand-1); }

/* Focus ring - visible only for keyboard users, not mouse users */
.block-accordions .accordion .accordion-title:focus { outline: none; }
.block-accordions .accordion .accordion-title:focus-visible {
    outline: 3px solid var(--brand-1);
    outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   +/- ICON
   Two pseudo-elements on a dedicated <span aria-hidden="true"> inside the
   button. aria-hidden keeps it out of the AT tree.
   ------------------------------------------------------------------------- */
.block-accordions .accordion-icon {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Horizontal bar - always visible */
.block-accordions .accordion-icon::after {
    content: '';
    width: 20px;
    height: 3px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* Vertical bar - fades out when open */
.block-accordions .accordion-icon::before {
    content: '';
    width: 20px;
    height: 3px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(90deg);
    transition: opacity 0.25s, transform 0.25s;
}
.block-accordions .accordion.active .accordion-icon::before {
    opacity: 0;
    transform: translateY(-50%) rotate(0deg);
}

/* -------------------------------------------------------------------------
   CONTENT PANEL
   Height is animated by JS between 0 and a measured pixel value.
   `overflow: hidden` must stay on at all times so the content is clipped
   during the transition. Do NOT set overflow: visible when open - if the
   panel's height is ever `auto` and we try to close it, the browser cannot
   transition from auto to 0 and `transitionend` may not fire.
   ------------------------------------------------------------------------- */
.block-accordions .accordion .accordion-content {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    background: var(--brand-8);
}

/* Inner padding wrapper - this is what JS measures for the target height */
.block-accordions .accordion .accordion-content-padding { padding: var(--grid-gap); }

/* Multi-column grid inside accordion content */
.block-accordions .accordion-column-count { display: grid; grid-gap: var(--grid-gap); }