/* Simple AI FAQ — Front-end Accordion Styles */

.wpfaq-container {
    margin: 24px 0;
    font-family: inherit;
}

.wpfaq-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

/* Accordion wrapper */
.wpfaq-accordion {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

/* Single FAQ item */
.wpfaq-item {
    border-bottom: 1px solid #dee2e6;
}
.wpfaq-item:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wpfaq-item:last-child {
    border-bottom: none;
}

/* Question button */
.wpfaq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    transition: background-color 0.2s ease;
}

.wpfaq-question:hover {
    background-color: #fff;    
}

.wpfaq-question[aria-expanded="true"] {
    background-color: #fff;
    color: #0056b3;
}

/* chevron toggle icon */
.wpfaq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-left: 16px;
    color: #888;
    transition: transform 0.25s ease, color 0.2s ease;
}

.wpfaq-icon svg {
    display: block;
}

.wpfaq-question[aria-expanded="true"] .wpfaq-icon {
    transform: rotate(180deg);
    color: #0056b3;
}

/* Answer panel — CSS-driven accordion with max-height trick */
.wpfaq-answer {
    overflow: hidden;
    max-height: 0;
    transition: none;
    padding: 0 20px ;
    background-color: #fff;
    color: #444;
    line-height: 1.7;
}

.wpfaq-item.is-open .wpfaq-answer {
    max-height: 4000px; /* generous upper bound */
    padding: 0 20px 16px 20px;
}

/* Inner content can contain rich HTML from RTE */
.wpfaq-answer-inner p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 767px) {
    .wpfaq-question {
        font-size: 0.92rem;
        padding: 13px 15px;
    }

    .wpfaq-item.is-open .wpfaq-answer {
        padding: 13px 15px;
    }

    .wpfaq-icon {
        width: 18px;
        height: 18px;
        margin-left: 10px;
    }
}
