/* Retire only the legacy MailPoet popup. Inline subscribe forms remain intact. */
#mp_form_popup1,
body > .mailpoet_form_popup_overlay:has(+ #mp_form_popup1) {
  display: none !important;
}

html.sgd-app-download-popup-is-open {
  overflow: hidden;
}

.sgd-app-download-popup {
  position: fixed;
  overflow: visible;
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.48fr);
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: center;
  background:
    radial-gradient(circle at 82% 12%, rgb(241 90 41 / 42%), transparent 31%),
    linear-gradient(145deg, #1d3039 0%, #14232b 68%);
  box-shadow: 0 2rem 6rem rgb(7 17 22 / 48%);
  color: #fff;
}

.sgd-app-download-popup[open] {
  display: grid;
  animation: sgd-app-popup-enter 240ms ease-out both;
}

.sgd-app-download-popup::backdrop {
  background: rgb(10 18 23 / 72%);
  backdrop-filter: blur(5px);
}

.sgd-app-download-popup__close {
  position: absolute;
  z-index: 3;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50%;
  place-items: center;
  background: rgb(7 18 24 / 62%);
  color: #fff;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.sgd-app-download-popup__close:hover {
  background: #fff;
  color: #14232b;
}

.sgd-app-download-popup__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.sgd-app-download-popup__eyebrow {
  margin: 0 0 0.55rem;
  color: #ffb493;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.sgd-app-download-popup h2 {
  max-width: 470px;
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 5.2vw, 3.65rem);
  line-height: 0.98;
  text-wrap: balance;
}

.sgd-app-download-popup__description {
  max-width: 430px;
  margin: 1rem 0 0;
  color: #e5edf0;
  font-size: clamp(1rem, 2vw, 1.16rem);
  font-weight: 650;
  line-height: 1.45;
}

.sgd-app-download-popup__features {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 1.15rem 0 1.35rem;
  gap: 0.45rem;
  list-style: none;
}

.sgd-app-download-popup__features li {
  padding: 0.38rem 0.68rem;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 850;
}

.sgd-app-download-popup__download {
  display: flex;
  width: min(100%, 350px);
  min-height: 56px;
  padding: 0.8rem 1.05rem;
  border-radius: 0.85rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #e8612d;
  box-shadow: 0 0.8rem 1.8rem rgb(5 14 19 / 26%);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 900;
  text-decoration: none;
}

.sgd-app-download-popup__download:hover {
  background: #bd4219;
  color: #fff;
  transform: translateY(-1px);
}

.sgd-app-download-popup__download span:last-child {
  font-size: 1.35rem;
}

.sgd-app-download-popup__later {
  min-height: 44px;
  padding: 0.55rem 0.25rem;
  border: 0;
  background: transparent;
  color: #d8e1e5;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.sgd-app-download-popup__availability {
  margin: 0.15rem 0 0;
  color: #aebdc4;
  font-size: 0.7rem;
  line-height: 1.4;
}

.sgd-app-download-popup__visual {
  position: relative;
  z-index: 1;
  display: grid;
  margin: 0;
  place-items: center;
}

.sgd-app-download-popup__phone {
  position: relative;
  overflow: hidden;
  width: min(205px, 100%);
  aspect-ratio: 1320 / 2868;
  border: 8px solid #060b0e;
  border-radius: 2.15rem;
  background: #fff;
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 38%);
  transform: rotate(3deg);
}

.sgd-app-download-popup__phone::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgb(255 255 255 / 16%), transparent 32% 80%, rgb(255 255 255 / 8%));
  content: "";
  pointer-events: none;
}

.sgd-app-download-popup__phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sgd-app-download-popup :focus-visible {
  outline: 3px solid #ffb493;
  outline-offset: 3px;
}

@keyframes sgd-app-popup-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 620px) {
  .sgd-app-download-popup {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 1.35rem 1.1rem;
    border-radius: 1.2rem;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 0.85rem;
  }

  .sgd-app-download-popup__close {
    top: 0.5rem;
    right: 0.5rem;
  }

  .sgd-app-download-popup h2 {
    padding-right: 0.2rem;
    font-size: clamp(1.75rem, 8.7vw, 2.45rem);
  }

  .sgd-app-download-popup__description {
    margin-top: 0.75rem;
    font-size: 0.93rem;
  }

  .sgd-app-download-popup__features {
    margin: 0.85rem 0 1rem;
    gap: 0.35rem;
  }

  .sgd-app-download-popup__features li {
    padding: 0.28rem 0.52rem;
    font-size: 0.66rem;
  }

  .sgd-app-download-popup__download {
    min-height: 52px;
    font-size: 0.94rem;
  }

  .sgd-app-download-popup__phone {
    width: 108px;
    border-width: 5px;
    border-radius: 1.35rem;
    transform: rotate(2deg);
  }
}

@media (max-width: 350px) {
  .sgd-app-download-popup {
    grid-template-columns: minmax(0, 1fr) 88px;
    padding-inline: 0.9rem;
  }

  .sgd-app-download-popup__phone {
    width: 84px;
  }

  .sgd-app-download-popup__features {
    display: none;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .sgd-app-download-popup {
    width: min(720px, calc(100vw - 24px));
    max-height: calc(100dvh - 16px);
    padding-block: 1rem;
  }

  .sgd-app-download-popup__phone {
    width: 118px;
  }

  .sgd-app-download-popup__features {
    margin-block: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sgd-app-download-popup[open] {
    animation: none;
  }

  .sgd-app-download-popup__download:hover {
    transform: none;
  }
}
