theme-newsletter-popup {
  display: block;
}

.newsletter-popup[hidden] {
  display: none;
}

.newsletter-popup__wrap {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.newsletter-popup__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(var(--color-text), 0.46);
  animation: newsletter-popup-in 0.28s ease;
}

@keyframes newsletter-popup-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.newsletter-popup__modal {
  background: rgba(var(--color-background));
  color: rgba(var(--color-text));
  border-radius: var(--kit-radius);
  padding: 40px 32px 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.newsletter-popup__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: rgba(var(--color-light-text));
  line-height: 1;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.newsletter-popup__form-view,
.newsletter-popup__success {
  text-align: center;
}

.newsletter-popup__success {
  display: none;
  padding: 12px 0 8px;
}

.newsletter-popup.is-done .newsletter-popup__success {
  display: block;
}

.newsletter-popup.is-done .newsletter-popup__form-view {
  display: none;
}

.newsletter-popup__eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--color-button-background));
  font-weight: 700;
  margin-bottom: 12px;
}

.kit .newsletter-popup__heading {
  font-family: var(--kit-font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 12px;
}

.kit .newsletter-popup__text {
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(var(--color-light-text));
  margin: 0 0 22px;
}

.newsletter-popup__form-view form {
  margin: 0;
}

.newsletter-popup__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-popup__input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 999px;
  border: 1px solid rgba(var(--color-entry-line), 0.1);
  font-size: 15px;
  font-family: var(--kit-font-body);
  background: rgba(var(--color-card-background));
  color: rgba(var(--color-text));
  margin: 0;
}

.kit .newsletter-popup__button {
  width: 100%;
  padding: 15px;
  font-size: 15px;
}

.newsletter-popup__error {
  font-size: 13px;
  color: rgb(var(--color-error-message));
}

.newsletter-popup__error:empty {
  display: none;
}

.kit .newsletter-popup__decline {
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 12px;
  font-size: 13px;
  color: rgba(var(--color-light-text));
}

.newsletter-popup__success-title {
  font-family: var(--kit-font-display);
  font-weight: 800;
  font-size: 28px;
  margin-bottom: 10px;
  color: rgba(var(--color-highlight));
}

.kit .newsletter-popup__success-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: rgba(var(--color-light-text));
}

@media (hover: hover) and (pointer: fine) {
  .newsletter-popup__close:hover {
    transform: scale(1.08);
    opacity: 0.82;
  }
}

@media (max-width: 800px) {
  .newsletter-popup__modal {
    padding: 28px 20px 24px;
  }
}
