/* ============================================================================
   عدة الهوية — نافذة  |  css/identity.css
   تُطبّق عناصر الهوية الرسمية على المكتبة، انضم إلينا، بوابة المبدعين،
   الشراء والفاتورة:
   1) فرشاة العنوان الرئيسي   assets/icons/brush-title.png
   2) الشرطة المتدرجة تحت العناوين الفرعية   assets/icons/dash-subtitle.png
   3) أقواس الزوايا للبطاقات والنماذج   (بنمط corner-tick / frame-corners)
   ============================================================================ */

/* ---------- 1) فرشاة العنوان الرئيسي ---------- */
.id-brush {
  display: block; width: min(210px, 55%); height: auto;
  margin: .55rem 0 0; user-select: none; pointer-events: none;
}
.id-brush--center { margin-inline: auto; }

/* ---------- 2) الشرطة المتدرجة تحت العناوين الفرعية ---------- */
.id-dash {
  display: block; width: 96px; height: 6px; border-radius: 99px;
  margin: .5rem 0 1.1rem;
  background: linear-gradient(to left, var(--brass), rgba(255,69,0,0));
}
.id-dash--center { margin-inline: auto; }

/* عنوان فرعي جاهز: النص + الشرطة تحته */
.id-h2 { color: var(--ivory); font-size: 1.05rem; margin: 0; }
.id-h2 + .id-dash { margin-top: .5rem; }

/* ---------- 3) أقواس الزوايا (نمط الهوية: زاويتان متقابلتان حادتان) ---------- */
.id-corners { position: relative; }
.id-corners::before, .id-corners::after {
  content: ''; position: absolute; width: 22px; height: 22px;
  pointer-events: none; z-index: 2;
  transition: width .25s ease, height .25s ease;
}
.id-corners::before {
  top: -1px; inset-inline-end: -1px;
  border-top: 3px solid var(--brass); border-inline-end: 3px solid var(--brass);
}
.id-corners::after {
  bottom: -1px; inset-inline-start: -1px;
  border-bottom: 3px solid var(--brass); border-inline-start: 3px solid var(--brass);
}
.id-corners:hover::before, .id-corners:hover::after { width: 30px; height: 30px; }

/* نسخة ناعمة للبطاقات الصغيرة */
.id-corners--sm::before, .id-corners--sm::after { width: 16px; height: 16px; border-width: 2px; }
.id-corners--sm:hover::before, .id-corners--sm:hover::after { width: 22px; height: 22px; }

/* ============================================================
   تطبيق تلقائي على مكونات الأقسام (دون تعديل ترميز كل عنصر)
   ============================================================ */

/* المكتبة: صندوق معاينة صفحة التفاصيل */
.ftg-item__media { border-radius: 6px; }
.ftg-item__media::before, .ftg-item__media::after {
  content: ''; position: absolute; width: 26px; height: 26px; z-index: 4; pointer-events: none;
}
.ftg-item__media::before { top: -1px; inset-inline-end: -1px; border-top: 3px solid var(--brass); border-inline-end: 3px solid var(--brass); }
.ftg-item__media::after { bottom: -1px; inset-inline-start: -1px; border-bottom: 3px solid var(--brass); border-inline-start: 3px solid var(--brass); }

/* النماذج: انضم إلينا، الدخول، الاستعادة، الرفع، الدفع */
.reg-form { position: relative; border-radius: 6px; }
.reg-form::before, .reg-form::after {
  content: ''; position: absolute; width: 24px; height: 24px; z-index: 2; pointer-events: none;
}
.reg-form::before { top: -1px; inset-inline-end: -1px; border-top: 3px solid var(--brass); border-inline-end: 3px solid var(--brass); }
.reg-form::after { bottom: -1px; inset-inline-start: -1px; border-bottom: 3px solid var(--brass); border-inline-start: 3px solid var(--brass); }

/* بوابة المبدعين: الكتل والإحصاءات */
.cr-block, .cr-stat--gold { position: relative; border-radius: 6px; }
.cr-block::before, .cr-stat--gold::before {
  content: ''; position: absolute; top: -1px; inset-inline-end: -1px;
  width: 18px; height: 18px; border-top: 2px solid var(--brass); border-inline-end: 2px solid var(--brass);
  pointer-events: none;
}
.cr-block::after {
  content: ''; position: absolute; bottom: -1px; inset-inline-start: -1px;
  width: 18px; height: 18px; border-bottom: 2px solid var(--brass); border-inline-start: 2px solid var(--brass);
  pointer-events: none;
}

/* الشراء والفاتورة */
.co-summary, .invoice, .inv-download { position: relative; border-radius: 6px; }
.co-summary::before, .invoice::before,
.co-summary::after, .invoice::after {
  content: ''; position: absolute; width: 24px; height: 24px; z-index: 2; pointer-events: none;
}
.co-summary::before, .invoice::before { top: -1px; inset-inline-end: -1px; border-top: 3px solid var(--brass); border-inline-end: 3px solid var(--brass); }
.co-summary::after, .invoice::after { bottom: -1px; inset-inline-start: -1px; border-bottom: 3px solid var(--brass); border-inline-start: 3px solid var(--brass); }

/* عناوين الأقسام: شرطة الهوية تحت h2 القائمة */
.reg-form h2, .cr-block h2, .co-summary h1, .co-pay h2, .invoice__head h2, .ftg-related-title {
  position: relative; padding-bottom: .55rem;
}
.reg-form h2::after, .cr-block h2::after, .co-summary h1::after, .co-pay h2::after, .invoice__head h2::after, .ftg-related-title::after {
  content: ''; position: absolute; bottom: 0; inset-inline-start: 0;
  width: 76px; height: 5px; border-radius: 99px;
  background: linear-gradient(to left, var(--brass), rgba(255,69,0,0));
}

/* الطباعة: الأقواس لا تُطبع مع الفاتورة */
@media print {
  .invoice::before, .invoice::after { display: none; }
}
