/* Case Your Space — MailPoet newsletter capture popup */
.cys-newsletter-popup {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.cys-newsletter-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cys-newsletter-popup__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 7, 18, .78);
  backdrop-filter: blur(9px);
  cursor: default;
}

.cys-newsletter-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 34px));
  overflow: hidden;
  border: 1px solid rgba(25, 211, 255, .28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 84% 12%, rgba(199, 245, 0, .13), transparent 30%),
    radial-gradient(circle at 14% 88%, rgba(25, 211, 255, .11), transparent 34%),
    #071126;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .58), 0 0 0 1px rgba(255,255,255,.02) inset;
  color: #dce8f5;
  transform: translateY(18px) scale(.985);
  transition: transform .24s ease;
}

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

.cys-newsletter-popup__dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image:
    linear-gradient(rgba(25, 211, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 211, 255, .12) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 72%);
}

.cys-newsletter-popup__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #19d3ff 0%, #c7f500 58%, #8b5cf6 100%);
  box-shadow: 0 0 24px rgba(199,245,0,.38);
}

.cys-newsletter-popup__inner {
  position: relative;
  z-index: 2;
  padding: 38px 40px 34px;
}

.cys-newsletter-popup__close {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(9, 22, 46, .78);
  color: #aebed0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.cys-newsletter-popup__close:hover,
.cys-newsletter-popup__close:focus-visible {
  border-color: rgba(199, 245, 0, .62);
  background: rgba(199, 245, 0, .08);
  color: #c7f500;
  outline: none;
}

.cys-newsletter-popup__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  color: #19d3ff;
  font: 800 10px/1.2 "Manrope", sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.cys-newsletter-popup__eyebrow::before {
  content: "";
  width: 19px;
  height: 2px;
  background: #c7f500;
  box-shadow: 0 0 12px rgba(199,245,0,.48);
}

.cys-newsletter-popup h2 {
  max-width: 540px;
  margin: 0;
  color: #fff;
  font: 700 clamp(28px, 4vw, 42px)/1.04 "Sora", sans-serif;
  letter-spacing: -.045em;
}

.cys-newsletter-popup__copy {
  max-width: 540px;
  margin: 15px 0 0;
  color: #aebed0;
  font: 500 14px/1.7 "Manrope", sans-serif;
}

.cys-newsletter-popup__form {
  margin-top: 25px;
}

.cys-newsletter-popup__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.cys-newsletter-popup__input {
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  border: 1px solid rgba(25, 211, 255, .22);
  border-radius: 10px;
  background: rgba(3, 12, 28, .84);
  color: #fff;
  padding: 0 15px;
  font: 600 14px/1 "Manrope", sans-serif;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.cys-newsletter-popup__input::placeholder { color: #627894; }

.cys-newsletter-popup__input:focus {
  border-color: #19d3ff;
  background: #08162d;
  box-shadow: 0 0 0 3px rgba(25, 211, 255, .1);
}

.cys-newsletter-popup__submit {
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid #c7f500;
  border-radius: 10px;
  background: #c7f500;
  color: #071126;
  font: 900 12px/1 "Manrope", sans-serif;
  letter-spacing: .035em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(199,245,0,.12);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.cys-newsletter-popup__submit:hover,
.cys-newsletter-popup__submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 34px rgba(199,245,0,.22);
  filter: brightness(1.04);
  outline: none;
}

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

.cys-newsletter-popup__privacy {
  margin: 11px 0 0;
  color: #6f849f;
  font: 500 10.5px/1.55 "Manrope", sans-serif;
}

.cys-newsletter-popup__privacy a {
  color: #93a9c1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cys-newsletter-popup__message {
  min-height: 18px;
  margin: 10px 0 0;
  color: #ffb7b7;
  font: 700 11px/1.45 "Manrope", sans-serif;
}

.cys-newsletter-popup__success {
  display: none;
  margin-top: 24px;
  padding: 18px 18px 17px;
  border: 1px solid rgba(199, 245, 0, .28);
  border-radius: 12px;
  background: rgba(199, 245, 0, .055);
}

.cys-newsletter-popup.is-success .cys-newsletter-popup__form { display: none; }
.cys-newsletter-popup.is-success .cys-newsletter-popup__success { display: block; }

.cys-newsletter-popup__success strong {
  display: block;
  color: #c7f500;
  font: 700 15px/1.3 "Sora", sans-serif;
}

.cys-newsletter-popup__success p {
  margin: 6px 0 0;
  color: #c6d3e1;
  font: 500 12px/1.6 "Manrope", sans-serif;
}

body.cys-newsletter-open { overflow: hidden; }

@media (max-width: 640px) {
  .cys-newsletter-popup { padding: 12px; align-items: end; }
  .cys-newsletter-popup__dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    border-radius: 18px 18px 12px 12px;
  }
  .cys-newsletter-popup__inner { padding: 34px 20px 24px; }
  .cys-newsletter-popup h2 { font-size: clamp(27px, 9vw, 36px); }
  .cys-newsletter-popup__copy { font-size: 13px; }
  .cys-newsletter-popup__fields { grid-template-columns: 1fr; }
  .cys-newsletter-popup__submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cys-newsletter-popup,
  .cys-newsletter-popup__dialog,
  .cys-newsletter-popup__submit { transition: none !important; }
}
