/* =============================================================
   شريط الإشعارات العام (SweetAlert2 Toast)
   -------------------------------------------------------------
   الشريط العلوي (.layout-navbar) ثابت بارتفاع 4rem، وحاوية الإشعار
   تبدأ من أعلى الشاشة ⇒ كان الإشعار يتراكب مع الفروع وأيقونات
   المستخدم واللغة فيصعب قراءته. هنا يُزاح أسفل الشريط مباشرةً
   ويُرفع فوق كل الطبقات الثابتة، مع تكبير النص وتوضيح التباين.
   الاتجاه عربي/إنجليزي يُعالَج بـ border-inline-start و text-align:start.
   ============================================================= */

:root {
  --app-toast-offset: 4.65rem;  /* 4rem ارتفاع الشريط العلوي + فجوة */
}

/* ---------- الموضع: أسفل الشريط العلوي مباشرةً وفوقه طبقياً ---------- */
.swal2-container.swal2-top,
.swal2-container.swal2-top-start,
.swal2-container.swal2-top-end {
  z-index: 10600;
  padding-top: var(--app-toast-offset);
  padding-inline: 1rem;
  pointer-events: none;   /* لا يحجب النقر على الشريط العلوي خلفه */
}

.swal2-container .swal2-toast {
  pointer-events: auto;
}

/* ---------- الوضوح: بطاقة بيضاء عالية التباين بحدٍّ لونيّ جانبي ---------- */
.swal2-toast {
  width: auto;
  max-width: min(480px, calc(100vw - 2rem));
  padding: .8rem 1rem;
  border-radius: 12px;
  background: #fff;
  border-inline-start: 5px solid #16c098;
  box-shadow: 0 14px 34px rgba(20, 30, 60, .20), 0 0 0 1px rgba(20, 30, 60, .06);
}

.swal2-toast .swal2-title {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.7;
  color: #1f2937;
  text-align: start;
  white-space: normal;      /* الرسائل الطويلة تلتفّ بدل أن تُقتطع */
  word-break: break-word;
}

.swal2-toast .swal2-icon {
  width: 1.9em;
  height: 1.9em;
  margin-inline: 0 .6rem;
}

.swal2-toast .swal2-timer-progress-bar {
  height: 3px;
}

/* نبرة الإشعار — SweetAlert يضيف swal2-icon-{type} على البطاقة */
.swal2-toast.swal2-icon-error   { border-inline-start-color: #ef476f; }
.swal2-toast.swal2-icon-warning { border-inline-start-color: #f59e0b; }
.swal2-toast.swal2-icon-info    { border-inline-start-color: #0ea5e9; }
.swal2-toast.swal2-icon-question{ border-inline-start-color: #6366f1; }

/* ---------- الشاشات الصغيرة: الشريط العلوي أقصر والعرض كامل ---------- */
@media (max-width: 767.98px) {
  :root { --app-toast-offset: 4.2rem; }

  .swal2-toast { max-width: calc(100vw - 1.5rem); }
  .swal2-toast .swal2-title { font-size: .9rem; }
}
