/* 2026-11-28 -- «نظم» بصریِ تب‌های فرم‌ساز در پنل.
   چرا فایلِ سراسری و نه استایلِ scoped کامپوننت: عناصرِ تبِ «طراحی فرم»
   داخلِ کامپوننت‌های فرزند (FormParts/FormPartItem/FormInput) رندر می‌شوند و
   استایلِ scoped والد به آن‌ها نمی‌رسد. این فایل بدونِ بیلد webpack منتشر
   می‌شود و تنها با #section-design / #section-actions محدود شده تا به بقیهٔ
   پنل نشت نکند.

   مقیاس‌ها: فاصله 4/8/12/16/24 · شعاع 9 (کنترل) / 12 (ردیف) / 14 (کارت) / 18 (بخش)
   رنگ‌ها: متن #17343b · متنِ ثانویه #4b6b74 · خط #e7f0f2 · برند #16ACB7 */

/* ---------- قالبِ مشترکِ هر سه بخش ---------- */
#section-design.card,
#section-actions.card {
    border: 1px solid #e7f0f2 !important;
    border-radius: 18px !important;
    box-shadow: 0 5px 15px hsla(190, 30%, 30%, .06) !important;
}
#section-design > .card-body,
#section-actions > .card-body { padding: 24px !important; }

/* ---------- انتخاب‌گرِ حالت نمایش (DisplayModePicker) ----------
   چرا این‌جا: SVGها با v-html تزریق می‌شوند و Vue به محتوای v-html
   ویژگیِ scope را اضافه نمی‌کند؛ بنابراین قاعدهٔ scopedِ «.dmp-thumb svg»
   هیچ‌وقت اعمال نمی‌شد و SVG بدونِ اندازه، بلند و سرریز رندر می‌شد
   (گزارشِ علی: «داغون کردی»). اندازه این‌جا سراسری و قطعی است. */
.dmp .dmp-thumb {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 78px;
    background: #f7fbfc;
    border-radius: 8px;
    padding: 4px;
    overflow: hidden;
}
.dmp .dmp-thumb svg {
    display: block;
    height: 100% !important;
    width: auto !important;
    max-width: 100%;
}
.dmp--mobile .dmp-thumb { height: 104px; }
.dmp--mobile .dmp-thumb svg { max-width: 76px; }

/* شاخه‌های چت/پشتیبانی: دو فیلد در هر ردیف (خواستهٔ علی) */
#section-basic .tool-sub {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
#section-basic .tool-sub__h,
#section-basic .tool-toggle { grid-column: 1 / -1; }
#section-basic .tool-field { margin-bottom: 0; }
@media (max-width: 767px) {
    #section-basic .tool-sub { grid-template-columns: 1fr; }
}

/* «سؤال اولیهٔ انتخاب» و «حالت پیش‌فرض» کنارِ هم در یک ردیف (خواستهٔ علی) */
#section-basic .border-top:has(h6 .fa-flag) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: start;
}
#section-basic .border-top:has(h6 .fa-flag) > h6 { grid-column: 1 / -1; }
#section-basic .border-top:has(h6 .fa-flag) > .input-group.mb-3 { margin-bottom: 0 !important; }
@media (max-width: 767px) {
    #section-basic .border-top:has(h6 .fa-flag) { grid-template-columns: 1fr; }
}

/* ---------- تبِ طراحی فرم ---------- */
#section-design .section-head { align-items: center; margin-bottom: 16px; }
#section-design .section-head h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #17343b !important;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
#section-design .section-head h3 i {
    width: 36px; height: 36px; border-radius: 12px;
    background: #16ACB7; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
}
#section-design .section-head .btn {
    border-radius: 10px; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px;
}

/* کارتِ هر بخش */
#section-design .section-item {
    background: #fff;
    border: 1px solid #e7f0f2;
    border-radius: 14px;
    box-shadow: 0 1px 3px hsla(190, 30%, 30%, .06);
    overflow: hidden;
}
#section-design .part-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px;
    background: #f8fbfc;
    border-bottom: 1px solid #eef5f6;
    margin: 0;
}
#section-design .part-head-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
#section-design .part-index {
    flex: 0 0 auto !important;
    width: 28px; height: 28px; border-radius: 9px;
    background: #16ACB7; color: #fff !important;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px;
}
#section-design .section-title-group { margin: 0; max-width: 360px; }
#section-design .section-details { display: flex; align-items: center; gap: 6px; }

/* کنترل‌ها */
#section-design .form-control {
    height: 40px;
    border-radius: 9px;
    border-color: #d7e3e7;
    font-size: 13px;
    color: #17343b;
}
#section-design textarea.form-control { height: auto; min-height: 56px; }
#section-design select.form-control { height: 40px; }
#section-design .input-group-text {
    background: #fff;
    border-color: #d7e3e7;
    color: #4b6b74;
    font-size: 12px;
    font-weight: 600;
}
#section-design .part-btn {
    width: 32px; height: 32px; padding: 0;
    border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #d7e3e7;
    background: #fff; color: #4b6b74;
    font-size: 12px;
}
#section-design .part-btn:hover { border-color: #9fc9d2; color: #16ACB7; }
#section-design .part-del-btn { color: #c0563a; border-color: #f0d5ce; }
#section-design .part-del-btn:hover { background: #fdf3f1; color: #b04a2f; }
#section-design .part-open-switch { margin: 0; }
#section-design .part-label { font-size: 12px; color: #4b6b74; }

#section-design .part-description-row { padding: 12px 16px 0; margin-bottom: 0 !important; }
#section-design .item-content { padding: 12px 16px 16px; }
#section-design .mode-checks {
    background: #f8fbfc;
    border: 1px dashed #dbe7ec;
    border-radius: 12px;
    padding: 12px !important;
    margin: 0 0 12px !important;
    font-size: 12px;
    color: #4b6b74;
}

/* هر فیلد = یک ردیفِ جدای روشن */
#section-design .form-input {
    background: #fbfdfe !important;
    border: 1px solid #eef5f6 !important;
    border-radius: 12px !important;
    padding: 12px 12px 16px !important;
    margin: 12px 0 0 !important;
}
#section-design .form-input .border-sep { border-bottom: 0 !important; }
#section-design .form-input .part-label { font-size: 12px; color: #4b6b74; font-weight: 600; }

/* ---------- تبِ اقدامات ---------- */
#section-actions .form-control {
    height: 40px; border-radius: 9px; border-color: #d7e3e7; font-size: 13px;
}
#section-actions textarea.form-control { height: auto; min-height: 56px; }
#section-actions .input-group-text {
    background: #f1f7f8; border-color: #d7e3e7; color: #4b6b74; font-size: 12px; font-weight: 600;
}
#section-actions .card, #section-actions .section-item, #section-actions .form-input {
    border-radius: 14px;
    border-color: #eef5f6 !important;
    background: #fbfdfe;
}
#section-actions .btn { border-radius: 10px; }
