/**
 * FAQ Accordion Block Styles
 */

.faq-accordion {
    margin: 2rem 0;
}

.faq-accordion-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.faq-item:first-child {
    border-top: 1px solid #e0e0e0;
}

.faq-question-wrapper {
    margin: 0;
    padding: 0;
}

.faq-question-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
}

.faq-question-button:hover,
.faq-question-button:focus,
.faq-question-button:active {
    background-color: transparent;
    color: #000000;
}

.faq-question-text {
    flex: 1;
    padding-right: 1rem;
}

.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: transform 0.3s ease;
}

.faq-icon-open {
    display: none;
}

.faq-question-button[aria-expanded="true"] .faq-icon-closed {
    display: none;
}

.faq-question-button[aria-expanded="true"] .faq-icon-open {
    display: block;
}

.faq-answer-wrapper {
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
}

.faq-answer-wrapper[hidden] {
    display: none;
}

.faq-answer-content {
    padding: 0 1rem 1.5rem 1rem;
    color: #4a4a4a;
    line-height: 1.6;
}

.faq-answer-content p {
    margin: 0 0 1rem 0;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.faq-answer-content li {
    margin-bottom: 0.5rem;
}

/* Admin preview styles */
.acf-block-preview .faq-accordion {
    pointer-events: none;
}

.acf-block-preview .faq-question-button {
    cursor: default;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-question-button {
        font-size: 1rem;
        padding: 1rem 0.75rem;
    }

    .faq-answer-content {
        padding: 0 0.75rem 1.25rem 0.75rem;
    }
}

/* Print styles */
@media print {
    .faq-question-button {
        pointer-events: none;
    }

    .faq-answer-wrapper {
        display: block !important;
    }

    .faq-icon {
        display: none;
    }
}
