/* ══════════════════════════════════════════════════════
   النافذة الجانبية المنزلقة — السلة والإشعارات (سطح المكتب فقط)
   ─────────────────────────────────────────────────────
   على الهاتف تبقى صفحة كاملة عادية كما كانت (هذا الملف لا يُفعَّل
   إطلاقاً على الشاشات الصغيرة — التحكم عبر JS بفحص عرض الشاشة).
   ══════════════════════════════════════════════════════ */

.sp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 20, .45);
  backdrop-filter: blur(2px);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.sp-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.sp-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  /* ⭐ منزلقة من اليسار حسب الطلب */
  left: 0;
  width: min(440px, 92vw);
  background: var(--bg-page, #fff);
  box-shadow: 8px 0 32px rgba(0, 0, 0, .18);
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  display: flex;
  flex-direction: column;
  z-index: 3001;
}
.sp-overlay.open .sp-panel {
  transform: translateX(0);
}

.sp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, #eee);
  flex-shrink: 0;
  background: var(--bg-card, #fff);
}
.sp-panel-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-h, #1a1a1a);
}
.sp-panel-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border, #eee);
  background: var(--bg-page, #fff);
  color: var(--text-m, #666);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.sp-panel-close:hover {
  background: var(--bg-soft, #f5f5f5);
}

.sp-panel-body {
  flex: 1;
  min-height: 0;
  position: relative;
}
.sp-panel-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.sp-panel-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page, #fff);
  transition: opacity .2s;
}
.sp-panel-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.sp-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border, #eee);
  border-top-color: var(--brand-primary, #5D4A7E);
  animation: sp-spin .7s linear infinite;
}
@keyframes sp-spin {
  to { transform: rotate(360deg); }
}

/* هذا النظام مخصص لسطح المكتب فقط — على الشاشات الأصغر يبقى مخفياً
   دائماً بغض النظر عن JS، كحماية إضافية مزدوجة */
@media (max-width: 991px) {
  .sp-overlay { display: none !important; }
}
