/* ============================================
   Chapter accordion toggle
   Kadence Table of Contents style:
   - Text on left, CSS-drawn arrow chevron on right
   - Arrow rotates to X when open (aria-expanded="true")
   - Uses Kadence CSS variables for theme adaptation
   ============================================ */

.fa-chapters-header {
    width: 100%;
    margin: 0;
    padding: 0;
}

.fa-chapters-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: var(--global-palette3, #f8f8f8);
    padding: 0;
    margin: 0;
    text-align: left;
}

.fa-chapters-toggle-text {
    font-size: 110%;
    font-weight: bold;
    flex: 1;
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* CSS-drawn arrow chevron — matches Kadence TOC icon-trigger */
.fa-chapters-toggle-icon-trigger {
    display: block;
    height: 24px;
    width: 24px;
    min-width: 24px;
    margin-left: auto;
    position: relative;
    transition: all ease-in-out 0.2s;
}

.fa-chapters-toggle-icon-trigger::before,
.fa-chapters-toggle-icon-trigger::after {
    content: "";
    position: absolute;
    background-color: currentColor;
    height: 2px;
    width: 12px;
    top: 11px;
    transition: all ease-in-out 0.1333333333s;
}

.fa-chapters-toggle-icon-trigger::before {
    left: 2px;
    transform: rotate(45deg);
    transform-origin: 50%;
}

.fa-chapters-toggle-icon-trigger::after {
    right: 2px;
    transform: rotate(-45deg);
    transform-origin: 50%;
}

/* Rotate to X when open */
.fa-chapters-toggle[aria-expanded="true"] .fa-chapters-toggle-icon-trigger::before {
    transform: rotate(-45deg);
}

.fa-chapters-toggle[aria-expanded="true"] .fa-chapters-toggle-icon-trigger::after {
    transform: rotate(45deg);
}

/* ============================================
   Chapter accordion list
   ============================================ */
.fa-chapters-list {
    margin-top: 0.5rem;
}

.fa-chapters-closed {
    display: none;
}

.fa-chapters-open {
    display: block;
}

.fa-chapters-list-inner {
    padding-left: 1.75em;
    list-style: disc;
    margin: 0;
}

.fa-chapter-item {
    margin-bottom: 0.5rem;
    list-style: disc;
}

.fa-chapter-link {
    color: var(--global-palette3, #f8f8f8);
    text-decoration: none;
    font-size: 0.9375rem;
    display: inline-block;
    transition: color 0.1s linear;
}

.fa-chapter-link:hover,
.fa-chapter-link:focus-visible {
    color: var(--global-palette-highlight, var(--global-palette1, #4281A4));
    text-decoration: underline;
    text-underline-offset: 0.25em;
    outline: 0;
}

.fa-chapter-time {
    color: var(--global-palette5, #878787);
    font-size: 0.8rem;
    margin-left: 0.5em;
}

/* ============================================
   Audio player — no card outline/border
   Blends into content; no white box
   ============================================ */
.fa-player-wrapper {
    margin: 1rem 0 2rem 0;
    padding: 0;
    border: none;
    box-shadow: none;
    outline: none;
    background: transparent;
}

.fa-player {
    width: 100%;
    display: block;
}