.newsletter-popup {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(19, 24, 41, 0.48);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.newsletter-popup.is-open {
  opacity: 1;
  visibility: visible;
}

.newsletter-popup__panel {
  position: relative;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(80% 70% at 100% 0%, rgba(91, 108, 245, 0.26), transparent 58%),
    linear-gradient(155deg, #ffffff 0%, #f8f9ff 58%, #eef0ff 100%);
  box-shadow: 0 28px 64px -30px rgba(19, 24, 41, 0.66);
  color: #131829;
  transform: translateY(12px) scale(.98);
  transition: transform .24s ease;
}

.newsletter-popup.is-open .newsletter-popup__panel {
  transform: translateY(0) scale(1);
}

.newsletter-popup__close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid #eef0f5;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  line-height: 1;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.newsletter-popup__close:hover {
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.32);
  background: #fff;
}

.newsletter-popup__body {
  padding: 48px 22px 22px;
}

.newsletter-popup__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  padding: 6px 11px;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: 99px;
  background: rgba(79, 70, 229, 0.08);
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
}

.newsletter-popup__badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.22);
}

.newsletter-popup h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.08;
  letter-spacing: -0.45px;
  font-weight: 800;
}

.newsletter-popup p {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.48;
}

.newsletter-popup form {
  margin-top: 17px;
}

.newsletter-popup__input {
  width: 100%;
  height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #131829;
  font: inherit;
  font-size: 15px;
  padding: 0 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.newsletter-popup__input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.newsletter-popup__privacy {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}

.newsletter-popup__privacy input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #4f46e5;
}

.newsletter-popup__privacy a {
  color: #4f46e5;
  font-weight: 800;
  text-decoration: none;
}

.newsletter-popup__privacy a:hover {
  text-decoration: underline;
}

.newsletter-popup__submit {
  width: 100%;
  height: 48px;
  margin-top: 15px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(150deg, #5b6cf5, #4f46e5 55%, #4133b7);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 18px 34px -16px rgba(79, 70, 229, 0.85);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.newsletter-popup__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px -18px rgba(79, 70, 229, 0.95);
}

.newsletter-popup__submit:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}

.newsletter-popup__status {
  min-height: 19px;
  margin-top: 10px;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 700;
}

.newsletter-popup__status.is-error {
  color: #b91c1c;
}

.newsletter-popup__status.is-success {
  color: #047857;
}

.newsletter-popup__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 430px) {
  .newsletter-popup {
    align-items: end;
    padding: 12px;
  }

  .newsletter-popup__panel {
    width: 100%;
    border-radius: 18px;
  }

  .newsletter-popup__body {
    padding: 46px 16px 18px;
  }

  .newsletter-popup h2 {
    font-size: 21px;
  }

  .newsletter-popup p {
    font-size: 13.5px;
  }

  .newsletter-popup__input,
  .newsletter-popup__submit {
    height: 46px;
  }
}
