body.mep-popup-open {
  overflow: hidden;
}

.mep-popup-root[hidden] {
  display: none !important;
}

.mep-popup-root {
  position: fixed;
  inset: 0;
  z-index: 999999;
  font-family: Arial, sans-serif;
}

.mep-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.66);
  backdrop-filter: blur(3px);
}

.mep-popup {
  position: relative;
  width: min(92vw, 520px);
  margin: 10vh auto 0;
  padding: 32px 28px 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f1fbf9 100%);
  border-radius: 20px;
  border: 1px solid rgba(13, 148, 136, 0.18);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.25);
  text-align: center;
}

.mep-template-fullscreen .mep-popup {
  width: calc(100vw - 40px);
  min-height: calc(100vh - 40px);
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mep-template-slidein .mep-popup-backdrop,
.mep-template-topbar .mep-popup-backdrop,
.mep-template-bottombar .mep-popup-backdrop,
.mep-template-social_widget .mep-popup-backdrop {
  background: transparent;
  backdrop-filter: none;
}

.mep-template-slidein .mep-popup {
  width: min(92vw, 390px);
  margin-top: auto;
  margin-bottom: 24px;
}

.mep-position-left .mep-popup {
  margin-left: 24px;
  margin-right: auto;
}

.mep-position-right .mep-popup {
  margin-left: auto;
  margin-right: 24px;
}

.mep-template-topbar .mep-popup,
.mep-template-bottombar .mep-popup {
  width: calc(100vw - 24px);
  max-width: 1180px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.mep-template-topbar .mep-popup {
  margin-top: 12px;
}

.mep-template-bottombar .mep-popup {
  margin-top: auto;
  margin-bottom: 12px;
}

.mep-template-social_widget .mep-popup {
  width: min(92vw, 340px);
  margin-top: auto;
  margin-bottom: 18px;
  margin-left: auto;
  margin-right: 18px;
}

.mep-popup-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ccfbf1;
  color: #115e59;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mep-popup h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.15;
}

.mep-popup-description {
  margin: 0 0 22px;
  color: #334155;
  font-size: 16px;
  line-height: 1.65;
}

.mep-popup-media {
  margin: -8px -8px 18px;
}

.mep-popup-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.mep-popup-wheel {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  background: conic-gradient(#fb7185, #f59e0b, #14b8a6, #6366f1, #fb7185);
}

.mep-popup-countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}

.mep-popup-countdown span {
  display: block;
  padding: 12px 8px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
  font-weight: 700;
}

.mep-popup-form {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

.mep-popup-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
}

.mep-popup-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.mep-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 14px 20px;
  background: #16a34a;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.28);
}

.mep-popup-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 14px 20px;
  background: rgba(148, 163, 184, 0.12);
  color: #0f172a;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  cursor: pointer;
}

.mep-popup-cta:hover,
.mep-popup-cta:focus {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.35);
}

.mep-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.9);
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mep-popup-social {
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
}

.mep-theme-emerald .mep-popup {
  background: linear-gradient(180deg, #ffffff 0%, #effdf4 100%);
}

.mep-theme-emerald .mep-popup-eyebrow {
  background: #dcfce7;
  color: #166534;
}

.mep-theme-midnight .mep-popup {
  background: linear-gradient(180deg, #0f172a 0%, #172033 100%);
}

.mep-theme-midnight .mep-popup h2,
.mep-theme-midnight .mep-popup-description,
.mep-theme-midnight .mep-popup-secondary,
.mep-theme-midnight .mep-popup-social {
  color: #f8fafc;
}

.mep-theme-midnight .mep-popup-countdown span,
.mep-theme-midnight .mep-popup-secondary {
  background: rgba(255, 255, 255, 0.08);
}

.mep-theme-midnight .mep-popup-eyebrow {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}

.mep-theme-midnight .mep-popup-cta {
  background: #6366f1;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.28);
}

.mep-theme-sunset .mep-popup {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
}

.mep-theme-sunset .mep-popup-eyebrow {
  background: #fed7aa;
  color: #9a3412;
}

.mep-theme-sunset .mep-popup-cta {
  background: #ea580c;
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.28);
}

@media (max-width: 640px) {
  .mep-popup {
    width: calc(100vw - 24px);
    margin-top: 14vh;
    padding: 28px 20px 24px;
  }

  .mep-popup h2 {
    font-size: 25px;
  }

  .mep-popup-description {
    font-size: 15px;
  }

  .mep-popup-cta,
  .mep-popup-secondary {
    width: 100%;
    min-width: 0;
  }
}
