/* CCR Academy - styles for the plant upgrade (Nov 2026): screen tabs, detailed screens, equipment groups, interlocks. */
/* Control Room nav: orange dot while a drill is paused in the background. */
#nav button.live::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f28c28; margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 3px rgba(242,140,40,.18); }
/* The tab bar gets a fixed row: an auto row with overflow-x could shrink to nothing on shorter screens and hide the tabs. */
.crleft.has-scr, .cr.panel-off .crleft.has-scr { grid-template-rows: 44px minmax(220px, 1.25fr) minmax(180px, 1fr); }
.scrtabs { display: flex; align-items: center; gap: 6px; padding: 6px 8px; height: 44px; min-height: 44px; box-sizing: border-box; background: #15181b; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.scrtabs .scrlbl { color: var(--dim); font: 700 10.5px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; white-space: nowrap; }
.scrtabs button { background: #1d2226; border: 1px solid #323a41; color: #c9d1d8; font: 600 13px var(--sans); padding: 6px 13px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.scrtabs button:hover { color: #fff; border-color: #4a545d; background: #242a2f; }
.scrtabs button.on { background: #f28c28; border-color: #f28c28; color: #111417; }
.scrtabs .scrtip { margin-left: auto; padding: 0 6px 6px; color: var(--dim); font-size: 10.5px; white-space: nowrap; }
.mimicwrap .scr { position: absolute; inset: 0; overflow: auto; }
.mimicwrap .scr svg { width: 100%; height: 100%; display: block; }
.mimicwrap .scr.html { background: var(--bg2); }
.m-eq.warnv { stroke: var(--p2); stroke-width: 2.5; }
.m-lim-bg { fill: #22272b; stroke: #2f363c; }
.m-lim { fill: #7d8891; }
.m-lim.warn { fill: var(--p3); }
.m-lim.bad { fill: var(--p1); }
.cr.hmi-light .m-lim-bg { fill: #d9dcde; }
.cr.hmi-light .scrtabs { background: #b9bec2; }
.cr.hmi-light .scrtabs button.on { background: #c6cacd; color: #111; }
.cr.hmi-dark-blue .scrtabs { background: #0b1520; }
.cr.hmi-dark-blue .scrtabs button.on { background: #102030; }

/* Equipment tab: groups */
.eqgrp { border: 1px solid var(--line); border-radius: 7px; margin-bottom: 9px; padding: 7px 7px 3px; background: rgba(255, 255, 255, .015); }
.eqgh { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; }
.eqgh b { color: var(--text); }
.gst { font: 700 10px var(--mono); padding: 2px 6px; border-radius: 4px; background: #2a2f34; white-space: nowrap; }
.gst.run { color: #7fd1b9; } .gst.off { color: var(--muted); } .gst.part { color: var(--p3); } .gst.seq { color: var(--sp); animation: tabpulse 1.2s ease-in-out infinite; }
.eqgrp .eqrow { margin-bottom: 3px; padding: 6px 8px; }
.eqperm { font-size: 10.5px; line-height: 1.35; margin: 0 0 5px 22px; }
.eqperm.miss { color: var(--p3); }
.eqperm.ok { color: #7fd1b9; }
.firstout { background: #3a1311; border: 1px solid var(--p1); border-radius: 7px; padding: 8px 10px; margin-bottom: 9px; font-size: 12px; line-height: 1.4; }
.firstout b { color: #ff8a80; letter-spacing: .05em; }

/* Interlocks screen */
.ilkscr { padding: 10px 14px 16px; font-size: 12px; color: var(--text); }
.ilkscr table { width: 100%; border-collapse: collapse; }
.ilkscr th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: var(--bg2); }
.ilkscr td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ilkscr td:nth-child(3) { font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.ilkscr .st-ok { color: #7fd1b9; } .ilkscr .st-act { color: var(--p2); font-weight: 700; } .ilkscr .st-by { color: var(--p1); font-weight: 700; } .ilkscr .st-trip { color: var(--p1); }
.ilkbar { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }

@media (max-width: 900px) {
  .crleft.has-scr, .cr.panel-off .crleft.has-scr { grid-template-rows: 44px auto 280px; }
  .scrtabs .scrlbl { display: none; }
  .mimicwrap .scr { position: relative; }
  .mimicwrap .scr svg { width: 900px; height: 396px; }
  .scrtabs .scrtip { display: none; }
}
