/* The Graphics page (graphics-1: served only with GRAPHICS_LIBRARY=1; public/graphics.js) */
body.gx-view #media-off { display: none !important; } /* (inputs and outputs: not this page's subject; it works with the media server off) */
body.media-off .content > #gx-page:not([hidden]) { display: grid !important; } /* (shown while the media server is off, as Logos and Events: the library is kept on the dashboard server) */
.gx-sub { margin: -4px 0 10px; }
.gx-tools { align-items: center; }
.gx-vpick select { max-width: 260px; }
.gx-h { margin-top: 14px; }
.gx-grp td { background: var(--panel); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 600; padding: 6px 10px; }
.table.stacked > tbody > tr.gx-grp { display: block; padding: 6px 10px; margin-bottom: 8px; border: 0; background: var(--panel); border-radius: 8px; }
.table.stacked > tbody > tr.gx-grp > td { padding: 0; border: 0; background: none; }

/* a switch: off / watch / on side by side */
.gx-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; max-width: 100%; }
.gx-seg button { background: transparent; color: var(--dim); border: 0; border-left: 1px solid var(--line-2); padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; min-width: 52px; min-height: 32px; }
.gx-seg button:first-child { border-left: 0; }
.gx-seg button:hover:not(:disabled) { background: var(--line); color: var(--text); }
.gx-seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }
.gx-seg button[aria-pressed="true"][data-mode="off"] { background: var(--line-2); color: var(--text); }
.gx-seg button[aria-pressed="true"][data-mode="watch"] { background: #8a6a1f; }
.gx-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* a state: a dot and its word */
.gx-st { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.gx-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.gx-off { color: var(--dim); }
.gx-watch { color: var(--warn); } .gx-watch .gx-dot { background: var(--warn); }
.gx-on-air { color: var(--ok); } .gx-on-air .gx-dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
.gx-error { color: var(--bad); } .gx-error .gx-dot { background: var(--bad); }
.gx-err { margin-top: 3px; overflow-wrap: anywhere; }
.table:not(.stacked).gx-ftable td:nth-child(2) { width: 1%; white-space: nowrap; }

/* known graphics */
.gx-tthumb { display: block; margin-top: 6px; width: 160px; max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); background: #000; }

/* candidates: a card each, as many across as fit */
.gx-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.gx-cand { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; display: grid; gap: 8px; min-width: 0; background: var(--panel); }
.gx-cand-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.gx-pics { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.gx-sheet { flex: 1 1 200px; min-width: 0; max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); background: #000; }
.gx-still { width: 108px; height: 192px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #000; flex: none; }
.gx-noimg { min-height: 40px; }
.gx-cand-act { align-items: center; gap: 8px; }
.gx-cand-act label { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 200px; }
.gx-cand-act select { width: 100%; max-width: 100%; }

/* learning */
.gx-lrow { align-items: flex-end; }
.gx-lrow label { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 180px; }
.gx-lrow select { max-width: 100%; }
.gx-log { white-space: pre-wrap; max-height: 200px; overflow: auto; margin-top: 8px; }
@media (max-width: 480px) { .gx-seg button { padding: 5px 9px; min-width: 44px; } .gx-still { width: 90px; height: 160px; } }
