/* The preferences gear, its drawer, and what the choices do. ORD-0091
 * (2026-09-05). One sheet for every portal: the choices land as data
 * attributes on <html> (mcs_prefs.js) and the rules below key off them.
 * Each shell's own tokens are what the themes switch; the inline
 * background:#fff that hundreds of cards carry is caught by attribute
 * selectors so Waypoint Dark is dark everywhere, not only where a token
 * was used. */

/* ── the gear and its menu ─────────────────────────────────────── */
.wp-gear-wrap { position: relative; display: inline-flex; align-items: center; margin: 0 6px 0 4px; }
.wp-gear { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background .15s ease, transform .15s ease; }
.wp-gear:hover { background: rgba(255,255,255,.26); }
.wp-gear:focus-visible { outline: 2px solid #12B5E5; outline-offset: 2px; }
.wp-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--wp-drawer, #fff); color: var(--wp-ink, #1B2430); border: 1px solid var(--wp-line, #DDE3EA); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.25); padding: 6px; z-index: 10001; text-align: left; }
.wp-menu-item { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13px; color: inherit; cursor: pointer; }
.wp-menu-item small { display: block; font-size: 11.5px; color: var(--wp-muted, #5B6776); margin-top: 1px; }
.wp-menu-item:hover, .wp-menu-item:focus-visible { background: var(--wp-pill, #EAF7FC); color: var(--wp-cyan-ink, #0B5E77); outline: none; }

/* ── the drawer ────────────────────────────────────────────────── */
#wp-drawer-root { position: fixed; inset: 0; z-index: 10000; }
.wp-shade { position: absolute; inset: 0; background: rgba(15,31,58,.35); }
.wp-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; background: var(--wp-drawer, #fff); color: var(--wp-ink, #1B2430); box-shadow: -12px 0 40px rgba(0,0,0,.25); display: flex; flex-direction: column; border-left: 1px solid var(--wp-line, #DDE3EA); font: 14px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; animation: wp-slide .18s ease-out; }
@keyframes wp-slide { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.wp-dhead { padding: 16px 18px 10px; border-bottom: 1px solid var(--wp-line, #DDE3EA); }
.wp-dhead h2 { margin: 0; font-size: 17px; font-weight: 700; }
.wp-who { font-size: 12.5px; color: var(--wp-muted, #5B6776); margin-top: 2px; }
.wp-tabs { display: flex; gap: 6px; padding: 10px 18px; flex-wrap: wrap; border-bottom: 1px solid var(--wp-line, #DDE3EA); }
.wp-tab { font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--wp-line, #DDE3EA); background: transparent; color: var(--wp-muted, #5B6776); cursor: pointer; }
.wp-tab.on { background: var(--wp-navy, #16294A); color: #fff; border-color: var(--wp-navy, #16294A); font-weight: 600; }
.wp-tab:focus-visible { outline: 2px solid #12B5E5; outline-offset: 2px; }
.wp-dbody { padding: 14px 18px; overflow: auto; flex: 1; }
.wp-sec { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--wp-muted, #5B6776); margin: 14px 0 8px; }
.wp-sec:first-child { margin-top: 0; }
.wp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--wp-line, #DDE3EA); font-size: 13px; }
.wp-row:last-child { border-bottom: none; }
.wp-l { flex: 1; }
.wp-l small { display: block; color: var(--wp-muted, #5B6776); font-size: 11.5px; }
.wp-in { border: 1px solid var(--wp-line, #DDE3EA); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 12.5px; background: var(--wp-drawer, #fff); color: inherit; min-width: 150px; max-width: 210px; }
.wp-sw { width: 38px; height: 22px; border-radius: 999px; background: #C9D1DB; position: relative; flex: none; border: none; cursor: pointer; padding: 0; }
.wp-sw.on { background: #12B5E5; }
.wp-sw-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s ease; }
.wp-sw.on .wp-sw-knob { left: 19px; }
.wp-sw:focus-visible { outline: 2px solid #12B5E5; outline-offset: 2px; }
.wp-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.wp-swatch { width: 100px; border: 2px solid var(--wp-line, #DDE3EA); border-radius: 10px; overflow: hidden; font: inherit; font-size: 11.5px; text-align: center; background: var(--wp-drawer, #fff); color: var(--wp-muted, #5B6776); cursor: pointer; padding: 0; }
.wp-swatch.on { border-color: #12B5E5; }
.wp-sw-top { display: block; height: 14px; }
.wp-sw-mid { display: flex; gap: 3px; padding: 4px; height: 30px; box-sizing: border-box; }
.wp-sw-mid i { flex: 1; border-radius: 3px; }
.wp-sw-cap { display: block; padding: 4px 0 6px; }
.wp-seg { display: inline-flex; border: 1px solid var(--wp-line, #DDE3EA); border-radius: 8px; overflow: hidden; }
.wp-seg-b { padding: 5px 10px; font: inherit; font-size: 12px; color: var(--wp-muted, #5B6776); background: transparent; border: none; cursor: pointer; }
.wp-seg-b.on { background: var(--wp-navy, #16294A); color: #fff; font-weight: 600; }
.wp-seg-b:focus-visible { outline: 2px solid #12B5E5; outline-offset: -2px; }
.wp-dfoot { padding: 12px 18px; border-top: 1px solid var(--wp-line, #DDE3EA); display: flex; gap: 8px; align-items: center; }
.wp-btn { border: 1px solid var(--wp-line, #DDE3EA); background: var(--wp-drawer, #fff); color: inherit; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.wp-btn.wp-navy { background: var(--wp-navy, #16294A); color: #fff; border-color: var(--wp-navy, #16294A); font-weight: 600; }
.wp-btn.wp-link { border: none; background: none; color: var(--wp-cyan-ink, #0B5E77); text-decoration: underline; padding: 0; }
.wp-btn:focus-visible { outline: 2px solid #12B5E5; outline-offset: 2px; }
.wp-savenote { font-size: 12px; color: var(--wp-muted, #5B6776); }
.wp-note { margin-top: 12px; font-size: 12px; color: var(--wp-muted, #5B6776); }
.wp-muted { color: var(--wp-muted, #5B6776); }
@media (max-width: 860px) { .wp-drawer { width: 100%; } }

/* ── the themes: each shell's tokens switch ────────────────────── */
html[data-wp-theme="dark"] {
  --wp-drawer: #161E2C; --wp-ink: #E8EDF3; --wp-line: #2A3648; --wp-muted: #9AA7B6; --wp-pill: #0F3A4A; --wp-cyan-ink: #7FD8F2; --wp-navy: #0E1B33;
  --bg: #0F1521; --bg-card: #161E2C; --surface: #161E2C; --surface2: #1B2536;
  --text: #E8EDF3; --text-1: #E8EDF3; --text-2: #C9D2DD; --text-3: #9AA7B6; --text-4: #7F8B99; --text-muted: #9AA7B6; --text-light: #7F8B99;
  --border: #2A3648; --border-2: #3A4658; --border-mid: #3A4658;
  --navy: #0E1B33; --navy-dark: #0A1428; --navy-mid: #13223D; --navy-light: #1C2F52;
  --blue-pale: #12213A; --gold-pale: #0F3A4A; --success-bg: #0F2A1E; --warning-bg: #332506; --danger-bg: #3A1212;
}
html[data-wp-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-wp-theme="dark"] [style*="background:#fff"], html[data-wp-theme="dark"] [style*="background: #fff"],
html[data-wp-theme="dark"] [style*="background:#FFF"], html[data-wp-theme="dark"] [style*="background:#FFFFFF"],
html[data-wp-theme="dark"] [style*="background:white"], html[data-wp-theme="dark"] [style*="background-color:#fff"],
html[data-wp-theme="dark"] [style*="background-color: #fff"], html[data-wp-theme="dark"] [style*="background:#F9F8F6"],
html[data-wp-theme="dark"] [style*="background:#F4F3F0"], html[data-wp-theme="dark"] [style*="background:#EEF1F6"] {
  background-color: var(--bg-card) !important; color: var(--text) !important;
}
html[data-wp-theme="dark"] .card, html[data-wp-theme="dark"] .modal, html[data-wp-theme="dark"] .modal-content,
html[data-wp-theme="dark"] .panel, html[data-wp-theme="dark"] table, html[data-wp-theme="dark"] .form-input,
html[data-wp-theme="dark"] .form-select, html[data-wp-theme="dark"] input, html[data-wp-theme="dark"] select,
html[data-wp-theme="dark"] textarea { background-color: var(--bg-card); color: var(--text); border-color: var(--border); }
html[data-wp-theme="dark"] [style*="color:#1A1A2E"], html[data-wp-theme="dark"] [style*="color:#0B1F3A"],
html[data-wp-theme="dark"] [style*="color:#111"], html[data-wp-theme="dark"] [style*="color:#000"],
html[data-wp-theme="dark"] [style*="color:#374151"] { color: var(--text) !important; }
html[data-wp-theme="dark"] img.brand-logo, html[data-wp-theme="dark"] .login-logo { filter: brightness(1.15); }

html[data-wp-theme="contrast"] {
  --wp-drawer: #fff; --wp-ink: #000; --wp-line: #000; --wp-muted: #000; --wp-pill: #E6EEFF; --wp-cyan-ink: #003B8E; --wp-navy: #000;
  --bg: #fff; --bg-card: #fff; --surface: #fff; --surface2: #fff;
  --text: #000; --text-1: #000; --text-2: #000; --text-3: #111; --text-4: #222; --text-muted: #000; --text-light: #222;
  --border: #000; --border-2: #000; --border-mid: #000;
  --navy: #000; --navy-dark: #000; --navy-mid: #000; --navy-light: #111;
  --carolina: #0050B3; --carolina-lt: #0050B3; --accent: #0050B3; --blue: #0050B3; --blue-light: #0050B3;
  --success: #006400; --warning: #7A3E00; --danger: #A50000;
}
html[data-wp-theme="contrast"] * { text-shadow: none !important; }
html[data-wp-theme="contrast"] a { color: #003B8E; text-decoration: underline; }
html[data-wp-theme="contrast"] .card, html[data-wp-theme="contrast"] table, html[data-wp-theme="contrast"] .form-input,
html[data-wp-theme="contrast"] .form-select, html[data-wp-theme="contrast"] input, html[data-wp-theme="contrast"] select,
html[data-wp-theme="contrast"] textarea, html[data-wp-theme="contrast"] button { border-color: #000; }
html[data-wp-theme="contrast"] :focus { outline: 3px solid #0050B3 !important; outline-offset: 2px; }

/* ── text size and density ─────────────────────────────────────── */
html[data-wp-text="small"] body { zoom: .92; }
html[data-wp-text="large"] body { zoom: 1.1; }
html[data-wp-text="larger"] body { zoom: 1.22; }
html[data-wp-density="compact"] td, html[data-wp-density="compact"] th { padding-top: 3px !important; padding-bottom: 3px !important; }
html[data-wp-density="compact"] .card-body, html[data-wp-density="compact"] .card .body { padding-top: 8px !important; padding-bottom: 8px !important; }
html[data-wp-density="compact"] .nav-item { padding-top: 5px !important; padding-bottom: 5px !important; }
html[data-wp-density="roomy"] td, html[data-wp-density="roomy"] th { padding-top: 12px !important; padding-bottom: 12px !important; }
html[data-wp-density="roomy"] .card-body, html[data-wp-density="roomy"] .card .body { padding-top: 18px !important; padding-bottom: 18px !important; }
html[data-wp-density="roomy"] .nav-item { padding-top: 12px !important; padding-bottom: 12px !important; }

/* ── highlight what I changed until I save ─────────────────────── */
html[data-wp-highlight="on"] .wp-changed { box-shadow: inset 3px 0 0 #12B5E5 !important; background-color: rgba(18,181,229,.08) !important; }

/* ── accessibility ─────────────────────────────────────────────── */
html[data-wp-reduce-motion="on"] *, html[data-wp-reduce-motion="on"] *::before, html[data-wp-reduce-motion="on"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-wp-focus="on"] :focus { outline: 2px solid #12B5E5 !important; outline-offset: 2px !important; }
html[data-wp-targets="on"] button, html[data-wp-targets="on"] .btn, html[data-wp-targets="on"] .nav-item, html[data-wp-targets="on"] a.btn,
html[data-wp-targets="on"] input[type="checkbox"], html[data-wp-targets="on"] input[type="radio"] { min-height: 40px; }
html[data-wp-targets="on"] input[type="checkbox"], html[data-wp-targets="on"] input[type="radio"] { min-width: 22px; min-height: 22px; transform: scale(1.25); margin: 4px; }

/* ── Larger click targets grows the TARGET, never the control ───────────
 *
 * HIS FINDING 2026-09-17, with two pictures: the switches in the gear panel
 * were distorted, the gear itself was an oval, and the sidebar's collapse
 * control was wrong again.
 *
 * One cause for all three. The rule above puts 40px of height on every
 * button, which is right for an ordinary rectangular button and wrong for a
 * control whose shape IS its meaning. The preference switch is a 38 by 22
 * pill; the gear and the notice bell are circles; the collapse control is a
 * 26px disc. Force 40px of height onto any of them and a circle stretches
 * into an oval, and the switch's knob — pinned three pixels from the top of
 * a track that is no longer 22px tall — floats away from its own groove.
 *
 * So these four keep their painted size and gain a transparent 40px hit area
 * centred on them. A person with the preference on gets the bigger target
 * the preference promises, and the control still looks like itself. The
 * overlay is never painted and never catches a pointer the control would
 * not have caught anyway, because it sits inside the control's own box.
 *
 * The four are left where they sit. The switch and the notice bell are
 * already positioned, and the collapse control is positioned ABSOLUTELY on
 * the column's edge — setting position on that one would tear it off the
 * edge, so only the gear is given a positioning context here.
 */
html[data-wp-targets="on"] .wp-sw,
html[data-wp-targets="on"] .wp-gear,
html[data-wp-targets="on"] .sb-hide,
html[data-wp-targets="on"] #notif-bell-wrap > button { min-height: 0; }

html[data-wp-targets="on"] .wp-gear { position: relative; }

html[data-wp-targets="on"] .wp-sw::after,
html[data-wp-targets="on"] .wp-gear::after,
html[data-wp-targets="on"] .sb-hide::after,
html[data-wp-targets="on"] #notif-bell-wrap > button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: transparent;
}
html[data-wp-icons="on"] .badge::before, html[data-wp-icons="on"] .pill::before, html[data-wp-icons="on"] .status-pill::before,
html[data-wp-icons="on"] .status-badge::before, html[data-wp-icons="on"] [class*="badge-"]::before { content: "\25C6\00a0"; font-size: .8em; }
html[data-wp-underline="on"] a { text-decoration: underline !important; }
tr.wp-row-sel > td { box-shadow: inset 3px 0 0 #12B5E5; }
html[data-wp-drawer="open"] { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .wp-drawer { animation: none; } .wp-sw-knob { transition: none; } }
