/**
 * =====================================================
 * send-success-modal.css
 * تحسين شكل نافذة "تم إرسال الرسائل" فقط — بدون أي تغيير
 * في المنطق أو سير العمل.
 *
 * مُصمَّم كطبقة إضافية خاصة بـ #success-modal فقط (عبر
 * .send-success-overlay / .send-success-modal) حتى لا يتأثر أي
 * مودال آخر في التطبيق يستخدم كلاسات .modal-overlay / .modal
 * العامة (main.css).
 *
 * الاستخدام: أضف class="send-success-overlay" على #success-modal
 * وclass="send-success-modal" على العنصر modal بداخله (راجع
 * success-modal.markup-patch.md المرفق) ثم قم بتضمين هذا الملف.
 * ===================================================== */

/* ─── Overlay ───────────────────────────────────────── */
.send-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;

  /* توسيط كامل أفقياً وعمودياً عبر Flexbox، على كل أحجام الشاشات */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.send-success-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ─── Modal card ─────────────────────────────────────── */
.send-success-modal {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow:
    0 20px 25px -5px rgba(15, 23, 42, 0.12),
    0 8px 10px -6px rgba(15, 23, 42, 0.08);
  padding: 36px 32px 28px;
  text-align: center;
  font-family: 'Cairo', sans-serif;

  /* الارتفاع يتبع المحتوى فقط، وليس ملء الشاشة */
  max-height: calc(100vh - 40px);
  overflow-y: auto;

  transform: scale(0.95);
  opacity: 0;
  transition:
    transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 220ms ease;
}

.send-success-overlay.is-open .send-success-modal {
  transform: scale(1);
  opacity: 1;
}

/* ─── Success icon ───────────────────────────────────── */
.send-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.send-success-icon svg {
  width: 36px;
  height: 36px;
  color: #10b981;
  stroke-width: 2.5;
}

/* ─── Text ───────────────────────────────────────────── */
.send-success-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.send-success-text {
  font-size: 14px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 28px;
}

/* ─── Button ─────────────────────────────────────────── */
.send-success-btn {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  background: var(--wa-brand-gradient);
  color: #ffffff;
  font-family: 'Cairo', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.28);
}

.send-success-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.36);
}

.send-success-btn:active {
  transform: translateY(0);
  opacity: 0.92;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
  .send-success-modal {
    padding: 28px 22px 22px;
    border-radius: 16px;
  }

  .send-success-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 18px;
  }

  .send-success-icon svg {
    width: 30px;
    height: 30px;
  }

  .send-success-title {
    font-size: 17px;
  }
}

/* ─── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .send-success-overlay,
  .send-success-modal {
    transition: none;
  }
}
