.newsletter-dialog {
  width: min(calc(100vw - 1rem), 34rem);
  max-width: none;
  max-height: calc(100dvh - 1rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1.5rem;
  background: transparent;
  color: #1e293b;
}
.newsletter-dialog::backdrop {
  background: rgb(15 23 42 / 66%);
  backdrop-filter: blur(4px);
}
.newsletter-dialog__body {
  max-height: calc(100dvh - 1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 24px 60px rgb(15 23 42 / 25%);
}
.newsletter-dialog__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.newsletter-dialog__badge {
  display: inline-flex;
  align-items: center;
  padding: .4rem .75rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.newsletter-dialog__close {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.newsletter-dialog__close:hover { background: #f1f5f9; color: #0f172a; }
.newsletter-dialog__close svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}
.newsletter-dialog h2 {
  margin: .75rem 0 0;
  color: #0f172a;
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 800;
  line-height: 1.2;
}
.newsletter-dialog__description {
  margin: .75rem 0 0;
  color: #475569;
  font-size: .9rem;
  line-height: 1.65;
}
.newsletter-form { margin-top: 1.5rem; }
.newsletter-form fieldset {
  display: grid;
  gap: 1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.newsletter-form__row { display: flex; gap: .75rem; }
.newsletter-form input[type="email"] {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: .75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
}
.newsletter-form input[type="email"]:focus-visible,
.newsletter-form input[type="checkbox"]:focus-visible,
.newsletter-form button:focus-visible,
.newsletter-fab__button:focus-visible,
.newsletter-dialog__close:focus-visible {
  outline: 3px solid #a5b4fc;
  outline-offset: 2px;
}
.newsletter-form__row button {
  min-height: 3rem;
  padding: .75rem 1.25rem;
  border: 0;
  border-radius: .75rem;
  background: #4f46e5;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.newsletter-form__row button:hover:not(:disabled) { background: #4338ca; }
.newsletter-form button:disabled { cursor: not-allowed; opacity: .55; }
.newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  color: #475569;
  font-size: .85rem;
  line-height: 1.6;
}
.newsletter-consent input { flex: 0 0 auto; margin-top: .25rem; accent-color: #4f46e5; }
.newsletter-consent a { color: #4338ca; font-weight: 700; text-underline-offset: 2px; }
.newsletter-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.newsletter-form [data-newsletter-status] {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: #475569;
  font-size: .875rem;
  line-height: 1.6;
}
.newsletter-fab {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgb(226 232 240 / 90%);
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 -8px 24px rgb(15 23 42 / 8%);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.newsletter-fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.newsletter-fab__button {
  display: flex;
  width: 100%;
  max-width: 24rem;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: 0 auto;
  padding: .75rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 12px 24px rgb(15 23 42 / 20%);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.newsletter-fab__button:hover { background: #4338ca; }
.newsletter-fab__button svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
@media (min-width: 640px) {
  .newsletter-fab {
    inset-inline: auto;
    right: 1.5rem;
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .newsletter-fab__button { width: auto; margin: 0; }
}
@media (max-width: 639px) {
  body.newsletter-has-fab { padding-bottom: 6rem; }
  .newsletter-form__row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .newsletter-fab { transition: none; }
}
@supports not (height: 100dvh) {
  .newsletter-dialog,
  .newsletter-dialog__body { max-height: calc(100vh - 1rem); }
}
