/* ============================================================
   nazrah-mobile.css — نظرة: أنماط عرض النتائج على الجوال
   الإصدار: 1.0 — يونيو 2026

   يرافق js/nazrah-ui-mobile.js. كل المحدّدات ببادئة nzm- لتجنّب
   أي تصادم مع أنماط الجوال القديمة (nz-mob-*) في result-new.css.

   ⚠️ الثيم: المتغيرات الافتراضية = فاتح. الثيم الداكن يُفعّل عبر
   body:not([data-theme="formal"]) — نفس منطق style.css (formal=فاتح).
   ============================================================ */

/* ── متغيرات الثيم الفاتح (الافتراضي) ── */
:root {
  --nzm-section-bg:  #ffffff;
  --nzm-divider:     #f0ece3;
  --nzm-sec-head:    #c0bbb0;
  --nzm-name:        #1a1a1a;
  --nzm-sub:         #c0bbb0;
  --nzm-amount:      #1a3a2a;
  --nzm-qist:        #2d5a45;
  --nzm-ph-now-bg:   #f7fcf9;
  --nzm-ph-now-clr:  #2d5a45;
  --nzm-tag-bg:      #fff8e6;
  --nzm-tag-clr:     #a07020;
  --nzm-tag-g-bg:    #eaf2ee;
  --nzm-tag-g-clr:   #1e5c3a;
}

/* ── متغيرات الثيم الداكن (مستوحاة من bp-root.is-dark) ── */
body:not([data-theme="formal"]) {
  --nzm-section-bg:  #181f1c;
  --nzm-divider:     #232a26;
  --nzm-sec-head:    #5e6360;
  --nzm-name:        #ede7d6;
  --nzm-sub:         #5e6360;
  --nzm-amount:      #ede7d6;
  --nzm-qist:        #6ec79f;
  --nzm-ph-now-bg:   #182420;
  --nzm-ph-now-clr:  #6ec79f;
  --nzm-tag-bg:      #2a2010;
  --nzm-tag-clr:     #d8b97f;
  --nzm-tag-g-bg:    #182420;
  --nzm-tag-g-clr:   #6ec79f;
}

/* ════════ Hero ════════ */
.nzm-hero {
  border-radius: 20px;
  padding: 18px 16px 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.nzm-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 140px; height: 140px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  pointer-events: none;
}
.nzm-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.nzm-hero-label { font-size: 11px; opacity: .6; }
.nzm-hero-badge {
  font-size: 10px;
  background: rgba(255,255,255,.16);
  border-radius: 6px;
  padding: 3px 9px;
  font-weight: 600;
}
.nzm-hero-amount {
  font-size: 38px;
  font-weight: 800;
  direction: ltr;
  text-align: right;
  letter-spacing: -2px;
  line-height: 1.05;
}
.nzm-hero-sar { font-size: 14px; font-weight: 400; opacity: .55; }
.nzm-hero-chips {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}
.nzm-hero-chip {
  font-size: 11px;
  background: rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 4px 10px;
}
.nzm-hero-chip b { font-size: 12px; }

/* تمييز اسم البنك — خلفية أوضح + فاصل عمودي رفيع يفصله عن التفاصيل */
.nzm-hero-bank {
  background: rgba(255,255,255,.22);
  font-weight: 700;
}
.nzm-hero-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,.22);
  margin: 1px 2px;
  flex-shrink: 0;
}

/* ════════ القسم العام ════════ */
.nzm-section {
  background: var(--nzm-section-bg);
  border-radius: 16px;
  overflow: hidden;
}
.nzm-sec-head {
  padding: 11px 16px 6px;
  font-size: 10px;
  color: var(--nzm-sec-head);
  font-weight: 700;
  letter-spacing: .5px;
}

/* ════════ يتكوّن من ════════ */
.nzm-comp-bar {
  height: 5px;
  display: flex;
  gap: 2px;
  margin: 0 16px 8px;
  border-radius: 99px;
  overflow: hidden;
}
.nzm-comp-bar > div { border-radius: 99px; }

.nzm-comp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--nzm-divider);
}
.nzm-comp-right { display: flex; align-items: center; gap: 10px; }
.nzm-comp-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.nzm-comp-name  { font-size: 13px; font-weight: 600; color: var(--nzm-name); }
.nzm-comp-sub   { font-size: 10px; color: var(--nzm-sub); margin-top: 2px; }
.nzm-comp-left  { text-align: left; }
.nzm-comp-amount {
  font-size: 14px; font-weight: 700;
  color: var(--nzm-amount); direction: ltr; display: block;
}
.nzm-comp-qist {
  font-size: 11px; font-weight: 600;
  color: var(--nzm-qist); direction: ltr;
  display: block; text-align: left; margin-top: 2px;
}
.nzm-comp-tag {
  font-size: 10px; font-weight: 600;
  background: var(--nzm-tag-bg); color: var(--nzm-tag-clr);
  border-radius: 6px; padding: 2px 8px;
  display: inline-block;
}
.nzm-comp-tag.green {
  background: var(--nzm-tag-g-bg);
  color: var(--nzm-tag-g-clr);
}

/* ════════ جدول الأقساط ════════ */
.nzm-phase-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--nzm-divider);
  gap: 8px;
}
.nzm-phase-row.is-now { background: var(--nzm-ph-now-bg); }
.nzm-phase-right { flex: 1; min-width: 0; }
.nzm-phase-label {
  font-size: 13px; font-weight: 700; color: var(--nzm-name);
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
}
.nzm-phase-period   { font-size: 11px; font-weight: 500; opacity: .55; }
.nzm-phase-sep-inline { font-size: 11px; opacity: .25; }
.nzm-phase-now-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .3px;
  background: var(--nzm-ph-now-clr); color: #fff;
  border-radius: 5px; padding: 1px 6px; margin-right: 4px;
}
.nzm-phase-note  { font-size: 10px; color: var(--nzm-sub); margin-top: 3px; line-height: 1.6; }
.nzm-phase-note span { display: block; }
.nzm-phase-left  { text-align: left; flex-shrink: 0; }
.nzm-phase-amount {
  font-size: 22px; font-weight: 800;
  direction: ltr; white-space: nowrap;
  color: var(--nzm-amount);
}
.nzm-phase-row.is-now .nzm-phase-amount { color: var(--nzm-ph-now-clr); }
.nzm-phase-unit { font-size: 10px; color: var(--nzm-sub); display: block; text-align: left; margin-top: 1px; }

/* ════════ تباعد الكتل داخل nzResWrap على الجوال ════════ */
.nzm-hero,
.nzm-section { margin: 8px 12px 0; }

/* فراغ سفلي يمنع تداخل النتائج مع أزرار النسخ/الطباعة */
.nzm-section:last-child { margin-bottom: 16px; }
