/* Add custom CSS styles below */ 
:root {
  --mz-primary: #1a9c9a;
  --mz-primary-light: #48c9c3;
  --mz-dark: #101418;
  --mz-text: #292d32;
  --mz-muted: #7b8492;
  --mz-white: #ffffff;
  --mz-border: rgba(26, 156, 154, 0.22);
  --mz-overlay: rgba(5, 10, 15, 0.68);
}

body.mz-popup-open {
  overflow: hidden !important;
}

/* الخلفية الداكنة */
.mz-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--mz-overlay);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.mz-popup-overlay.mz-visible {
  opacity: 1;
  visibility: visible;
}

/* صندوق البوب أب */
.mz-popup-card {
  position: relative;
  width: min(100%, 460px);
  padding: 28px 22px 22px;
  overflow: hidden;
  direction: rtl;
  text-align: center;
  background:
    radial-gradient(
      circle at top right,
      rgba(72, 201, 195, 0.14),
      transparent 38%
    ),
    linear-gradient(180deg, #ffffff 0%, #f8ffff 100%);
  border: 1px solid var(--mz-border);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  transform: translateY(25px) scale(0.94);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.mz-popup-overlay.mz-visible .mz-popup-card {
  transform: translateY(0) scale(1);
}

/* زخارف الخلفية */
.mz-popup-card::before,
.mz-popup-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.mz-popup-card::before {
  width: 180px;
  height: 180px;
  top: -100px;
  right: -85px;
  background: rgba(72, 201, 195, 0.12);
}

.mz-popup-card::after {
  width: 150px;
  height: 150px;
  bottom: -95px;
  left: -70px;
  background: rgba(26, 156, 154, 0.09);
}

.mz-popup-content {
  position: relative;
  z-index: 2;
}

/* زر الإغلاق */
.mz-popup-close {
  position: absolute;
  z-index: 5;
  top: 13px;
  left: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  padding: 0;
  color: var(--mz-dark);
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  background: rgba(16, 20, 24, 0.06);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.mz-popup-close:hover {
  background: rgba(16, 20, 24, 0.11);
  transform: rotate(90deg);
}

/* الشعار */
.mz-popup-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  margin: 0 auto 4px;
}

.mz-popup-logo img {
  display: block;
  width: auto;
  max-width: min(78%, 290px);
  max-height: 95px;
  margin: 0 auto;
  object-fit: contain;
}

.mz-logo-fallback {
  color: var(--mz-dark);
  font-family: Arial, sans-serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 1px;
}

/* شارة العرض */
.mz-popup-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 14px;
  padding: 8px 15px;
  color: var(--mz-primary);
  font-size: 13px;
  font-weight: 800;
  background: rgba(26, 156, 154, 0.1);
  border-radius: 999px;
}

.mz-popup-badge::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  background: var(--mz-primary);
  border-radius: 50%;
}

/* النصوص */
.mz-popup-title {
  margin: 0 0 10px;
  color: var(--mz-dark);
  font-size: 29px;
  font-weight: 900;
  line-height: 1.35;
}

.mz-popup-description {
  max-width: 390px;
  margin: 0 auto 17px;
  color: var(--mz-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
}

/* صندوق الكوبون */
.mz-coupon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin: 15px 0;
  padding: 10px 18px;
  background: rgba(26, 156, 154, 0.055);
  border: 2px dashed var(--mz-primary);
  border-radius: 20px;
}

.mz-coupon-code {
  color: var(--mz-dark);
  font-family: Arial, sans-serif;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 6px;
}

/* الأزرار */
.mz-popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 15px;
}

.mz-popup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 53px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.mz-popup-button:hover {
  transform: translateY(-2px);
}

.mz-copy-button {
  color: #ffffff;
  background: var(--mz-dark);
}

.mz-copy-button:hover {
  box-shadow: 0 11px 25px rgba(16, 20, 24, 0.2);
}

.mz-shop-button {
  color: #ffffff;
  background: linear-gradient(
    135deg,
    var(--mz-primary),
    var(--mz-primary-light)
  );
}

.mz-shop-button:hover {
  box-shadow: 0 11px 25px rgba(26, 156, 154, 0.25);
}

/* رسالة نجاح النسخ */
.mz-copy-message {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  color: var(--mz-primary);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transition:
    max-height 0.25s ease,
    margin-top 0.25s ease,
    opacity 0.25s ease;
}

.mz-copy-message.mz-show {
  max-height: 35px;
  margin-top: 11px;
  opacity: 1;
}

/* الملاحظة السفلية */
.mz-popup-note {
  margin: 13px 0 0;
  color: var(--mz-muted);
  font-size: 12px;
  line-height: 1.8;
}

/* الجوال */
@media (max-width: 520px) {
  .mz-popup-overlay {
    align-items: center;
    padding: 14px;
  }

  .mz-popup-card {
    width: 100%;
    padding: 25px 17px 19px;
    border-radius: 24px;
  }

  .mz-popup-logo {
    min-height: 66px;
  }

  .mz-popup-logo img {
    max-width: 76%;
    max-height: 78px;
  }

  .mz-popup-title {
    font-size: 25px;
  }

  .mz-popup-description {
    font-size: 14px;
    line-height: 1.8;
  }

  .mz-coupon-box {
    min-height: 61px;
  }

  .mz-coupon-code {
    font-size: 34px;
  }

  .mz-popup-actions {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .mz-popup-button {
    min-height: 51px;
    padding: 9px 10px;
    font-size: 14px;
  }
}

@media (max-width: 350px) {
  .mz-popup-actions {
    grid-template-columns: 1fr;
  }
}