.newsletter-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(78, 52, 36, 0.45);
}

.newsletter-popup[hidden] {
  display: none;
}

.newsletter-popup__panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(78, 52, 36, 0.25);
}

.newsletter-popup__panel .newsletter-form {
  max-width: none;
  align-items: stretch;
  width: 100%;
}

.newsletter-popup__panel .newsletter-form form {
  align-items: stretch;
}

.newsletter-popup__illustration {
  display: block;
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: contain;
  margin: 0 auto var(--space-sm);
}

.newsletter-popup__panel h2 {
  font-size: var(--text-md);
  margin: 0 0 var(--space-xs);
}

.newsletter-popup__panel > p {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-md);
}

.newsletter-popup__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: none;
  border: none;
  font-size: var(--text-md);
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  color: var(--color-text-muted);
}

.newsletter-popup__decline {
  display: block;
  margin-top: var(--space-sm);
  background: none;
  border: none;
  color: var(--color-text-muted);
  text-decoration: underline;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 8px 0;
}

@media (prefers-reduced-motion: no-preference) {
  .newsletter-popup__panel {
    animation: newsletter-popup-in 0.2s ease-out;
  }
}

@keyframes newsletter-popup-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .newsletter-popup {
    align-items: flex-end;
    padding: 0;
  }

  .newsletter-popup__panel {
    max-width: none;
    width: 100%;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    max-height: 85vh;
  }
}
