/* ==========================================================================
   JSON FAQ Block — Frontend
   ========================================================================== */

.jfb-faq-wrapper {
    margin: 2em 0;
}

/* Title */
.jfb-faq-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px 0;
    padding: 0;
}

/* FAQ list */
.jfb-faq-list {
    border-top: 1px solid #e0e0e0;
}

/* Each FAQ item */
.jfb-faq-item {
    border-bottom: 1px solid #e0e0e0;
}

/* Question button */
.jfb-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 4px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.jfb-faq-question:hover {
    color: #00C896;
}

.jfb-faq-question:focus {
    outline: 2px solid #00C896;
    outline-offset: -2px;
    border-radius: 2px;
}

/* Question text */
.jfb-faq-q-text {
    flex: 1;
    padding-right: 16px;
}

/* Toggle icon */
.jfb-faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    color: #666;
    transition: transform 0.2s ease;
}

/* Open state */
.jfb-faq-item.jfb-open .jfb-faq-icon {
    transform: rotate(45deg);
    color: #00C896;
}

.jfb-faq-item.jfb-open .jfb-faq-question {
    color: #00C896;
}

/* Answer */
.jfb-faq-answer {
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 0;
    padding: 0 4px;
}

.jfb-faq-answer[hidden] {
    display: block !important;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.jfb-faq-item.jfb-open .jfb-faq-answer {
    max-height: 1000px;
    padding: 0 4px 14px 4px;
}

.jfb-faq-answer p {
    margin: 0;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

/* ─── Error states ─── */
.jfb-no-data,
.jfb-error {
    padding: 12px 16px;
    background: #fef3f2;
    border: 1px solid #fca5a5;
    border-radius: 3px;
    color: #b91c1c;
    font-size: 13px;
}

/* ─── Responsive ─── */
@media screen and (max-width: 768px) {
    .jfb-faq-question {
        font-size: 14px;
        padding: 12px 4px;
    }

    .jfb-faq-answer p {
        font-size: 13px;
    }
}
