/* بوابة طالب العلم: الرجوع والتقدم، وإطار المادة الواحد، وترتيب الترويسة.
   يُحقن عبر scripts/patch-student-subject-focus.mjs (المكوّن: scripts/frontend/student-subject-focus.jsx). */

/* زرا «رجوع» و«تقدّم» في الشريط العلوي: واضحان بإطار وتسمية. */
.bina-ssf-hnav .bina-hnav { padding: 3px; gap: 4px; border: 1px solid #cfe0dc; border-radius: 14px; background: #f3f8f7; }
.bina-ssf-hnav .bina-hnav-btn { height: 36px; padding: 0 12px; font-size: 13px; font-weight: 800; }
@media (max-width: 640px) {
  .bina-ssf-hnav .bina-hnav-btn { width: 36px; padding: 0; }
  .bina-ssf-hnav .bina-hnav-label { display: none; }
}

/* يسار الترويسة: «رجوع» و«تقدّم» و«مصحف بناء» و«اقترح فكرة مشروع» في سطر، وتحتها الأزرار ومؤشر الهمة. */
[data-student-hero-actions] { flex-wrap: wrap; justify-content: flex-end !important; row-gap: 8px; }
[data-student-hero-tools] { display: flex; flex-basis: 100%; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
[data-student-hero-tools] .bina-ssf-hnav .bina-hnav { background: rgba(255, 255, 255, .12); border-color: rgba(234, 217, 176, .35); }
[data-student-hero-tools] .bina-ssf-hnav .bina-hnav-btn { height: 34px; }
[data-student-hero-tools] .bina-mushaf-tab { height: 40px; }
[data-student-hero-idea] .bpi-btn { white-space: nowrap; }
@media (max-width: 639px) {
  [data-student-hero-actions], [data-student-hero-tools] { justify-content: center !important; }
}

/* داخل المادة: إطارها وحده؛ تُخفى الترويسة الكبيرة والتبويبات الرئيسية ورأس صفحة البرنامج. */
[data-student-portal-brand]:has([data-student-subject-frame]) [data-student-hero],
[data-student-portal-brand]:has([data-student-subject-frame]) [data-student-tabbar],
[data-student-portal-brand]:has([data-student-subject-frame]) [data-student-program-head] { display: none !important; }
[data-student-subject-focus] .tw-subject-focus { margin: 0; }

/* «الرفقة والتميز» تبويبًا في صفحة البرنامج. */
[data-student-community-tab] { min-width: 0; }

/* تبويبات التواصل داخل المادة: بلا ترويسة «مجموعاتي واستبياناتي» الكبيرة. */
.ce-root--subject .ce-shell--subject { padding-top: 0; }
.ce-root--subject .ce-shell--subject > .ce-section:first-child { margin-top: 0; }

/* الهاتف: الشريط العلوي لصفحات الطالب الأخرى يتسع للرجوع والتقدم بإخفاء نص «تسجيل الخروج» (تبقى أيقونته). */
@media (max-width: 640px) {
  header .bina-ssf-hnav ~ button > span:last-child { display: none; }
  header .bina-ssf-hnav .bina-hnav { padding: 2px; }
  header .bina-ssf-hnav .bina-hnav-btn { width: 32px; height: 32px; }
}

/* صفحة البرنامج: لا زرّي «رحلتي العلمية» و«الرفقة والتميز» بجانب العنوان (الرفقة صارت تبويبًا). */
[data-student-program-switch] { display: none !important; }

/* بطاقة «تقدم دراسة المقرر» الكبيرة القديمة مخفية: التقدم في رأس إطار المادة. */
[data-student-subject-focus] > .space-y-4 > .rounded-2xl.border-teal-100.p-4.shadow-sm { display: none; }

/* درجة الطالب في آخر محاولة، وملاحظات المعلم على إجاباته (student-learning-feedback.jsx). */
.bina-lf-score { margin: 6px 0 0; display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 12px; border-radius: 999px; background: #e8f6ef; color: #14532d; font-size: 13px; font-weight: 700; }
.bina-lf-score b { font-size: 16px; }
.bina-lf-notes { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; margin-bottom: 4px; border: 1px solid #fca5a5; border-inline-start: 5px solid #dc2626; border-radius: 14px; background: #fef2f2; color: #991b1b; }
.bina-lf-notes > span { font-size: 20px; line-height: 1.2; }
.bina-lf-notes b { display: block; font-size: 14px; color: #b91c1c; }
.bina-lf-notes small { display: block; font-size: 12.5px; color: #7f1d1d; }
.bina-lf-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; }
