.newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(9, 18, 35, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.newsletter-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.newsletter-modal__panel {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 396px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #cfdcf3;
  border-radius: 24px;
  padding: 54px 30px 0;
  color: #0a1630;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 64%, #ffffff 100%);
  box-shadow: 0 24px 80px rgba(4, 15, 38, 0.38);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.22s ease;
}

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

.newsletter-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid #cbd8f0;
  border-radius: 50%;
  color: #1655d9;
  background: #ffffff;
  font-size: 32px;
  line-height: 36px;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 66, 153, 0.09);
}

.newsletter-modal__close:active {
  transform: translateY(1px);
}

.newsletter-modal__title {
  margin: 0;
  text-align: center;
  font-size: clamp(38px, 11vw, 48px);
  line-height: 0.98;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.newsletter-modal__title span {
  color: #1455ee;
}

.newsletter-modal__line {
  display: block;
  width: 40px;
  height: 3px;
  margin: 18px auto 14px;
  border-radius: 999px;
  background: #1455ee;
}

.newsletter-modal__text {
  margin: 0 auto;
  max-width: 300px;
  text-align: center;
  color: #4b596f;
  font-size: 16px;
  line-height: 1.42;
  font-weight: 500;
}

.newsletter-modal__text strong {
  color: #1455ee;
  font-weight: 900;
}

.newsletter-modal__features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 24px;
}

.newsletter-feature {
  min-width: 0;
  text-align: center;
}

.newsletter-feature__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  color: #1455ee;
  background: radial-gradient(circle at 35% 28%, #ffffff 0%, #f7fbff 46%, #eaf1ff 100%);
  box-shadow: 0 10px 22px rgba(36, 91, 190, 0.14), inset 0 0 0 1px rgba(203, 216, 240, 0.72);
}

.newsletter-feature__icon svg,
.newsletter-feature__icon img {
  width: 30px;
  height: 30px;
  display: block;
}

.newsletter-feature__icon img {
  width: 58px;
  height: 65px;
  object-fit: contain;
  transform: scale(1.8);
  filter: drop-shadow(0 6px 8px rgba(20, 85, 238, 0.16));
}

.newsletter-feature__label {
  display: block;
  color: #1455ee;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.newsletter-form {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.newsletter-field {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  min-height: 60px;
  margin: 0;
  border: 1px solid #d4deef;
  border-radius: 14px;
  padding: 0 16px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(19, 47, 95, 0.06);
}

.newsletter-field svg {
  width: 22px;
  height: 22px;
  color: #1455ee;
}

.newsletter-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0b245d;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
}

.newsletter-field input::placeholder {
  color: #8792a7;
  opacity: 1;
}

.newsletter-field.is-error {
  border-color: #e45a5a;
  box-shadow: 0 0 0 3px rgba(228, 90, 90, 0.12);
}

.newsletter-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  color: #53637d;
  font-size: 12px;
  line-height: 1.38;
  font-weight: 600;
}

.newsletter-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1455ee;
}

.newsletter-consent.is-error {
  color: #c53d3d;
}

.newsletter-button {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 60px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(180deg, #93c738 0%, #7eac2f 100%);
  box-shadow: 0 14px 24px rgba(126, 172, 47, 0.32);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.newsletter-button > span:first-child {
  grid-column: 2;
  justify-self: center;
}

.newsletter-button:hover {
  background: #93c738;
}

.newsletter-button:active,
.newsletter-button.is-loading {
  background: #6a8f28;
}

.newsletter-button__arrow {
  grid-column: 3;
  justify-self: end;
  font-size: 36px;
  line-height: 1;
  font-weight: 300;
}

.newsletter-message {
  min-height: 18px;
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  color: #53637d;
}

.newsletter-message.is-error {
  color: #c53d3d;
}

.newsletter-message.is-success {
  color: #2f8f1e;
}

.newsletter-safe {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  margin: 14px auto 0;
  color: #53637d;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  text-align: left;
}

.newsletter-safe svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #1455ee;
  flex: 0 0 auto;
}

.newsletter-art {
  position: relative;
  height: 250px;
  margin: 8px -30px 0;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.86) 12%, rgba(255, 255, 255, 0.12) 38%, rgba(255, 255, 255, 0) 100%),
    url("/assets/media/winner-stadium-bg-placeholder.webp") 75% 80% / 300% auto no-repeat;
  pointer-events: none;
}

.newsletter-art::before {
  content: none;
}

.newsletter-art::after {
  content: none;
}

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

@media (max-width: 360px) {
  .newsletter-modal__panel {
    padding-left: 22px;
    padding-right: 22px;
  }

  .newsletter-art {
    margin-left: -22px;
    margin-right: -22px;
    height: 220px;
  }

  .newsletter-button {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .newsletter-modal {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .newsletter-modal__panel {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
}

@media (max-width: 480px) and (max-height: 780px) {
  .newsletter-modal__panel {
    border-radius: 22px;
    padding: 46px 22px 0;
  }

  .newsletter-modal__close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 30px;
    line-height: 34px;
  }

  .newsletter-modal__title {
    font-size: clamp(34px, 10vw, 42px);
  }

  .newsletter-modal__line {
    margin: 12px auto 10px;
  }

  .newsletter-modal__text {
    max-width: 305px;
    font-size: 14.5px;
    line-height: 1.32;
  }

  .newsletter-modal__features {
    gap: 8px;
    margin: 18px 0 16px;
  }

  .newsletter-feature__icon {
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
  }

  .newsletter-feature__icon img {
    width: 54px;
    height: 60px;
    transform: scale(1.68);
  }

  .newsletter-feature__label {
    font-size: 11px;
  }

  .newsletter-form {
    gap: 10px;
  }

  .newsletter-field {
    min-height: 54px;
    padding: 0 14px;
  }

  .newsletter-field input {
    font-size: 16px;
  }

  .newsletter-consent {
    grid-template-columns: 16px 1fr;
    gap: 8px;
    font-size: 10.8px;
    line-height: 1.28;
  }

  .newsletter-consent input {
    width: 16px;
    height: 16px;
  }

  .newsletter-button {
    min-height: 56px;
    font-size: 21px;
  }

  .newsletter-message {
    min-height: 14px;
    font-size: 12px;
  }

  .newsletter-safe {
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
  }

  .newsletter-safe svg {
    width: 16px;
    height: 16px;
  }

  .newsletter-art {
    height: clamp(160px, 26dvh, 190px);
    margin: 6px -22px 0;
  }
}

@media (max-width: 480px) and (max-height: 700px) {
  .newsletter-modal__panel {
    padding-top: 42px;
  }

  .newsletter-modal__title {
    font-size: clamp(31px, 9.2vw, 38px);
  }

  .newsletter-modal__features {
    margin: 14px 0 14px;
  }

  .newsletter-art {
    height: 145px;
  }
}

@media (min-width: 48em), (min-height: 820px) {
  .newsletter-modal {
    align-items: center;
  }
}

@media (min-width: 48em) {
  .newsletter-modal__panel {
    width: 410px;
  }
}
