/* SPDX-License-Identifier: GPL-3.0-or-later */
/* control.leyr.stream: what the Control page adds to /site.css, on the same
   tokens, so it follows the playing album like the other pages. The console
   is an illustration with example data; nothing here talks to a server. */

/* Amber for "needs attention", from the app's palette; darker on light. */
:root { --warn: #e2c78f; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --warn: #8a5a0b; } }

/* ---------- Console preview ---------- */
.console {
  max-width: 980px; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow);
}
.console-bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  background: var(--frame-bar, var(--surface-2)); border-bottom: 1px solid var(--line);
  font-size: 13.5px; color: var(--fg-2);
}
.console-dots, .terminal-bar { display: flex; gap: 6px; }
.console-dots i, .terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.console-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fg); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-title .brand-tint { width: 18px; height: 18px; flex: none; }
.console-state { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.console-state .live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 640px) { .console-state { display: none; } }

.console-body { display: grid; grid-template-columns: 1fr; min-height: 380px; }
@media (min-width: 760px) { .console-body { grid-template-columns: 200px 1fr; } }
.console-tabs {
  display: flex; gap: 4px; padding: 10px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.console-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 760px) { .console-tabs { flex-direction: column; border-bottom: 0; border-right: 1px solid var(--line); padding: 14px 10px; } }
html:not(.js) .console-tabs { display: none; }
html:not(.js) .console-body { grid-template-columns: 1fr; }
html:not(.js) .console-panel + .console-panel { border-top: 1px solid var(--line); }
.console-tabs button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none;
  min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px; background: none;
  font: 500 14.5px/1.2 var(--sans); color: var(--fg-2); text-align: left; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.console-tabs button:hover { color: var(--fg); background: var(--surface-2); }
.console-tabs button[aria-selected="true"] { color: var(--fg); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.console-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.console-tabs button span { font-size: 12px; font-weight: 600; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--fg-3); text-align: center; }
.console-tabs button[aria-selected="true"] span { background: var(--accent); color: var(--on-accent); }

.console-panel { padding: 22px 24px 26px; min-width: 0; }
.js .console-panel:not([hidden]) { animation: rise .45s var(--ease) both; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { font-size: 20px; margin: 0; }
.panel-foot { margin: 14px 0 0; font-size: 14px; color: var(--fg-3); }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rows li {
  display: flex; align-items: center; gap: 14px; min-width: 0; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2);
}
.rows .who { display: grid; min-width: 0; flex: 1; }
.rows .who b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .who small { font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); }
.rows .art { flex: none; width: 40px; height: 40px; border-radius: 8px; background: radial-gradient(70% 70% at 30% 25%, var(--a), var(--b)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.rows .state { flex: none; width: 10px; height: 10px; margin: 0 6px; border-radius: 50%; }
.rows .state.ok { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.rows .state.warn { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); }
.rows.log time { flex: none; width: 44px; font: 500 13px/1 var(--mono); color: var(--fg-3); }
.rows .actions { display: flex; gap: 6px; flex: none; }

.chip, .mini {
  flex: none; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg-2);
}
.chip.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.chip.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.mini { border-radius: 8px; padding: 5px 10px; }
.mini.primary { border-color: transparent; background: var(--accent); color: var(--on-accent); }
@media (max-width: 480px) {
  .console-panel { padding: 18px 14px 20px; }
  .rows li { padding: 10px 12px; gap: 10px; }
  .rows .actions .mini:last-child { display: none; }
}
.console-note { text-align: center; margin-top: 18px; }

/* ---------- Break-glass terminal ---------- */
.terminal { min-width: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); box-shadow: var(--shadow); }
.terminal-bar { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--frame-bar, var(--surface-2)); }
.terminal pre { margin: 0; padding: 20px 22px 24px; overflow-x: auto; font: 400 14px/1.7 var(--mono); color: var(--fg); }
.terminal .c { color: var(--fg-3); }
