.bfaq-box-wrapper {
    font-family: inherit;
    margin: 30px auto;
    max-width: 1100px;
    direction: rtl;
    text-align: right;
}

/* باکس جستجوی ایجکس */
.bfaq-search-wrapper {
    margin-bottom: 25px;
}

.bfaq-search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.bfaq-search-input-box:focus-within {
    border-color: #16a34a;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.15);
}

.bfaq-search-icon {
    color: #94a3b8;
    margin-left: 10px;
    flex-shrink: 0;
}

.bfaq-search-field {
    width: 100%;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 15px;
    color: #1e293b;
    padding: 8px 0;
}

.bfaq-clear-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
}
.bfaq-clear-btn:hover { color: #e11d48; }

/* اسپینر لودینگ */
.bfaq-search-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #16a34a;
    border-radius: 50%;
    animation: bfaqSpin 0.7s linear infinite;
    margin-left: 8px;
    flex-shrink: 0;
}
.bfaq-search-spinner.is-active { display: inline-block; }

@keyframes bfaqSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* نتایج جستجو */
.bfaq-search-summary {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 14px;
    padding: 0 4px;
}

.bfaq-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    margin-right: 10px;
    font-weight: 500;
}

/* تب‌های دسته اصلی */
.bfaq-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.bfaq-cat-tab {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bfaq-cat-tab:hover { background: #e2e8f0; }
.bfaq-cat-tab.is-active {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.25);
}

.bfaq-cat-panel { display: none; }
.bfaq-cat-panel.is-active { display: block; animation: bfaqFadeIn 0.3s ease; }

/* زیردسته‌ها (بیماری‌ها) */
.bfaq-subcat-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.bfaq-subcat-hint {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
}

.bfaq-subcat-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.bfaq-sub-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.bfaq-sub-pill:hover { border-color: #0284c7; color: #0284c7; }
.bfaq-sub-pill.is-active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    font-weight: 600;
}

.bfaq-qa-container { display: none; }
.bfaq-qa-container.is-active { display: block; animation: bfaqFadeIn 0.25s ease; }

/* آیتم‌های آکاردئون */
.bfaq-item {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.bfaq-item:hover { border-color: #cbd5e1; }

.bfaq-item-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: none;
    border: none;
    padding: 15px 18px;
    text-align: right;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.bfaq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #dcfce7;
    color: #166534;
    border-radius: 50%;
    font-size: 13px;
    flex-shrink: 0;
}

.bfaq-q-text { flex-grow: 1; }
.bfaq-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: transform 0.25s ease;
}
.bfaq-item.is-open .bfaq-arrow { transform: rotate(180deg); }

.bfaq-item-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fdfdfd;
}

.bfaq-answer-inner {
    padding: 18px;
    line-height: 1.85;
    color: #334155;
    font-size: 14.5px;
    border-top: 1px solid #f1f5f9;
}

.bfaq-no-data, .bfaq-empty-state {
    padding: 20px;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    border-radius: 8px;
}

@keyframes bfaqFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
