/*
 * أصناف مشتركة — منصة كارت
 *
 * كل صنف هنا يحلّ محلّ نمط مضمّن كان مكرّراً حرفياً عشرات المرات في القوالب.
 * القيم مشتقّة من رموز tokens.css، فتتبع الثيم تلقائياً — بخلاف النمط المضمّن
 * الذي كان يحمل قيمة ثابتة لا يمكن للوضع الليلي تجاوزها.
 *
 * القاعدة: لا يُضاف هنا إلا نمط تكرّر فعلاً. هذا ملف تنظيف لا إطار عام.
 */

/* ── النماذج ─────────────────────────────────────────────── */

/* صف حقول أفقي ينكسر على الشاشات الضيقة (كان مكرّراً 25 مرة) */
.form-row {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

/* عمود داخل صف الحقول (58 مرة كـ flex:1، و10 مرات بحدّ أدنى للعرض) */
.form-col { flex: 1; }
.form-col--wide { flex: 1; min-width: 300px; }

/* نجمة الحقل المطلوب — كانت color:red في 36 موضعاً */
.required-mark {
    color: var(--danger);
    margin-inline-start: 0.15rem;
}

/* رسالة خطأ تحت الحقل (23 مرة) */
.field-error {
    display: block;
    margin-top: var(--space-xs);
    color: var(--danger);
    font-size: 0.875rem;
}

/* عنوان الحقل ومربّع الإدخال — كانا يُمرَّران كمتغيّرات Blade نصية */
.field-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.field-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--bg-subtle);
    color: var(--text-main);
}

.field-input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* صندوق اختيار بحجم مريح للمس (18 مرة) */
.check-box {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--accent);
}

/* عنوان مع صندوق اختيار (18 مرة) */
.check-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

/* ── العناوين والأقسام ───────────────────────────────────── */

/* فاصل قسم داخل نموذج طويل (14 مرة) */
.section-title {
    font-size: var(--text-lg);
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-lg);
    margin-top: var(--space-xl);
}

.section-title:first-child { margin-top: 0; }

/* ── الجداول ─────────────────────────────────────────────── */

/* صف «لا توجد نتائج» (11 مرة) */
.table-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

/* ── الأزرار ─────────────────────────────────────────────── */

/* زر ثانوي رمادي (20 مرة) */
.btn-neutral {
    background-color: var(--gray-200);
    color: var(--gray-800);
}

/* ── مساعدات التخطيط ─────────────────────────────────────── */

.u-row { display: flex; gap: var(--space-sm); }
.u-row-md { display: flex; gap: var(--space-md); }
.u-row-center { display: flex; align-items: center; gap: var(--space-sm); }

.u-mt-xs { margin-top: var(--space-xs); }
.u-mt-sm { margin-top: var(--space-sm); }
.u-mt-md { margin-top: var(--space-md); }
.u-mt-lg { margin-top: var(--space-lg); }
.u-mt-xl { margin-top: var(--space-xl); }

.u-mb-sm { margin-bottom: var(--space-sm); }
.u-mb-md { margin-bottom: var(--space-md); }
.u-mb-lg { margin-bottom: var(--space-lg); }

/* ── نصوص ────────────────────────────────────────────────── */

.u-muted { color: var(--text-muted); }
.u-on-accent { color: var(--text-inverse); }
.u-sm { font-size: var(--text-sm); }
.u-xs { font-size: var(--text-xs); }

/*
 * شبكة مرفقات طلب التاجر (لوحة الإدارة)
 *
 * كانت الشاشة تكتب «مرفق» نصاً فقط، فيُقبل الطلب أو يُرفض دون أن يرى المراجع
 * الشعار أو صورة العرض أو التوقيع. المعاينة هنا جزء من قرار المراجعة لا زينة.
 */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.attachment {
    margin: 0;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attachment figcaption {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}

.attachment img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm, 0.4rem);
    display: block;
}

.attachment__link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--info);
    text-decoration: none;
}

.attachment__link:hover { text-decoration: underline; }

.attachment__none {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 2.5rem 0;
    text-align: center;
}

.attachment--empty {
    border-style: dashed;
    background: transparent;
}

.attachment__warn {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--danger);
    line-height: 1.5;
}
