/* THE CONTROL ROOM — plant mimic + annunciator window styles. */

/* --- Annunciator window ----------------------------------------------------- */

.annun-wrap {
  display: flex;
  height: 100%;
  gap: 8px;
  padding: 8px 10px;
  align-items: stretch;
}
.annun-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
  min-width: 0;
}
.annun-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }

.annun-tile {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--bg-panel);
  color: var(--ink-faint);
  font-size: calc(9.5px * var(--fs, 1));
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2px 3px;
  user-select: none;
  overflow: hidden;
}
/* Unlit tiles are the de-energized lens: the same look as the dim phase of
   the flash animation (lit colors × 0.25 brightness) — a dull colored
   background with dark engraved text. Lit rules below override. */
.annun-tile.sev-alarm {
  background: color-mix(in srgb, var(--annun-red) 25%, black);
  color: #160404;                                   /* dark engraving on dull red */
  border-color: color-mix(in srgb, var(--annun-red) 32%, black);
}
.annun-tile.sev-warning {
  background: color-mix(in srgb, var(--annun-amber) 25%, black);
  color: #0a0600;                                   /* #201500 × 0.25 */
  border-color: color-mix(in srgb, var(--annun-amber) 32%, black);
}
.annun-tile.sev-status {
  background: color-mix(in srgb, var(--phosphor) 30%, black);
  color: #04160c;                                   /* dark engraving on dull green */
  border-color: color-mix(in srgb, var(--phosphor) 38%, black);
}

.annun-tile.lit-alarm   { background: var(--annun-red);   color: #160404; border-color: var(--annun-red); }
.annun-tile.lit-warning { background: var(--annun-amber); color: #201500; border-color: var(--annun-amber); }
.annun-tile.lit-status  { background: var(--phosphor-soft); color: var(--phosphor); border-color: var(--phosphor); }
.annun-tile.flash { animation: annun-flash 0.55s step-start infinite; }
.annun-tile.flash-slow { animation: annun-flash 1.4s step-start infinite; }
@keyframes annun-flash { 50% { filter: brightness(0.25); } }

.annun-buttons {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.annun-buttons .btn { font-size: calc(10.5px * var(--fs, 1)); padding: 4px 8px; letter-spacing: 0.08em; }

/* Reduced motion (OS setting or the in-app toggle): the flash animation is
   suppressed, so the alarm states get a static distinction instead —
   new/unacknowledged = bright solid outline, cleared-unacknowledged = dashed.
   The lesson text calls this out so the semantics stay teachable. */
@media (prefers-reduced-motion: reduce) {
  .annun-tile.flash, .annun-tile.flash-slow { animation: none; filter: none; }
  .annun-tile.flash { outline: 2px solid var(--ink); outline-offset: -3px; }
  .annun-tile.flash-slow { outline: 2px dashed var(--ink-dim); outline-offset: -3px; }
}
body.reduced-motion .annun-tile.flash,
body.reduced-motion .annun-tile.flash-slow { animation: none; filter: none; }
body.reduced-motion .annun-tile.flash { outline: 2px solid var(--ink); outline-offset: -3px; }
body.reduced-motion .annun-tile.flash-slow { outline: 2px dashed var(--ink-dim); outline-offset: -3px; }

/* --- SCRAM button (controls panel) ------------------------------------------ */

.scram-block { display: grid; place-items: center; padding: 12px; }
.scram-cover {
  width: 92px;
  border: 2px solid var(--annun-red);
  border-radius: 10px;
  padding: 6px;
  background: var(--bg-inset);
  text-align: center;
}
.scram-cover .lid {
  font-size: calc(10px * var(--fs, 1));
  letter-spacing: 0.2em;
  color: var(--annun-red);
  cursor: pointer;
  padding: 2px 0;
  border-bottom: 1px dashed var(--annun-red);
  margin-bottom: 6px;
  user-select: none;
}
.scram-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #7a1610;
  background: radial-gradient(circle at 35% 30%, #ff6a5e, var(--annun-red) 65%);
  color: #fff;
  font-weight: 800;
  font-size: calc(13px * var(--fs, 1));
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 4px 0 #7a1610, 0 6px 14px #000a;
}
.scram-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a1610; }
.scram-btn:disabled { filter: grayscale(0.8) brightness(0.6); cursor: default; }
