/* Phase 2d, look and words (GitHub issue 204; docs/adr/0097): Admin settings › Look & words, the new parts of Account &
   branding (the favicon, the sign-in page message, the email footer), a department's own look on its portal tab, and
   the one rule that hides the Spanish boxes of every settings page while employees use English only. Sizes are the
   tokens' (tokens.css); colors the page's own, so light and dark follow them. Loaded after small-settings.css. */

/* ---- Spanish boxes while employees use English only (AP6): what was written in them is kept, just not shown ---- */
/* Each box is marked data-spanish-box where its page draws it; the "Spanish version" sections that pages share are
   details.email-spanish. */
body.english-only [data-spanish-box],
body.english-only details.email-spanish { display: none !important; }

/* ---- Account & branding: three pictures, the message and the footer ---- */
.branding-logos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.branding-logo-favicon .branding-logo-preview img { width: 2rem; height: 2rem; object-fit: contain; }
.branding-words { display: grid; gap: var(--space-150); }
.branding-words h3 { margin: var(--space-150) 0 0; }
.branding-words textarea { width: 100%; resize: vertical; }
.branding-placeholders { display: flex; flex-wrap: wrap; gap: var(--space-50) var(--space-150); margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--text-xs); }
.branding-placeholders code { color: var(--ink); }
.branding-footer-sample { color: var(--ink); }

/* ---- Look & words › Words ---- */
.words-card { display: grid; gap: var(--space-150); padding-block: var(--space-250); }
.words-card > :is(h2, h3, p) { margin: 0; }
.words-table-wrap { overflow-x: auto; }
.words-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.words-table th, .words-table td { padding: var(--space-75) var(--space-100); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.words-table thead th { color: var(--muted); font-size: var(--text-xs); font-weight: 600; }
.words-table tbody th { font-weight: 600; white-space: nowrap; }
.words-field { display: block; margin: 0; }
.words-field input { width: 100%; min-width: 8rem; }
.words-examples { display: grid; gap: var(--space-75); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.words-examples i { color: var(--muted); font-style: normal; }
.words-examples b { overflow-wrap: anywhere; }
/* The words requesters read (GitHub issue 291, B7): what each one is for, under its name. */
.words-table tbody th .words-about { display: block; margin-top: var(--space-25); color: var(--muted); font-size: var(--text-xs); font-weight: 400; white-space: normal; }

/* ---- A department's Portal tab page: its sections' headings (B7) ---- */
.portal-heading-grid { display: grid; gap: var(--space-150); }
.portal-heading-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: var(--space-100) var(--space-200); align-items: start; margin: 0; padding: 0; border: 0; min-width: 0; }
.portal-heading-row legend { grid-column: 1 / -1; padding: 0; margin-bottom: var(--space-50); font-weight: 600; font-size: var(--text-sm); }
.portal-heading-row input { width: 100%; min-width: 0; box-sizing: border-box; }

/* ---- A department's tab in the Requester portal: its logo, its help link and its color ---- */
.requester-section-heading.has-logo { justify-content: flex-start; align-items: center; }
.ws-tab-logo { flex: 0 0 auto; }
.ws-tab-logo img { display: block; height: 2.5rem; width: auto; max-width: 10rem; object-fit: contain; }
.ws-tab-help { margin: var(--space-75) 0 0; font-size: var(--text-sm); }
.ws-tab-help a { color: var(--spruce); font-weight: 600; }
[data-ws-look] { --accent: var(--ws-accent); --spruce: var(--ws-accent); --accent-hover: color-mix(in srgb, var(--ws-accent) 12%, transparent); }
:root[data-theme="dark"] [data-ws-look] { --accent: var(--ws-accent-dark); --spruce: var(--ws-accent-dark); --accent-hover: color-mix(in srgb, var(--ws-accent-dark) 18%, transparent); }

@media (max-width: 700px) {
  .requester-section-heading.has-logo { align-items: flex-start; }
  .ws-tab-logo img { height: 2rem; }
  .words-table thead { display: none; }
  .words-table, .words-table tbody, .words-table tr, .words-table th, .words-table td { display: block; width: 100%; }
  .words-table tr { padding: var(--space-100) 0; border-bottom: 1px solid var(--line); }
  .words-table th, .words-table td { border-bottom: 0; padding: var(--space-50) 0; }
  .words-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: var(--space-25); color: var(--muted); font-size: var(--text-xs); }
}
