/**
 * CRRF newsletter modal.
 * Mirrors the existing footer newsletter CTA and theme design tokens.
 * Kept as a standalone stylesheet to avoid requiring a frontend rebuild.
 */
.crrf-newsletter-overlay[hidden] { display: none !important; }
.crrf-newsletter-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(0, 25, 30, .60);
  animation: crrf-newsletter-backdrop-in 380ms ease-out both;
}
body.crrf-newsletter-modal-open { overflow: hidden; }
.crrf-newsletter-popup {
  position: relative;
  box-sizing: border-box;
  isolation: isolate;
  width: min(100%, 600px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 44px 36px 36px;
  border-radius: 12px;
  background: #fafafa;
  color: #231f20;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
  font-family: "acumin-pro", Helvetica, Arial, sans-serif;
  text-align: left;
  animation: crrf-newsletter-panel-in 440ms cubic-bezier(.22, 1, .36, 1) both;
}
.crrf-newsletter-popup h2 {
  margin: 0 40px 14px 0;
  color: #231f20;
  font-family: "acumin-pro-extra-condensed", Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(3.5rem, 5vw, 5rem);
  line-height: 1.04;
  letter-spacing: normal;
}
.crrf-newsletter-popup p {
  margin: 0 0 22px;
  color: #231f20;
  font-family: "acumin-pro", Helvetica, Arial, sans-serif;
  font-size: 1.9rem;
  line-height: 1.5;
  font-weight: 400;
}
.crrf-newsletter-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
  color: #231f20;
  font-family: Arial, sans-serif;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.crrf-newsletter-popup__close:hover { background: transparent; opacity: .75; }
/* Focus lands on the dialog itself when opened, not on the X. */
.crrf-newsletter-popup:focus { outline: none; }
.crrf-newsletter-popup .crrf-newsletter-popup__link { max-width: 100%; }
.crrf-newsletter-popup :is(button,a):focus-visible {
  outline: 3px solid #ffcd00;
  outline-offset: 4px;
}
@media (max-width: 600px) {
  .crrf-newsletter-overlay { padding: 16px; }
  .crrf-newsletter-popup {
    width: 100%;
    max-height: calc(100dvh - 32px);
    padding: 44px 20px 24px;
    border-radius: 10px;
  }
  .crrf-newsletter-popup h2 { margin-right: 24px; font-size: 3.8rem; }
  .crrf-newsletter-popup p { font-size: 1.7rem; line-height: 1.5; }
}

/* Ease the invitation into view without a sudden overlay or dramatic motion. */
@keyframes crrf-newsletter-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes crrf-newsletter-panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .crrf-newsletter-overlay,
  .crrf-newsletter-popup { animation: none; }
}

/* Slide-in variant: same content and CTA, no backdrop or page scroll lock. */
.crrf-newsletter-overlay--slide-in {
  inset: auto 24px 24px auto;
  display: block;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  background: transparent;
  animation: none;
  pointer-events: none;
}
.crrf-newsletter-overlay--slide-in .crrf-newsletter-popup {
  width: 100%;
  max-height: calc(100dvh - 32px);
  padding: 32px 24px 24px;
  border: 1px solid #d9d9d9;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  pointer-events: auto;
  animation: crrf-newsletter-slide-in 440ms cubic-bezier(.22, 1, .36, 1) both;
}
.crrf-newsletter-overlay--slide-in .crrf-newsletter-popup h2 { font-size: 3.8rem; }
.crrf-newsletter-overlay--slide-in .crrf-newsletter-popup p { font-size: 1.7rem; }
@keyframes crrf-newsletter-slide-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .crrf-newsletter-overlay--slide-in { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .crrf-newsletter-overlay--slide-in .crrf-newsletter-popup { padding: 32px 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .crrf-newsletter-overlay--slide-in .crrf-newsletter-popup { animation: none; }
}

/* Close with a gentle exit animation. */
.crrf-newsletter-overlay.crrf-newsletter-is-closing { opacity: 0; transition: opacity 240ms ease; animation: none; pointer-events: none; }
.crrf-newsletter-is-closing .crrf-newsletter-popup { opacity: 0; transform: translateY(12px); transition: opacity 240ms ease, transform 240ms ease; animation: none; }
.crrf-newsletter-popup p { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .crrf-newsletter-overlay--slide-in .crrf-newsletter-popup h2 { font-size: clamp(2.7rem, 12vw, 3.5rem); }
  .crrf-newsletter-overlay--slide-in .crrf-newsletter-popup p { font-size: 1.2rem; line-height: 1.45; }
}
@media (prefers-reduced-motion: reduce) {
  .crrf-newsletter-overlay.crrf-newsletter-is-closing,
  .crrf-newsletter-is-closing .crrf-newsletter-popup { transition: none; }
}
