/* ================================================================
   FAQ Manager — Accordion Styles
   ================================================================ */

.faqm-wrapper {
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
    direction: rtl;
}

/* ─── عنوان‌ها ──────────────────────────────────────────────── */
.faqm-list-title,
.faqm-form-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #1a1a1a;
    padding-bottom: 10px;
    border-bottom: 3px solid #1a73e8;
    display: inline-block;
}

/* ─── آکاردئون ─────────────────────────────────────────────── */
.faqm-list { margin-bottom: 40px; }

.faqm-item {
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .25s, border-color .25s;
}
.faqm-item:hover {
    border-color: #c0d4f5;
    box-shadow: 0 3px 12px rgba(26,115,232,.1);
}
.faqm-item.is-open {
    border-color: #1a73e8;
    box-shadow: 0 4px 18px rgba(26,115,232,.13);
}

/* ─── ردیف سوال (کلیک‌پذیر) ────────────────────────────────── */
.faqm-question-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    transition: background .2s;
}
.faqm-question-row:hover { background: #f4f8ff; }
.faqm-item.is-open .faqm-question-row { background: #eaf1ff; }

.faqm-q-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}
.faqm-item.is-open .faqm-q-badge { background: #1558b0; }

.faqm-q-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    line-height: 1.6;
}

.faqm-meta {
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
    font-weight: 400;
}

/* آیکون فلش */
.faqm-arrow {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s ease;
    color: #1a73e8;
}
.faqm-item.is-open .faqm-arrow { transform: rotate(180deg); }
.faqm-arrow svg { display: block; }

/* ─── ردیف پاسخ (آکاردئون) ─────────────────────────────────── */
.faqm-answer-row {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .32s ease;
    background: #ffffff;
    border-top: 0px solid #e0ebff;
}
.faqm-item.is-open .faqm-answer-row {
    grid-template-rows: 1fr;
    border-top-width: 1px;
}

.faqm-answer-inner {
    overflow: hidden;
    display: flex;
    gap: 14px;
    padding: 0 20px;
    transition: padding .32s ease;
}
.faqm-item.is-open .faqm-answer-inner { padding: 18px 20px; }

.faqm-a-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e8e3e;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.faqm-a-content { flex: 1; }
.faqm-a-content .faqm-a-label {
    font-size: 11px;
    color: #1e8e3e;
    font-weight: 700;
    margin-bottom: 4px;
}
.faqm-a-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.85;
    color: #444;
}

/* ─── پیام خالی ─────────────────────────────────────────────── */
.faqm-no-items {
    color: #888;
    text-align: center;
    padding: 28px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 28px;
    font-size: 14px;
}

/* ─── فرم ارسال سوال ────────────────────────────────────────── */
.faqm-form-section {
    background: #f5f7ff;
    border: 1px solid #d8e2ff;
    border-radius: 12px;
    padding: 28px 28px 24px;
    margin-top: 36px;
}

.faqm-form-subtitle {
    font-size: 13px;
    color: #666;
    margin: -14px 0 20px;
}

.faqm-field { margin-bottom: 18px; position: relative; }

.faqm-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #222;
}
.faqm-required { color: #d93025; }

.faqm-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cdd3e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    box-sizing: border-box;
    background: #fff;
    color: #222;
    direction: rtl;
    transition: border-color .2s, box-shadow .2s;
}
.faqm-field textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,.14);
}

.faqm-char-count {
    display: block;
    text-align: left;
    font-size: 11px;
    color: #bbb;
    margin-top: 4px;
}

#faqm-submit-btn {
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 13px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, transform .1s;
}
#faqm-submit-btn:hover:not(:disabled) { background: #1558b0; }
#faqm-submit-btn:active { transform: scale(.98); }
#faqm-submit-btn:disabled { background: #a0bce8; cursor: not-allowed; }

/* ─── پیام‌های فرم ──────────────────────────────────────────── */
#faqm-message { margin-bottom: 16px; }
.faqm-success, .faqm-error {
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}
.faqm-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.faqm-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ─── نمایش برای مهمان ──────────────────────────────────────── */
.faqm-login-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
}
.faqm-login-notice .dashicons { font-size: 24px; color: #f9a825; }
.faqm-login-notice p { margin: 0; font-size: 14px; color: #555; }
.faqm-login-notice a { color: #1a73e8; font-weight: 600; }

/* ─── ریسپانسیو ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .faqm-form-section  { padding: 18px 16px; }
    .faqm-question-row  { padding: 14px 16px; }
    .faqm-answer-inner  { padding: 0 16px; }
    .faqm-item.is-open .faqm-answer-inner { padding: 14px 16px; }
    #faqm-submit-btn    { width: 100%; }
    .faqm-q-text        { font-size: 14px; }
}
