/* === Всплывающее окно подписки на рассылку (inc/newsletter.php) === */
.ars-newsletter[hidden] { display: none; }
.ars-newsletter {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ars-newsletter.is-visible { opacity: 1; }
.ars-newsletter-open { overflow: hidden; }

.ars-newsletter__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 23, 0.45);
}
.ars-newsletter__dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-sizing: border-box;
  padding: 36px 32px 26px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  font-family: "SegoeUIWeb", sans-serif;
  color: #171717;
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.ars-newsletter.is-visible .ars-newsletter__dialog { transform: none; }

.ars-newsletter__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f2;
  color: #171717;
  font-size: 16px;
  line-height: 40px;
  cursor: pointer;
}
.ars-newsletter__close:hover { background: #e6e6e6; }

.ars-newsletter__title {
  margin: 0 48px 12px 0;
  font-size: 24px;
  font-weight: 350;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.ars-newsletter__text {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.5;
}

.ars-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.ars-newsletter__form[hidden] { display: none; }
.ars-newsletter__input {
  width: 100%;
  height: 48px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid rgba(23, 23, 23, 0.2);
  border-radius: 12px;
  background: #fff;
  color: #171717;
  font: inherit;
  font-size: 16px; /* 16px — чтобы iPhone не зумил поле */
  outline: none;
  transition: border-color 0.15s ease;
}
.ars-newsletter__input:focus { border-color: #171717; }
.ars-newsletter__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.ars-newsletter__btn {
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: #171717;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.ars-newsletter__btn:hover { background: #000; }
.ars-newsletter__btn:disabled { opacity: 0.5; cursor: default; }

.ars-newsletter__error {
  margin: 0;
  font-size: 13px;
  color: #b3261e;
}
.ars-newsletter__success {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f4f4f4;
  font-size: 15px;
}
.ars-newsletter__consent {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(23, 23, 23, 0.55);
}
.ars-newsletter__consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Пока открыто окно — cookie-плашку не показываем поверх */
.ars-newsletter-open .ars-cookie-banner { visibility: hidden; }

@media (max-width: 600px) {
  .ars-newsletter {
    align-items: flex-end;
    padding: 0;
  }
  .ars-newsletter__dialog {
    max-width: none;
    max-height: 90vh;
    max-height: 90dvh;
    padding: 28px 20px calc(20px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .ars-newsletter__title { font-size: 20px; }
  .ars-newsletter__text { font-size: 15px; }
}
