/* Sample alert e-mail on the közbeszerzés értesítés ad page and the HU
   értesítő page (partials/bodies/_sample-email-preview-hu.html). Mirrors the real weekly
   digest from scripts/alert_templates.py: same hex tokens, font stacks, sizes
   and paddings, minus the CTA rows. Everything is scoped under .sm.
   The section wrapper (.sample-mail-section, .sample-mail__*) is styled in
   css/service-subpages.css. Its head is centred here, like the page's other
   section heads (#friss, the ledgers).
   One container: .sm is the mail itself (the digest's 600px white table),
   the inbox envelope is its top bar on the same border and radius. */

.sample-mail-section .sample-mail__head { max-width: 640px; margin: 0 auto 1.25rem; text-align: center; }

#mintalevel { scroll-margin-top: 72px; }

.sm {
  --sm-cobalt: #2563eb;
  --sm-link: #1d4ed8;
  --sm-ink: #0f172a;
  --sm-ink-78: #444a59;
  --sm-ink-72: #525866;
  --sm-ink-62: #6a6f7b;
  --sm-ink-60: #6f737e;
  --sm-rule: #e2e3e5;
  --sm-cream: #faf8f3;
  --sm-foot-55: #797c84;
  --sm-on-cobalt-85: #dee8fc;
  --sm-on-cobalt-72: #c2d3f9;
  --sm-on-cobalt-rule: #719af2;
  --sm-watch-bg: #f8f9fb;
  --sm-chip-rule: #d6dbe4;
  --sm-chip-ink: #1f2937;
  --sm-label-grey: #6b7280;
  --sm-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --sm-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sm-mono: Menlo, Consolas, monospace;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--color-rule, #e2e3e5);
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  overflow: hidden;
  font-family: var(--sm-sans);
  text-align: left;
}
.sm p, .sm h3, .sm dl, .sm dd { margin: 0; }
.sm .nowrap { white-space: nowrap; }

/* Inbox envelope: marks the card as an example mail, not live data. It is
   the card's top bar, not a frame around the mail. */
.sm__envelope { position: relative; padding: 12px 18px; background: #f1f5f9; border-bottom: 1px solid var(--sm-rule); }
.sm .sm__badge { position: absolute; top: 12px; right: 14px; padding: 2px 7px; border: 1px solid var(--sm-chip-rule); border-radius: 2px; background: #fff; font-family: var(--sm-mono); font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sm-label-grey); line-height: 1.5; }
.sm .sm__line { display: flex; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--sm-ink-72); padding-right: 64px; }
.sm .sm__line + .sm__line { margin-top: 2px; }
.sm__line-label { flex: 0 0 44px; color: var(--sm-label-grey); }
.sm__line-val { min-width: 0; overflow-wrap: anywhere; }
.sm__line-val strong { color: var(--sm-ink); font-weight: 600; }
.sm__line-val--subject { color: var(--sm-ink); font-weight: 600; }

/* The mail itself, straight under the envelope: no cream frame, no second border. */
.sm__body { position: relative; background: #fff; }
.sm__mail { background: #fff; }

/* Cobalt header with the 2x2 fact grid. */
.sm__header { background: var(--sm-cobalt); padding: 24px 24px 18px; }
.sm .sm__brand { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: #fff; line-height: 1.2; }
.sm__brand img { display: block; width: 28px; height: 28px; }
.sm .sm__title { padding: 16px 0 5px; font-family: var(--sm-serif); font-size: 25px; font-weight: 600; line-height: 1.2; color: #fff; }
.sm .sm__lede { font-size: 14px; line-height: 1.5; color: var(--sm-on-cobalt-85); }
.sm .sm__facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--sm-on-cobalt-rule); }
.sm__facts dt { font-family: var(--sm-mono); font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sm-on-cobalt-72); padding: 0 0 3px; }
.sm .sm__facts dd { font-size: 14px; font-weight: 600; line-height: 1.45; color: #fff; }
.sm__split { margin-left: .25em; font-weight: 400; color: var(--sm-on-cobalt-85); }

/* The list: serif head, cards split by hairlines. */
.sm__list { padding: 24px 24px 4px; }
.sm .sm__list-title { font-family: var(--sm-serif); font-size: 21px; font-weight: 600; line-height: 1.25; color: var(--sm-ink); }
.sm .sm__list-sub { padding: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--sm-ink-72); }
.sm__card { padding: 18px 0; border-bottom: 1px solid var(--sm-rule); }
.sm__card:last-of-type { border-bottom: 0; }
.sm__meta { overflow: hidden; font-family: var(--sm-mono); font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; line-height: 1.5; }
.sm__regime { white-space: nowrap; color: var(--sm-cobalt); }
.sm__regime img { display: inline; width: 15px; height: 10px; vertical-align: -1px; margin-right: 6px; border: 0; }
.sm__deadline { float: right; white-space: nowrap; color: var(--sm-ink-60); }
.sm__row { display: flex; align-items: center; gap: 16px; }
.sm__text { flex: 1 1 auto; min-width: 0; }
.sm .sm__card-title { padding: 8px 0 3px; font-family: var(--sm-sans); font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--sm-ink); letter-spacing: 0; }
.sm .sm__buyer { font-size: 13px; line-height: 1.45; color: var(--sm-ink-62); }
.sm__facts-row { display: inline-block; margin-top: 3px; color: var(--sm-ink); font-weight: 700; }
.sm .sm__reason { margin-top: 9px; border-left: 2px solid var(--sm-rule); padding: 0 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--sm-ink-72); }
.sm__open { flex: 0 0 auto; display: inline-block; padding: 8px 12px; border: 1px solid var(--sm-cobalt); border-radius: 2px; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--sm-link); text-decoration: none; white-space: nowrap; }
.sm__open:hover { background: #f3f6fd; }
.sm__open:focus-visible { outline: 2px solid var(--sm-cobalt); outline-offset: 2px; }
/* "További találatok": the rest of the week's matches, js/sample-email-fold.js
   reveals them a step at a time. Hidden without JS (the first cards stay). */
.sm__card[hidden] { display: none; }
.sm .sm__more { padding: 6px 0 22px; text-align: center; }
.sm .sm__more[hidden] { display: none; }
.sm__more-btn { display: inline-block; margin-top: 12px; padding: 8px 14px; border: 1px solid var(--sm-cobalt); border-radius: 2px; background: #fff; font: 600 13px/1.25 var(--sm-sans); color: var(--sm-link); cursor: pointer; }
.sm__more-btn:hover { background: #f3f6fd; }
.sm__more-btn:focus-visible { outline: 2px solid var(--sm-cobalt); outline-offset: 2px; }
.sm__more-count { font-weight: 400; color: var(--sm-ink-72); }

/* "Ezeket figyeljük Önnek" on grey, without the settings line. */
.sm__watch { padding: 18px 24px 14px; background: var(--sm-watch-bg); border-top: 1px solid var(--sm-rule); }
.sm .sm__watch-title { padding: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--sm-ink); }
.sm .sm__watch-label { font-family: var(--sm-mono); font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sm-label-grey); padding: 0 0 4px; }
.sm .sm__chips { padding: 0 0 8px; font-size: 13px; line-height: 1.35; color: var(--sm-chip-ink); }
.sm__chip { display: inline-block; margin: 0 4px 6px 0; padding: 3px 8px; border: 1px solid var(--sm-chip-rule); border-radius: 2px; background: #fff; }
.sm__chip strong { font-weight: 600; }

/* Cream footer, the sender lines only (no validity, renewal or unsubscribe). */
.sm__footer { padding: 18px 24px 20px; background: var(--sm-cream); border-top: 1px solid var(--sm-rule); text-align: center; }
.sm .sm__footer p { padding: 0 0 5px; font-size: 12px; line-height: 1.5; color: var(--sm-foot-55); }
.sm .sm__footer p:last-child { padding-bottom: 0; }

/* Mobile fold (js/sample-email-fold.js): on narrow screens the mail is cut
   below the second notice with a fade and a button that opens the rest.
   Without JS the whole mail shows. */
.sm__fold { display: none; }
@media (max-width: 640px) {
  .sm__envelope { padding: 10px 14px; }
  .sm .sm__badge { top: 10px; right: 10px; }
  .sm .sm__line { font-size: 12px; padding-right: 56px; }
  .sm__header, .sm__list, .sm__watch, .sm__footer { padding-left: 18px; padding-right: 18px; }
  .sm .sm__title { font-size: 23px; }
  .sm .sm__facts { column-gap: 16px; }
  /* The digest's .stack / .btncell: the button drops below the text. */
  .sm__row { display: block; }
  .sm__open { margin-top: 12px; }

  .sm__body.is-folded { max-height: var(--sm-fold-at, 1100px); overflow: hidden; }
  .sm__body.is-folded .sm__fold,
  .sm__body.is-folded .sm__fold[hidden] { display: flex; }
  .sm__fold { position: absolute; left: 0; right: 0; bottom: 0; justify-content: center; align-items: flex-end; height: 120px; padding: 0 16px 16px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 62%); }
  .sm__fold-btn { padding: 9px 14px; border: 1px solid var(--sm-cobalt); border-radius: 2px; background: #fff; font: 600 13px/1.25 var(--sm-sans); color: var(--sm-link); cursor: pointer; }
  .sm__fold-btn:focus-visible { outline: 2px solid var(--sm-cobalt); outline-offset: 2px; }
}
