html.newsletter-open { overflow: hidden; }

.newsletter-dialog {
  box-sizing: border-box;
  width: min(500px, calc(100% - 32px));
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dae4ed;
  border-radius: 24px;
  background: #fff;
  color: #174573;
  box-shadow: 0 24px 90px #122d4b40;
  font-family: inherit;
}
.newsletter-dialog[open] { display: flex; flex-direction: column; }
.newsletter-dialog::backdrop { background: #102b49a6; }
.newsletter-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 20px 10px 28px;
  border-bottom: 1px solid #e7eef5;
}
.newsletter-brand { font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.newsletter-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f5f8;
  color: #174573;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.newsletter-body {
  min-width: 0;
  min-height: 0;
  padding: 28px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
}
.newsletter-dialog h2 { margin: 8px 0 12px; font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
.newsletter-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .07em; color: #52657a; }
.newsletter-description, .newsletter-invite p { font-size: 16px; line-height: 1.6; color: #42586d; }
.newsletter-demo { display: grid; gap: 12px; margin-top: 20px; }
.newsletter-demo > label { font-size: 14px; font-weight: 600; }
.newsletter-demo input[type=email] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #a4b6c7;
  border-radius: 10px;
  background: #fff;
  color: #174573;
  font: inherit;
  font-size: 16px;
}
.newsletter-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; line-height: 1.5; color: #42586d; font-weight: 400 !important; }
.newsletter-consent input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: #174573; }
.newsletter-consent-note { margin: -4px 0 4px 30px; color: #54677a; font-size: 14px; line-height: 1.5; }
.newsletter-button { display: inline-block; min-height: 48px; padding: 13px 22px; border: 0; border-radius: 10px; background: #174573; color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.newsletter-button:hover { background: #10375d; }
.newsletter-dialog :focus-visible, .newsletter-invite :focus-visible { outline: 3px solid #d39430; outline-offset: 3px; }
.newsletter-note { margin-top: 16px; font-size: 14px; line-height: 1.5; color: #54677a; text-align: center; }
.newsletter-preview { margin-top: 16px; padding: 9px 12px; border-radius: 8px; background: #fff0d4; color: #70470f; font-size: 14px; line-height: 1.5; }
.newsletter-status { font-size: 14px; line-height: 1.5; color: #174573; }
.newsletter-status:empty { display: none; }
.newsletter-feedback {
  position: fixed;
  z-index: 3000;
  top: calc(var(--header-h, 72px) + 12px);
  left: 16px;
  right: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  max-width: 480px;
  margin-inline: auto;
  padding: 16px;
  border: 1px solid #b9d9c6;
  border-radius: 14px;
  background: #f1f8f4;
  color: #174573;
  box-shadow: 0 8px 32px #122d4b1a;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}
.newsletter-feedback[hidden] { display: none; }
.newsletter-feedback p { flex: 1; margin: 0; }
.newsletter-feedback button { flex: none; width: 44px; height: 44px; margin: -8px -8px -8px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #174573; font: inherit; font-size: 26px; cursor: pointer; }
.newsletter-success-page { box-sizing: border-box; min-height: 100dvh; margin: 0; display: grid; place-items: center; padding: 24px; background: #fff; color: #174573; font-family: system-ui, sans-serif; }
.newsletter-success-card { max-width: 420px; width: 100%; }
.newsletter-success-card a { color: inherit; text-decoration: none; }
.newsletter-success-card .newsletter-brand { display: inline-block; margin-bottom: 32px; }
.newsletter-success-icon { display: block; margin-bottom: 20px; }
.newsletter-success-card h1 { margin: 0 0 16px; font-size: 30px; line-height: 1.2; }
.newsletter-success-card p { margin: 0 0 16px; color: #42586d; font-size: 16px; line-height: 1.6; }
.newsletter-success-card .newsletter-success-hint { font-size: 14px; }
.newsletter-success-card .newsletter-button { box-sizing: border-box; margin-top: 12px; color: #fff; text-align: center; }
.newsletter-invite { box-sizing: border-box; max-width: 900px; margin: 48px auto; padding: 32px; border: 1px solid #d4e1eb; border-radius: 20px; background: #f0f5f9; text-align: center; }
.newsletter-invite h2 { font-size: 1.5rem; line-height: 1.3; }
.newsletter-invite p { margin: 12px auto 20px; max-width: 620px; }

/* The hosted document controls its own fields, text wrapping and CAPTCHA.
   Those require the Brevo HTML export or a change in the Brevo editor. */
.newsletter-dialog--hosted { width: min(640px, calc(100% - 24px)); height: min(820px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); }
.newsletter-dialog--hosted .newsletter-body { display: flex; flex: 1; padding: 0; overflow: hidden; }
.newsletter-dialog--hosted .newsletter-body > .newsletter-eyebrow,
.newsletter-dialog--hosted .newsletter-body > h2,
.newsletter-dialog--hosted .newsletter-body > .newsletter-description,
.newsletter-dialog--hosted .newsletter-body > .newsletter-note { display: none; }
.newsletter-dialog--hosted .newsletter-content { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.newsletter-dialog--hosted .newsletter-content iframe { display: block; flex: 1; min-height: 0; width: 100%; border: 0; }
.newsletter-dialog--hosted .newsletter-content > a { flex: none; margin: 0; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); text-align: center; text-decoration: underline; font-size: 14px; }

@media (max-width: 600px) {
  .newsletter-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 20px; }
  .newsletter-header { min-height: 60px; padding: 8px 12px 8px 20px; }
  .newsletter-body { padding: 22px 20px max(22px, env(safe-area-inset-bottom)); }
  .newsletter-dialog h2 { font-size: 24px; }
  .newsletter-demo .newsletter-button { width: 100%; }
  .newsletter-invite { margin: 32px 16px; padding: 26px 20px; }
  .newsletter-dialog--hosted { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
}
