/* ============================================
   🧾 الشريط القانوني الأفقي (legal-bar)
   تصميم أنيق ومتوافق مع جميع الشاشات
   ============================================ */

/* ✅ الطبقة داخل الهيدر القانوني */
.legal-header .legal-bar {
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* ✅ الحاوية الأساسية */
.legal-bar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap; /* يسمح بالنزول إذا ضاقت المساحة */
}

/* ✅ تسمية الشريط (اختياري) */
.legal-bar__label {
  font-weight: 700;
  font-size: 13px;
  color: #4a5568;      /* لون داكن أنيق */
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 30px;
  background: #edf2f7;  /* خلفية رمادية فاتحة */
  border: 1px solid #e2e8f0;
  letter-spacing: 0.3px;
}

/* ✅ روابط الشريط */
.legal-bar__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;      /* للديسكتوب */
  gap: 0;               /* الفواصل ستتحكم بالمسافات */
}

/* ✅ كل رابط */
.legal-bar__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #2d3748;        /* لون نص داكن */
  font-size: 14px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* ✅ حالة التحويم */
.legal-bar__link:hover {
  background: #f7fafc;   /* خلفية خفيفة */
  border-color: #cbd5e0;
  color: #1a202c;
  transform: translateY(-1px);
}

/* ✅ الرابط النشط */
.legal-bar__link.is-active {
  background: #e6fffa;   /* لون أخضر فاتح جداً */
  border-color: #38b2ac; /* حدود خضراء */
  color: #285e61;        /* نص أخضر داكن */
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(56, 178, 172, 0.15);
}

/* ✅ الفاصل بين الروابط (باستخدام ::after) */
.legal-bar__link:not(:last-child)::after {
  content: "|";
  position: absolute;
  left: -8px;            /* مناسب لـ RTL */
  color: #a0aec0;        /* لون رمادي هادئ */
  font-weight: 400;
  font-size: 14px;
}

/* ✅ مسافة أفقية قبل الفاصل وبعده */
.legal-bar__link:not(:last-child) {
  margin-left: 20px;     /* مسافة قبل الفاصل */
}

/* ============================================
   📱 تحسينات للشاشات الصغيرة (الموبايل)
   ============================================ */
@media (max-width: 768px) {
  .legal-bar__inner {
    gap: 10px;
    padding: 8px 0;
  }

  /* إخفاء التسمية لتوفير مساحة */
  .legal-bar__label {
    display: none;
  }

  /* روابط قابلة للتمرير الأفقي */
  .legal-bar__links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    padding-bottom: 6px;
    gap: 0;
  }

  /* تخصيص شريط التمرير (webkit) */
  .legal-bar__links::-webkit-scrollbar {
    height: 4px;
  }
  .legal-bar__links::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 10px;
  }
  .legal-bar__links::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
  }

  .legal-bar__link {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 30px;
  }

  .legal-bar__link:not(:last-child) {
    margin-left: 14px;
  }

  .legal-bar__link:not(:last-child)::after {
    left: -6px;
    font-size: 12px;
  }
}

/* ============================================
   🖨️ تحسينات للطباعة
   ============================================ */
@media print {
  .legal-bar {
    display: none;
  }
}