/* ==========================================================================
   Orders — Email Templates (orders-emails.html)

   Only what is this page's own: the email list's column shares, the email
   body and its merge fields, and the rendered preview. The card, its
   subsections, the readings and the slide-over pieces it shares with
   PDF Templates Manager come from css/pages/orders-documents.css (`odc-`) and
   css/pages/orders.css (`ord-`); nothing here redefines them.

   TOKENS ONLY. Every colour is a `var(--color-…)`, radius never passes 7px
   (memory.md §2), nothing is set under 10px (§4). Anything that sits on the
   white panel takes the control ground (§13).
   ========================================================================== */

/* ---------- The email list ------------------------------------------------------ */
.odc-emails th.col-on      { width: 6%; }
.odc-emails th.col-email   { width: 28%; }
.odc-emails th.col-attach  { width: 15%; }
.odc-emails th.col-to      { width: 17%; }
.odc-emails th.col-sent    { width: 14%; }
.odc-emails th.col-wording { width: 12%; }
.odc-emails th.col-actions { width: 8%; }
.odc-emails td.col-on .switch { display: inline-block; vertical-align: middle; }
.odc-emails td.col-attach,
.odc-emails td.col-to { color: var(--color-text-muted); white-space: normal; }
.odc-emails td.col-email .sub,
.odc-emails td.col-sent .sub { white-space: normal; }

/* ---------- Edit Email ------------------------------------------------------------ */
/* Whose wording this is: the preset's, or the tenant's own. */
.oem-origin { margin: 0 0 14px; }
/* The email body and its merge fields. */
.odc-body { font-size: 13px; line-height: 1.5; }
.odc-merge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.odc-merge__lead { font-size: 11px; color: var(--color-text-muted); margin-right: 2px; }
.odc-merge__f {
  font: inherit; font-size: 11px; cursor: pointer;
  padding: 2px 7px; border-radius: 4px;
  background: var(--color-control); border: 1px solid var(--color-control-border); color: var(--color-text);
}
.odc-merge__f:hover { border-color: var(--color-primary); }
.odc-mail-preview {
  margin-top: 10px; padding: 12px 14px;
  background: var(--color-control); border: 1px solid var(--color-control-border); border-radius: var(--radius);
  font-size: 13px; color: var(--color-text);
}
.odc-mail-preview p { margin: 6px 0 0; line-height: 1.5; }
.odc-mail-preview__subject { font-weight: 600; }
.odc-mail-preview__link { color: var(--color-primary-600); font-weight: 500; }
.odc-mail-preview__att { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--color-text-muted); }
.odc-mail-preview__att img { width: 18px; height: 18px; }

/* ---------- Narrow screens ------------------------------------------------------------ */
@media (max-width: 1100px) {
  /* The list keeps its shares on a 980px table and scrolls sideways inside `.table-wrap`. */
  .odc-emails { min-width: 980px; }
}
