/*
 * Email styles. Linked from app/views/layouts/mailer.html.erb and inlined
 * onto matching elements by premailer-rails at delivery time. Keep selectors
 * simple (class or type) — premailer applies them as style="" attributes.
 *
 * Visual language matches the welcome email: letter-style, no card chrome,
 * system font, sober palette, accent cyan only on links and emphasis.
 */

/* Scoped to .email-body (not bare `body`) because Propshaft's stylesheet_link_tag
 * pulls every CSS file in app/assets/stylesheets/ into every page in the app —
 * a bare `body` rule here would override the app's dark-mode background. */
.email-body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
}

.email-wrapper {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  color: #52525b;
  font-size: 15px;
  line-height: 1.55;
}

.email-eyebrow {
  margin: 0 0 24px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.email-headline {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: #18181b;
}

.email-p {
  margin: 0 0 16px;
  color: #52525b;
}

.email-em {
  color: #18181b;
  font-weight: 600;
}

.email-link {
  color: #01B2FF;
  text-decoration: underline;
}

.email-meta {
  color: #a1a1aa;
  font-size: 13px;
}

.email-divider {
  border: 0;
  border-top: 1px solid #e4e4e7;
  margin: 32px 0 24px;
  height: 0;
}

.email-footer {
  margin-top: 24px;
  font-size: 12px;
  line-height: 1.6;
  color: #a1a1aa;
}

.email-footer-link {
  color: #71717a;
  text-decoration: underline;
}

/* Digest-specific */
.email-group {
  margin: 24px 0;
}

.email-group-name {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
}

.email-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.email-list-item {
  margin: 0 0 10px;
  padding: 0;
  color: #52525b;
}

.email-list-item-meta {
  color: #a1a1aa;
}

/* Campaign emails: hidden preview text + free-form rich-text body */
.email-preheader {
  display: none !important;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  mso-hide: all;
}

.email-prose h2 {
  margin: 32px 0 12px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: #18181b;
}

.email-prose h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  color: #18181b;
}

.email-prose h4 {
  margin: 20px 0 8px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: #18181b;
}

.email-prose p {
  margin: 0 0 16px;
  color: #52525b;
  line-height: 1.55;
}

.email-prose li {
  color: #52525b;
  line-height: 1.55;
}

.email-prose a {
  color: #01B2FF;
  text-decoration: underline;
}

.email-prose ul,
.email-prose ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

/* Mirrors .email-divider — the `border-top` + `height: 0` shape is what
   survives Outlook, which ignores a plain `border` on an <hr>. */
.email-prose hr {
  border: 0;
  border-top: 1px solid #e4e4e7;
  margin: 32px 0;
  height: 0;
}

/* Lexxy's code block serializes to a bare <pre> (no inner <code>). Email
   clients can't scroll an overflowing block, so long lines wrap instead. */
.email-prose pre {
  margin: 0 0 16px;
  padding: 12px 14px;
  background-color: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #3f3f46;
  white-space: pre-wrap;
  word-break: break-word;
}

.email-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #3f3f46;
}

.email-prose blockquote {
  margin: 0 0 16px;
  padding-left: 16px;
  border-left: 2px solid #e4e4e7;
  color: #71717a;
}

.email-prose img {
  max-width: 100%;
  height: auto;
}

.email-prose figure,
.email-prose action-text-attachment {
  margin: 0 0 16px;
}
