/* ═══════════════════════════════════════════════════════════════
   NeoMutt Docs — Terminal Screenshot Stylesheet
   Fake terminal windows used in the Dialog Tour pages and
   progress-bar howto.  Each <pre class="terminal"> is wrapped in a
   <div class="term-window"> with a macOS-style title bar.

   Colour theming uses 16 ANSI-style CSS variables (--c0 … --c15)
   plus four surface variables (--s0 … --s3) set per data-theme.
   ═══════════════════════════════════════════════════════════════ */


/* ─── Colour palettes ─────────────────────────────────────────
   --s0  foreground   --s1  background
   --s2  cursor       --s3  status-bar / muted surface
   --c0…--c7   normal ANSI colours
   --c8…--c15  bright ANSI colours
   ──────────────────────────────────────────────────────────── */

/* Theme: Dayfox (light) */
html[data-theme=light] .term-window {
  --s0: #3d2b5a; --s1: #f6f2ee; --s2: #3d2b5a; --s3: #e7d2be;
  --c0: #352c24; --c1: #a5222f; --c2: #396847; --c3: #ac5402;
  --c4: #2848a9; --c5: #6e33ce; --c6: #287980; --c7: #bfb6ae;
  --c8: #534c45; --c9: #b3434e; --c10: #577f63; --c11: #b86e28;
  --c12: #4863b6; --c13: #8452d5; --c14: #488d93; --c15: #f4ece6;
}

/* Theme: Zenburn (dark) */
html[data-theme=dark] .term-window {
  --s0: #f0e4cf; --s1: #404040; --s2: #f3eadb; --s3: #746956;
  --c0: #404040; --c1: #e3716e; --c2: #819b69; --c3: #b77e64;
  --c4: #6099c0; --c5: #b279a7; --c6: #66a5ad; --c7: #f0e4cf;
  --c8: #6f6768; --c9: #ec8685; --c10: #8bae68; --c11: #d68c67;
  --c12: #61abda; --c13: #cf86c1; --c14: #65b8c1; --c15: #c0ab86;
}


/* ─── Terminal window chrome ──────────────────────────────────
   Outer wrapper with rounded corners, drop shadow, and a
   macOS-style title bar with three coloured "traffic light"
   dots rendered via ::before + box-shadow.
   ──────────────────────────────────────────────────────────── */

.term-window {
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 84, 97, 0.35);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.term-window .term-title {
  position: relative;
  padding: 0.4rem 0.75rem 0.4rem 4.5rem;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
  background: #005461;
  color: #F4F4F4;
}

/* Traffic-light dots: red, yellow, green */
.term-window .term-title::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow:
    1.2rem 0 0 #ffbd2e,
    2.4rem 0 0 #27c93f;
}


/* ─── Terminal body ───────────────────────────────────────────
   The <pre class="terminal"> block.  Resets all spacing so the
   character grid aligns perfectly.  Uses the palette variables
   set on the parent .term-window.
   ──────────────────────────────────────────────────────────── */

.terminal {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #fff;
  white-space: pre;
  line-height: 1.35;
}

.terminal span {
  display: inline-block;
  line-height: inherit;
}

/* Themed base colours (override the #000/#fff fallback above) */
.term-window .terminal { background-color: var(--s1); color: var(--s0); }


/* ─── NeoMutt UI regions ──────────────────────────────────────
   Each class maps to a NeoMutt colour object.  Foreground and
   background are set via the ANSI palette variables.
   ──────────────────────────────────────────────────────────── */

/* Status bar — muted surface with foreground text */
.term-window .terminal .status    { background-color: var(--s3); color: var(--s0); }

/* Email / compose headers */
.term-window .terminal .header    { background-color: var(--s1); color: var(--c4); }

/* Non-primary header lines (Date, To, etc.) */
.term-window .terminal .hdrdefault { background-color: var(--s1); color: var(--s0); }

/* Langstroth/Security "Signed" marker */
.term-window .terminal .sign      { background-color: var(--s1); color: var(--c5); }

/* Highlighted / cursor row */
.term-window .terminal .indicator { background-color: var(--c4); color: var(--s3); }

/* Command-line prompt and interactive option highlights */
.term-window .terminal .prompt    { background-color: lightgreen; color: magenta; }
.term-window .terminal .options   { background-color: lightyellow; color: red; }

/* Thread-tree arrow characters (└─>, ├─>) */
.term-window .terminal .tree      { color: var(--c5); }

/* Progress bar (white on red, used in howto/progress-bar) */
.term-window .terminal .progress2 { background-color: #f00; color: #fff; }


/* ─── Sidebar regions ─────────────────────────────────────────
   Not yet used in any tour page, but ready for when a sidebar
   screenshot is added.
   ──────────────────────────────────────────────────────────── */

.term-window .terminal .sb_background { background-color: var(--s3); }
.term-window .terminal .sb_divider    { background-color: var(--s3); }
.term-window .terminal .sb_flagged    { color: var(--c9); }
.term-window .terminal .sb_highlight  { background-color: var(--c8); }
.term-window .terminal .sb_indicator  { background-color: var(--c4); color: var(--c9); }
.term-window .terminal .sb_new        { color: var(--c3); }
.term-window .terminal .sb_ordinary   { color: var(--c8); }


/* ─── Thumbnail variant ───────────────────────────────────────
   Half-size preview floated right, used for inline mini-
   screenshots (e.g. message.md sort dialog).
   ──────────────────────────────────────────────────────────── */

.thumbnail .term-window {
  zoom: 0.7;
  /* float: right; */
  /* margin: 0 0 1em 3em; */
}

.sd-card .thumbnail {
  overflow: hidden;
}
