/**
 * TOC Accordion Styles für Rank Math
 * myLandingpage.ai Branding mit Elementor Farben
 */

.toc-accordion-header {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: var(--e-global-color-primary) !important;
    color: var(--e-global-color-text) !important;
    padding: 10px 16px;
    font-size: 1.1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    margin-bottom: 0;
    transition: all 0.3s ease;
    gap: 8px;
}

/* Hover-Zustand */
.toc-accordion-header:hover {
    background-color: var(--e-global-color-accent) !important;
    color: var(--e-global-color-secondary) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Aktiver/Geöffneter Zustand */
.toc-accordion-header[aria-expanded="true"] {
    background-color: var(--e-global-color-accent) !important;
    color: var(--e-global-color-secondary) !important;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Pfeil-Icon */
.toc-arrow {
    font-size: 1.2em;
    display: inline-block;
    width: 1.5em;
    text-align: center;
    transition: transform 0.3s ease;
}

/* Pfeil-Rotation beim Öffnen */
.toc-accordion-header[aria-expanded="true"] .toc-arrow {
    transform: rotate(90deg);
}

/* Titel-Text */
.toc-title-text {
    flex: 1;
    font-weight: 600;
}

/* Rank Math TOC Container */
#rank-math-toc nav {
    margin-top: 0;
    border-top: none;
    transition: all 0.3s ease;
}

/* Links im geöffneten Zustand */
.toc-accordion-header[aria-expanded="true"] + nav {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 10px;
    background-color: #f9f9f9;
}

/* Link-Hover innerhalb des TOC */
#rank-math-toc nav a:hover {
    color: var(--e-global-color-accent) !important;
    text-decoration: underline;
}

/* Focus-Zustand für Barrierefreiheit */
.toc-accordion-header:focus {
    outline: 2px solid var(--e-global-color-accent);
    outline-offset: 2px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .toc-accordion-header {
        font-size: 1em;
        padding: 8px 12px;
    }
    
    .toc-title-text {
        font-size: 0.95em;
    }
}
