/* Light version of the NextGen DPP demo, and the switch between light and dark.
   Not part of the demo author's package: see STEEL-DEMO.md ("Light version"). The demo page
   (index.html) keeps its own dark styles; this file only overrides them, and only while the page
   is not set to dark (<html data-theme="dark">, done by theme.js). So light is the standard, also
   when theme.js fails to load.

   The demo's own accent colours stay: Tata blue, Castlab orange, teal for the dataspace, green for
   public data, purple for restricted data. They are a little deeper here, so they read on white. */

:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

:root:not([data-theme="dark"]) {
  --bg: #f3f6fb; --bg2: #ffffff; --panel: #ffffff; --panel2: #eef2f9; --line: #d7dfee; --line2: #b9c6de;
  --text: #101b36; --muted: #4c5c82; --dim: #7b89a9;
  --tata: #2563d9; --tata-soft: rgba(37, 99, 217, .10);
  --cast: #b96400; --cast-soft: rgba(255, 173, 51, .18);
  --ds: #0a857c; --ds-soft: rgba(10, 133, 124, .10);
  --pub: #178548; --pub-soft: rgba(23, 133, 72, .10);
  --res: #6f43d6; --res-soft: rgba(111, 67, 214, .09);
  --hot: #e2501f;
  /* this file's own: the bright orange for filled buttons, card shadow, hairline */
  --cast-fill: #ffad33; --card-shadow: 0 1px 2px rgba(16, 27, 54, .05), 0 10px 26px -18px rgba(16, 27, 54, .28); --hair: rgba(16, 27, 54, .10);
}

/* ---------- TV screens (Tata Steel, Castlab) ---------- */
:root:not([data-theme="dark"]) .stage { background: radial-gradient(1200px 600px at 20% -10%, #dde8fb 0%, transparent 60%), var(--bg); }
:root:not([data-theme="dark"]) .mark { color: #fff; }
:root:not([data-theme="dark"]) .pill { background: #fff; }
:root:not([data-theme="dark"]) .panel { background: linear-gradient(180deg, #fff, #f9fbfe); box-shadow: var(--card-shadow); }
/* Filled buttons: white on Tata blue, dark on Castlab orange. */
:root:not([data-theme="dark"]) .big { color: #fff; }
:root:not([data-theme="dark"]) .stage.castlab .big, :root:not([data-theme="dark"]) .ordercard .big, :root:not([data-theme="dark"]) .lc-b { background: var(--cast-fill); color: #1d1203; }
:root:not([data-theme="dark"]) .stage.castlab .big { box-shadow: 0 10px 30px -12px #e08a00; }
:root:not([data-theme="dark"]) .lc-b.on { background: #e5483a; color: #fff; }
/* A button that can't be pressed yet: plainly grey, still readable (the dark version dims it). */
:root:not([data-theme="dark"]) .big:disabled, :root:not([data-theme="dark"]) .stage.castlab .big:disabled, :root:not([data-theme="dark"]) .ordercard .big:disabled {
  opacity: 1; filter: none; background: var(--panel2); color: var(--dim); box-shadow: inset 0 0 0 1px var(--line); }
:root:not([data-theme="dark"]) .srow { background: #fff; }
:root:not([data-theme="dark"]) .srow.active { background: rgba(226, 80, 31, .06); }
:root:not([data-theme="dark"]) .srow.active .rd { color: #b96400; }
:root:not([data-theme="dark"]) .check li.done .b, :root:not([data-theme="dark"]) .st.done .n, :root:not([data-theme="dark"]) .seg.on,
:root:not([data-theme="dark"]) .certbar .dl, :root:not([data-theme="dark"]) .howto.help .hi { color: #fff; }
:root:not([data-theme="dark"]) .policy { background: #fff; }
:root:not([data-theme="dark"]) .policy.on { background: var(--res-soft); }
:root:not([data-theme="dark"]) .tag.odrl { background: rgba(111, 67, 214, .14); }
:root:not([data-theme="dark"]) .dpp, :root:not([data-theme="dark"]) .wow { background: #fff; }
:root:not([data-theme="dark"]) .dpp .dh, :root:not([data-theme="dark"]) .fsec > header { background: #f6f8fc; }
:root:not([data-theme="dark"]) .f, :root:not([data-theme="dark"]) dl.fv > dt, :root:not([data-theme="dark"]) dl.fv > dd { border-bottom-color: var(--hair); }
:root:not([data-theme="dark"]) .locked .lockov { background: rgba(255, 255, 255, .8); }
:root:not([data-theme="dark"]) .wow.on { background: linear-gradient(160deg, rgba(10, 133, 124, .13), #fff 70%); }
:root:not([data-theme="dark"]) .wsum > div { background: var(--panel2); }
:root:not([data-theme="dark"]) .tile { background: #fff; }
:root:not([data-theme="dark"]) .tile.work { background: var(--cast-soft); }
/* Empty production slots: a clear dashed outline instead of a half-transparent card. */
:root:not([data-theme="dark"]) .tile:not(.work):not(.done) { opacity: 1; background: transparent; border-color: var(--line2); }
/* The glows of the dark version become soft rings. */
:root:not([data-theme="dark"]) .conn .dot { box-shadow: 0 0 0 4px rgba(23, 133, 72, .16); }
:root:not([data-theme="dark"]) .st.active .n { box-shadow: 0 0 0 6px var(--ds-soft), 0 0 16px rgba(10, 133, 124, .45); }
:root:not([data-theme="dark"]) .packet { box-shadow: 0 0 12px rgba(10, 133, 124, .6); }

/* Dataspace strip at the bottom */
:root:not([data-theme="dark"]) .strip { background: linear-gradient(180deg, #edf2f9, #e5ecf6); }
:root:not([data-theme="dark"]) .conn { box-shadow: var(--card-shadow); }

/* White plates: QR codes and partner logos need an edge on a white page. */
:root:not([data-theme="dark"]) .qrbox, :root:not([data-theme="dark"]) .lp:not(.dark) { box-shadow: inset 0 0 0 1px var(--line); }
:root:not([data-theme="dark"]) .qrbox.live { box-shadow: 0 0 0 3px #e5283b; }

/* Controls, overlay with the data models */
:root:not([data-theme="dark"]) .ctl button { background: #fff; }
:root:not([data-theme="dark"]) .overlay { background: rgba(16, 27, 54, .45); }
:root:not([data-theme="dark"]) .ovcol pre, :root:not([data-theme="dark"]) #f-json { color: #24304f; }
:root:not([data-theme="dark"]) pre .k, :root:not([data-theme="dark"]) .legend .k { color: #1d5bd0; }
:root:not([data-theme="dark"]) pre .s { color: #177a43; }
:root:not([data-theme="dark"]) pre .n { color: #a85a00; }
:root:not([data-theme="dark"]) pre .hlk { background: rgba(10, 133, 124, .16); }
:root:not([data-theme="dark"]) pre .k.tno, :root:not([data-theme="dark"]) .legend .k.tno, :root:not([data-theme="dark"]) .ftag.tno { color: #0b76a0; background: rgba(11, 118, 160, .11); }
:root:not([data-theme="dark"]) pre .k.sug, :root:not([data-theme="dark"]) .legend .k.sug, :root:not([data-theme="dark"]) .ftag.sug { color: #6436cc; background: rgba(111, 67, 214, .11); }

/* ---------- Start page, public passport, full passport ---------- */
:root:not([data-theme="dark"]) .launch button, :root:not([data-theme="dark"]) .howto, :root:not([data-theme="dark"]) .vcard, :root:not([data-theme="dark"]) .pcard,
:root:not([data-theme="dark"]) .loopcard, :root:not([data-theme="dark"]) .synccard, :root:not([data-theme="dark"]) .pub-card, :root:not([data-theme="dark"]) .fsec { box-shadow: var(--card-shadow); }
:root:not([data-theme="dark"]) .howto kbd { background: #e3e9f5; }
:root:not([data-theme="dark"]) .howto.help { background: linear-gradient(160deg, rgba(10, 133, 124, .10), #fff 70%); }
:root:not([data-theme="dark"]) .loopcard.on { background: linear-gradient(135deg, rgba(255, 173, 51, .2), #fff 70%); }
:root:not([data-theme="dark"]) .valueov { background: radial-gradient(1200px 700px at 20% -10%, #d9e5fb 0%, transparent 60%), var(--bg); }

/* Live Mobillor passports: the reds, deep enough for white */
:root:not([data-theme="dark"]) .livetag, :root:not([data-theme="dark"]) .sc-st.err, :root:not([data-theme="dark"]) .pub-link.live .ar { color: #cf1f33; }
:root:not([data-theme="dark"]) .pub-link.live { background: rgba(229, 40, 59, .07); }
:root:not([data-theme="dark"]) .fullbtn.mob { color: #c41c2f; background: rgba(229, 40, 59, .08); }
:root:not([data-theme="dark"]) .fullbtn.mob:hover { background: rgba(229, 40, 59, .16); }
:root:not([data-theme="dark"]) .fullbtn:hover { background: rgba(10, 133, 124, .2); }

/* Loop mode: the simulated click shows as a dark ring on white */
:root:not([data-theme="dark"]) .fakeclick { border-color: rgba(16, 27, 54, .55); }
:root:not([data-theme="dark"]) .fakecur { filter: drop-shadow(0 3px 6px rgba(16, 27, 54, .45)); }

/* ---------- The switch (added by theme.js) ---------- */
/* Same look and place as the demo's own corner controls: bottom right, above them when they are
   there. On the start page it is always visible; on the TV screens it behaves like those
   controls and only shows while the mouse is in that corner. */
.thm { position: fixed; right: 10px; bottom: 10px; z-index: 55; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px;
  border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); color: var(--muted); font: inherit; font-size: 14px; line-height: 1; cursor: pointer;
  transition: opacity .3s, border-color .2s, color .2s; }
body:has(.ctl) .thm { bottom: 54px; }
.thm:hover, .thm:focus-visible { border-color: var(--ds); color: var(--text); }
.thm svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.thm .thm-sun { display: none; }
:root[data-theme="dark"] .thm .thm-sun { display: block; }
:root[data-theme="dark"] .thm .thm-moon { display: none; }
/* Phones (a passport opened from a QR code): only the icon, so it covers as little as possible. */
@media (max-width: 700px) { .thm { padding: 9px; border-radius: 50%; } .thm span { display: none; } }
body.tv .thm { opacity: 0; }
body.tv .thm:hover, body.tv .thm:focus-visible, body.tv:has(.ctl:hover) .thm { opacity: 1; }
