/* =====================================================================
   sutherland-ui.css
   Tokens and base components from the Sutherland UI Standards
   (Digital UI Pattern Document, K. Bragers, 6-8-2022). Reusable across Connect apps.
   ===================================================================== */
:root {
  /* 1.1 Color variables */
  --s-midnight: #26235D;  --s-red: #DE1B54;   --s-orange: #F99F42;
  --s-lagoon: #2E79BB;    --s-yellow: #F7D752;
  --s-black: #000000;     --s-grey: #6E797C;  --s-cool: #C5C7C5;
  --s-light: #E8E8E8;     --s-white: #FFFFFF;
  /* Success: the doc labels Refresh Green #6CC049, but its swatch, success
     button, success alert and toasts all render #34BD99. Components win here;
     change this one token if brand confirms #6CC049. */
  --s-success: #34BD99;
  --s-info: #2596AB;      /* 2.2 "Info" button */

  /* 1.4 Theming: 10% tint row */
  --t-midnight: #E9E9EE; --t-lagoon: #E8F1F8; --t-success: #EBF8F4;
  --ink-success: #1E8A6D;   /* success hue darkened for text contrast on white */

  /* 2.0 Buttons */
  --btn-default-bg: #E8E8E8; --btn-default-fg: #6E797C;
  --btn-secondary-bg: #F8F8F8;
  --btn-disabled-fg: #C5C7C5;

  /* Light theme layers (default per 1.4) */
  --bg: #F8F8F8; --surface: #FFFFFF; --surface-2: #F8F8F8; --border: #E8E8E8;
  --text: #000000; --text-2: #6E797C; --text-3: #C5C7C5;
  --link: var(--s-lagoon); --focus: var(--s-lagoon);
  --bar: var(--s-midnight);
  --shadow: 0 1px 3px rgba(0,0,0,.12);
  --radius: 4px;
  /* 1.2 Typography: Proxima Nova, Arial as the back-up */
  --font: "Proxima Nova", "proxima-nova", Arial, sans-serif;
  color-scheme: light;
}
/* 1.4 Theming: light is the default. Dark mode only when the host opts in with <html data-theme="dark">;
   darkest color as background, lighter for each layer. */
:root[data-theme="dark"] {
  --bg: #0F0E26; --surface: #1B1945; --surface-2: #26235D; --border: #34316E;
  --text: #FFFFFF; --text-2: #C5C7C5; --text-3: #6E797C; --link: #8FBCDD; --focus: #8FBCDD;
  --bar: #26235D; --ink-success: #5FD3B2; --t-lagoon: #1F2E57; --t-midnight: #26235D; --t-success: #173B3C;
  --btn-default-bg: #34316E; --btn-default-fg: #E8E8E8; --btn-secondary-bg: #26235D;
  --shadow: 0 1px 3px rgba(0,0,0,.5); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font: inherit; cursor: pointer; }
.svg-inline--fa { vertical-align: -0.125em; }
/* Text fallbacks for action icons if the Font Awesome script can't load
   (FA's SVG build replaces these <i> elements, so they never show otherwise). */
i.fa-square::before { content: "\2610"; font-style: normal; }
i.fa-check-square::before { content: "\2611"; font-style: normal; }
i.fa-thumbs-up::before { content: "\25B2"; font-style: normal; font-size: 11px; }
i.fa-thumbs-down::before { content: "\25BC"; font-style: normal; font-size: 11px; }
i.fa-sign-out-alt::before { content: "\21A9"; font-style: normal; }
i.fa-copy::before { content: "\29C9"; font-style: normal; }
i.fa-check-circle::before { content: "\2714"; font-style: normal; }
i.fa-check::before { content: "\2713"; font-style: normal; }

/* ---------- 2.0 Buttons ---------- */
.btn { border: 1px solid transparent; border-radius: var(--radius); font-weight: 700; font-size: 13px; padding: 8px 16px; line-height: 1.2; }
.btn-default   { background: var(--btn-default-bg); color: var(--btn-default-fg); }
.btn-primary   { background: var(--s-lagoon); color: #fff; }
.btn-primary:hover { background: #2F6DAF; }
.btn-secondary { background: var(--btn-secondary-bg); color: var(--btn-default-fg); }
.btn-outline   { background: var(--surface); color: var(--s-lagoon); border-color: var(--s-lagoon); }
.btn:disabled  { background: var(--s-light); color: var(--btn-disabled-fg); border-color: transparent; cursor: default; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon { background: transparent; border: 0; color: var(--text-2); padding: 5px 7px; border-radius: var(--radius); line-height: 1; }
.btn-icon:hover { background: var(--s-light); color: var(--text); }
:root[data-theme="dark"] .btn-icon:hover { background: var(--border); }


/* ---------- 3.1 Field ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.field label { font-size: 10px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.field input {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--s-cool); border-radius: var(--radius); padding: 9px 12px;
}
.field input:focus { outline: none; border-color: var(--s-lagoon); box-shadow: 0 0 0 3px rgba(46,121,187,.15); }
.field .help { font-size: 11px; color: var(--text-2); }

/* ---------- 6.0 Alert (page-level) ---------- */
.page-alert { display: grid; grid-template-columns: 20px 1fr; gap: 0 10px; padding: 12px 14px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; font-size: 13px; }
.page-alert strong { display: block; font-size: 14px; }
.page-alert.error   { background: var(--s-red); color: #fff; }
.page-alert.info    { background: var(--s-lagoon); color: #fff; }
.page-alert.warning { background: var(--s-yellow); color: #000; }
.page-alert.success { background: var(--s-success); color: #fff; }

/* ---------- 5.0 Group ---------- */
.group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
