/* ============================================================================
   SRN ORNAMENT SWITCH                                                    #298
   ----------------------------------------------------------------------------
   Makes sci-fi's decoration OPT-IN instead of the thing every other theme has to
   subtract. Ornament is ON by default, so sci-fi is unchanged; a theme opts out
   by setting data-srn-ornament="off" on <html>.

   ⚠️ THIS IS NOT AN ANIMATION SWITCH, AND IT MUST NOT BECOME ONE.

   minority-report.css uses the SAME idiom — `opacity: 0` + `animation: … forwards`
   — for two OPPOSITE jobs: revealing real content, and drawing decoration. Nothing
   in the class names distinguishes them. So the intuitive implementation,
   "ornament off = disable the animations", BLANKS the KPI row and every card on
   Settings/Index. Audited 2026-07-20 before writing any of this; three categories
   came out, and they need three different treatments.

   Anyone tempted to simplify this into one blanket rule: that is the bug this file
   exists to prevent.
   ========================================================================== */

:root {
    /* Sci-fi is the ornamented theme. Slate/corporate flip this in #299. */
    --srn-ornament: 1;
}

/* ────────────────────────────────────────────────────────────────────────────
   CATEGORY 1 — LOAD-BEARING. Pin VISIBLE.

   These are `opacity: 0` until an entry animation reveals them. Removing the
   animation reverts them to invisible, so ornament-off must force the END state
   rather than merely cancel the motion.

     .hud-card      — KPI/panel content (HudStatCard, VanStockValuePanel, …)
     .content-layer — real page content (Settings/Index, CatalogueImporter)

   The `opacity: 1` here is the whole point. Do not "tidy" it away as redundant
   alongside `animation: none` — it is the half that keeps the content on screen.
   ──────────────────────────────────────────────────────────────────────────── */
html[data-srn-ornament="off"] .hud-card,
html[data-srn-ornament="off"] .content-layer {
    opacity: 1;
    animation: none;
}

/* ────────────────────────────────────────────────────────────────────────────
   CATEGORY 2 — FUNCTIONAL, disguised as ornament. DELIBERATELY UNTOUCHED.

     .ring-svg                       — upload/export PROGRESS in ImageUploader,
                                       StockCatalogExporter, VanStockValuePanel
     .sci-fi-tesseract-loader
     .sci-fi-dialog-loader-container
     .loader-*                       — loading feedback

   These look like maximal sci-fi decoration and are actually state. A neutral
   theme needs a PLAIN EQUIVALENT, not an absence — which is styling work in #299,
   not a hide rule here. Removing them would delete the only signal the user has
   that an upload is progressing.

   There is intentionally NO selector for them in this file. That absence is the
   decision, recorded here so it doesn't read as an oversight.
   ──────────────────────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────────────────────
   CATEGORY 3 — PURE DECORATION. Hide.

   Verified to carry no content and no state: corner brackets and accents,
   scanline sweeps, the holo grid, float/spin motion, and glow pulses.
   `display: none` rather than `opacity: 0` so they cost no paint or animation
   frames when a theme has opted out.
   ──────────────────────────────────────────────────────────────────────────── */
html[data-srn-ornament="off"] .frame-corner,
html[data-srn-ornament="off"] .hud-corner-accent,
html[data-srn-ornament="off"] .hud-corner-tl,
html[data-srn-ornament="off"] .hud-corner-br,
html[data-srn-ornament="off"] .holo-scanline,
html[data-srn-ornament="off"] .holo-grid,
/* #301 — decorative TEXT. `.deco-text` / `.hud-overview-deco` carry literal HUD
   chrome ([SYS.ID_001], NET: SECURE, ORG: HIERARCHY) that is pure sci-fi flavour and
   means nothing outside it. This was MISSING from #298, so a theme that opted out of
   ornament still rendered "[SYS.SET_004]" on its settings page.
   ⚠️ `.scramble-text` is NOT listed here — see below, it is an EFFECT, not decoration. */
html[data-srn-ornament="off"] .deco-text,
html[data-srn-ornament="off"] .hud-overview-deco {
    display: none;
}

/* ────────────────────────────────────────────────────────────────────────────
   #301 — `.scramble-text` is an EFFECT applied to text, not a kind of text.

   Mostly it decorates `.deco-text` (hidden above). But `Utilities.razor:44` puts it
   on `<h5>UTILITY MENU</h5>` — a REAL menu heading. Hiding every `.scramble-text`
   would delete that heading, which is the same class of mistake as treating
   `.hud-card` as ornament.

   So: keep the text, drop the sci-fi treatment. The character-scrambling itself is
   JS-driven (dashboard-hud.js) and is gated there on the same flag.
   ──────────────────────────────────────────────────────────────────────────── */
html[data-srn-ornament="off"] .scramble-text {
    text-shadow: none;
    letter-spacing: normal;
}

/* Motion and glow applied to elements that DO carry content — so these cancel the
   decoration without hiding the host element. */
html[data-srn-ornament="off"] .holo-float,
html[data-srn-ornament="off"] .hud-spin-cw,
html[data-srn-ornament="off"] .hud-spin-ccw,
html[data-srn-ornament="off"] .ring-spin-cw,
html[data-srn-ornament="off"] .ring-spin-ccw,
html[data-srn-ornament="off"] .text-glow-pulse,
html[data-srn-ornament="off"] .text-dim-glow {
    animation: none;
    text-shadow: none;
    filter: none;
}
