/* "Stay updated" (fragments/components/modal/modal.html, newsletter.js): a small card in the bottom-right corner, along
   the bottom on mobile. It doesn't dim the page, slides in once and takes its colours from the theme tokens. */
.nl-card {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1500;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  padding: 18px 18px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease;
}

.nl-card[hidden] {
  display: none;
}

.nl-card.is-open {
  opacity: 1;
  transform: none;
}

.nl-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.nl-close:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.nl-close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.nl-close .icon {
  width: 18px;
  height: 18px;
}

.nl-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 32px;
}

.nl-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.nl-icon .icon {
  width: 20px;
  height: 20px;
  color: var(--link);
}

.nl-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  line-height: 1.3;
}

.nl-text {
  margin: 0;
  color: var(--text-muted);
  font-size: .9375rem;
  line-height: 1.5;
}

.nl-benefits {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  font-size: .9375rem;
  list-style: none;
}

.nl-benefits li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nl-benefits .icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--link);
}

.nl-form {
  display: grid;
  gap: 10px;
  margin: 2px 0 0;
}

.nl-form__row {
  display: flex;
  gap: 8px;
}

.nl-form__row input {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.nl-form__row input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.nl-form__row .pill-primary {
  min-height: 44px;
  padding: 0 20px;
}

.nl-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nl-card .recaptcha-note {
  margin: 0;
  font-size: .75rem;
}

.nl-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--success-soft);
  color: var(--text);
  font-weight: 600;
}

.nl-alert[hidden] {
  display: none;
}

.nl-alert .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--success);
}

.nl-alert.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.nl-alert.is-error .icon {
  display: none;
}

.nl-form.is-subscribed .nl-form__row,
.nl-form.is-subscribed .recaptcha-note {
  display: none;
}

@media (max-width: 767px) {
  .nl-card {
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nl-card {
    transition: none;
  }
}
