/* ============================================================================
   Q-SYS UCI recreation - divisible room (room panel + rack panel)
   Laid out at the UCI's native 1160 x 725. Accent follows --brand when the
   portfolio site sets one.
   ============================================================================ */
:root {
  --bg: #0c0d12;
  --card: #161924;
  --card-2: #1d2130;
  --line: #2b3045;
  --text: #e7eaf2;
  --muted: #8a93ad;
  --accent: var(--brand, #2f8fe8);
  --sel-bg: color-mix(in srgb, var(--accent) 22%, #0f1420);
  --green: #22c47a;
  --green-bg: #133826;
  --red: #ef4a4a;
  --orange: #f28c1e;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
body {
  width: 1160px; height: 725px; color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#app { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }

/* ---------- shared bits ---------- */
.btn {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .1s, border-color .1s, transform .06s;
}
.btn:active, .btn.is-pressed { transform: scale(.97); background: #262b3d; }
.btn.is-on { background: var(--sel-bg); border-color: var(--accent); color: var(--accent); }
.btn.is-green { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.section-title { font-size: 15px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 8px; letter-spacing: .02em; text-transform: uppercase; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.logo-box { background: #fff; color: #555; display: grid; place-items: center; overflow: hidden; }

/* ---------- header ---------- */
.hdr { flex: none; height: 86px; display: flex; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--line); gap: 18px; background: #0f1118; }
.hdr .logo-box { width: 92px; height: 74px; font-size: 11px; }
.hdr .sep { width: 1px; height: 36px; background: #3a4058; }
.hdr .room { font-size: 23px; }
.pill { font-size: 13px; color: var(--accent); border: 1px solid var(--accent); background: var(--sel-bg); border-radius: 999px; padding: 3px 9px; letter-spacing: .04em; }
.hdr .spacer { flex: 1; }
.sys-off { height: 50px; padding: 0 20px; border: 1px solid #7a2a2f; background: #3a1519; color: var(--red); border-radius: 6px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.sys-off svg { width: 22px; height: 22px; }

/* rack header controls */

/* ---------- tab bar ---------- */
.tabs { flex: none; height: 76px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: #10121a; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 21px; border-right: 1px solid var(--line); position: relative; }
.tab:last-child { border-right: 0; }
.tab svg { width: 22px; height: 22px; }
.tab.is-on { color: var(--accent); background: var(--sel-bg); }
.tab.is-on::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: var(--accent); }

.body { flex: 1; min-height: 0; position: relative; padding: 16px 20px; }

/* ---------- start screen ---------- */
.start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); z-index: 5; }
.start .logo-box { width: 205px; height: 148px; font-size: 18px; margin-bottom: 38px; }
.start h1 { font-weight: 300; font-size: 44px; margin: 0; letter-spacing: .02em; }
.start p { color: var(--muted); margin: 10px 0 46px; font-size: 16px; }
.modes { display: grid; grid-template-columns: repeat(3, 262px); gap: 18px; }
.mode { height: 192px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; padding: 14px 18px; text-align: center; }
.mode:active { transform: scale(.98); }
.mode .ico { width: 76px; height: 58px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid #2f3448; }
.mode .ico svg { width: 22px; height: 22px; }
.mode b { font-size: 19px; margin-bottom: 12px; }
.mode span { color: var(--muted); font-size: 14px; line-height: 1.3; }
.start .hint { color: var(--muted); font-size: 14px; margin-top: 46px; }

/* ---------- video page ---------- */
.video-room { display: grid; grid-template-columns: 242px 1fr auto; gap: 16px; height: 100%; }
.side { display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.side .panel { padding: 18px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.side .lbl { font-size: 13px; color: #b9c0d4; text-align: center; letter-spacing: .02em; }
.onoff { width: 100%; height: 80px; font-size: 15px; }
.privacy { width: 122px; height: 60px; font-size: 20px; color: #b9c0d4; }
.privacy.is-on { background: #3a1519; border-color: var(--red); color: var(--red); }
.sources { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.sources .section-title { margin: 0 0 10px; }
.src { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 18px; padding: 0 28px; text-align: left; }
.src svg { width: 54px; height: 54px; stroke-width: 1.6; color: #d6dbe8; }
.src b { display: block; font-weight: 400; font-size: 18px; }
.src small { color: var(--muted); font-size: 14px; }
.src.is-on { border-color: var(--accent); background: var(--sel-bg); }
.src.is-on svg { color: var(--accent); }
.vols { display: flex; gap: 14px; height: 100%; padding-top: 30px; }

/* volume strip */
.strip { width: 122px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; }
.strip-h { height: 46px; display: grid; place-items: center; text-align: center; font-size: 12.5px; color: #b9c0d4; border-bottom: 1px solid var(--line); padding: 0 6px; line-height: 1.2; text-transform: uppercase; }
.strip-b { flex: 1; display: flex; padding: 28px 10px 10px 8px; gap: 8px; min-height: 0; }
.strip-btns { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 38px; }
.sq { width: 74px; height: 70px; font-size: 40px; font-weight: 700; line-height: 1; }
.mutebtn { width: 74px; height: 70px; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--green); border-color: var(--green); background: var(--green-bg); }
.mutebtn svg { width: 20px; height: 20px; }
.mutebtn.is-muted { color: var(--red); border-color: var(--red); background: #3a1519; }
.bar { width: 7px; background: #0a0b10; border: 1px solid var(--line); border-radius: 4px; position: relative; overflow: hidden; }
.bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); transition: height .08s linear; }
.strip.is-muted .bar i { background: #4b5168; }
.strip-db { height: 30px; display: grid; place-items: center; font: 600 13px Georgia, serif; color: #b9c0d4; border-top: 1px solid var(--line); }

/* ---------- mics page ---------- */
.mics { display: flex; justify-content: center; gap: 40px; height: 100%; padding: 40px 0 50px; }
.rack .mics { padding: 0 0 4px; }
.mic-group { display: flex; gap: 16px; }
.rack .strip { width: 136px; }
.rack .sq, .rack .mutebtn { width: 90px; height: 95px; }
.rack .strip-btns { gap: 40px; }

/* ---------- cameras (room) ---------- */
.cams { display: grid; grid-template-columns: 178px 606px 1fr; grid-template-rows: 1fr auto; gap: 14px 18px; height: 100%; }
.cam-list { display: flex; flex-direction: column; gap: 6px; }
.cam-list .section-title { margin: 6px 0 12px; border-color: var(--green); }
.cam-btn { height: 56px; font-size: 13px; justify-content: flex-start; padding: 0 10px; }
.cam-btn svg { width: 18px; height: 18px; }
.view { border: 1px solid var(--line); border-radius: 10px; position: relative; overflow: hidden; background: #0b0d14; margin-top: 18px; }
.scene { position: absolute; inset: -40%; transition: transform .12s linear;
  background:
    radial-gradient(circle at 50% 62%, #2a3550 0 6%, transparent 6.5%),
    linear-gradient(#1b2131 0 58%, #141826 58%),
    repeating-linear-gradient(90deg, transparent 0 79px, #232a3d 79px 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, #232a3d 79px 80px);
  background-blend-mode: normal; }
.scene::after { content: ""; position: absolute; left: 44%; top: 46%; width: 12%; height: 22%; border-radius: 40% 40% 6px 6px; background: #2b3550; }
.reticle { position: absolute; inset: 0; pointer-events: none; }
.reticle::before, .reticle::after { content: ""; position: absolute; background: rgba(255,255,255,.18); }
.reticle::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.reticle::after { top: 50%; left: 0; right: 0; height: 1px; }
.view-info { position: absolute; left: 12px; bottom: 10px; right: 12px; display: flex; justify-content: space-between; font: 12px ui-monospace, Consolas, monospace; color: #b9c0d4; text-shadow: 0 1px 2px #000; }
.view-tag { position: absolute; left: 12px; top: 10px; font-size: 13px; color: #fff; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 4px; }
.view.is-private .scene { filter: blur(6px) brightness(.3); }
.ptz { display: grid; grid-template-columns: repeat(3, 84px); grid-template-rows: 64px 30px 64px 64px 64px; gap: 0; align-content: center; margin-top: 60px; }
.ptz .btn { font-size: 22px; height: 64px; }
.zoom { grid-column: span 1; }
.cam-bottom { grid-column: 1 / 4; display: flex; gap: 12px; align-items: center; }
.auto { width: 154px; height: 62px; font-size: 13px; }
.preset { width: 108px; height: 62px; font-size: 22px; }

/* ---------- cameras (rack) ---------- */
.cam-grid { display: grid; grid-template-columns: repeat(3, 306px); gap: 26px 36px; justify-content: center; padding-top: 30px; }
.cam-tile { height: 170px; background: #c3c3c3; border: 1px solid #888; position: relative; overflow: hidden; }
.cam-tile .scene { inset: -30%; opacity: .55; }
.cam-tile .t-lbl { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 12px; color: #222; background: rgba(255,255,255,.7); padding: 2px 8px; border-radius: 3px; white-space: nowrap; text-align: center; }
.arr { position: absolute; width: 22px; height: 22px; background: #e8e8e8; border: 1px solid #999; display: grid; place-items: center; color: #555; }
.arr svg { width: 14px; height: 14px; stroke-width: 2.5; }
.rack-cam-foot { display: grid; grid-template-columns: repeat(3, 306px); gap: 36px; justify-content: center; margin-top: 8px; }
.rack-cam-foot > div { display: flex; align-items: center; gap: 10px; }
.rack-cam-foot .auto { width: 104px; height: 40px; font-size: 13px; }
.rack-cam-foot .panel { padding: 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rack-cam-foot .lbl { font-size: 12px; color: #b9c0d4; text-align: center; }
.rack-cam-foot .privacy { width: 80px; height: 36px; font-size: 18px; }

/* ---------- video (rack) ---------- */
.rack-video { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 14px; height: 100%; grid-template-rows: auto 1fr auto; }
.rack-video .section-title { margin-top: 2px; }
.rack-video .t-west { border-color: #1d6fb8; } .rack-video .t-center { border-color: #7a3df0; } .rack-video .t-east { border-color: #3fd14a; }
.rack-video .srcs { display: flex; flex-direction: column; gap: 10px; }
.rack-video .src { height: 138px; flex: none; padding: 0 28px; }
.rack-video .src svg { width: 52px; height: 52px; }
.rack-video .disp { padding: 14px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rack-video .disp .lbl { font-size: 13px; color: #b9c0d4; margin-bottom: 10px; }
.rack-video .onoff { height: 46px; }
.combined { font-size: 12px; color: var(--orange); margin-left: 8px; }

/* ---------- routing ---------- */
.routing { display: grid; grid-template-columns: 196px repeat(4, 1fr); grid-template-rows: 66px repeat(6, 1fr); gap: 9px 14px; height: 100%; padding-right: 60px; }
.routing .section-title { align-self: start; margin-top: 4px; border-color: var(--orange); }
.dest { background: var(--card); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 15px; color: #b9c0d4; }
.dest small { color: var(--orange); font-size: 12px; }
.rsrc { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; display: flex; flex-direction: column; justify-content: center; }
.rsrc small { color: var(--muted); font-size: 12px; }
.rsrc b { font-weight: 400; font-size: 16px; }
.xp { background: var(--card-2); border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--accent); }
.xp svg { width: 22px; height: 22px; opacity: 0; }
.xp.is-on { background: var(--sel-bg); border-color: var(--accent); }
.xp.is-on svg { opacity: 1; }

/* ---------- confirm modal ---------- */
.modal { position: absolute; inset: 0; background: rgba(4,5,8,.75); display: grid; place-items: center; z-index: 10; }
.modal > div { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: 10px; padding: 30px 40px; text-align: center; width: 440px; }
.modal h3 { margin: 0 0 6px; font-size: 22px; font-weight: 500; }
.modal p { margin: 0 0 24px; color: var(--muted); }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .btn { height: 56px; font-size: 17px; }
.modal .danger { background: #3a1519; border-color: var(--red); color: var(--red); }
button:focus:not(:focus-visible) { outline: none; }   /* no ring on tap - only for keyboard focus */

/* ---------- rack header: override + walls ---------- */
/* fixed width so the button never changes size between states */
.override { width: 236px; height: 52px; flex: none; font-size: 14px; white-space: nowrap; }
.override.is-on { background: #3a1519; border-color: var(--red); color: #ff8a8a; box-shadow: 0 0 0 1px var(--red) inset; }
.wall { position: relative; width: 122px; height: 52px; flex: none; font-size: 13px; line-height: 1.15; }
.wall i { position: absolute; top: 6px; right: 7px; width: 10px; height: 10px; border-radius: 50%; }
.wall small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; margin-top: 2px; }
/* CLOSED = blue, rooms separate */
.wall.is-closed { background: #12233d; border-color: #3a8bff; color: #9cc8ff; }
.wall.is-closed i { background: #3aa8ff; box-shadow: 0 0 6px #3aa8ff; }
/* OPEN = orange, rooms combined */
.wall.is-open { background: #3b2508; border-color: var(--orange); color: #ffb35c; }
.wall.is-open i { background: var(--orange); box-shadow: 0 0 6px var(--orange); }
/* locked until override - still shows its state, just dimmer */
.wall:disabled { opacity: .55; cursor: not-allowed; }

.group-chips { display: flex; gap: 6px; }
.gchip { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; display: flex; align-items: center; gap: 5px; }
.gchip.is-combined { color: #ffb35c; border-color: var(--orange); background: #3b2508; }
.gchip svg, .pill-combined svg, .linked svg, .toast svg { width: 13px; height: 13px; }
.pill-combined { color: #ffb35c; border-color: var(--orange); background: #3b2508; display: flex; align-items: center; gap: 5px; }
.linked { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 11px; color: #ffb35c; text-transform: lowercase; }
.following { font-size: 12px; color: #ffb35c; text-align: center; }
.muted-note { color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; }

/* combined podium: more sources and lectern strips */
.video-room.is-combined .src { padding: 0 20px; }
.video-room.is-combined .src svg { width: 38px; height: 38px; }
.video-room.is-combined .src b { font-size: 16px; }
.toast {
  position: absolute; left: 50%; top: 96px; transform: translateX(-50%); z-index: 8;
  display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px;
  background: #3b2508; border: 1px solid var(--orange); color: #ffcf94; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toast-in .25s ease-out;
}
.toast svg { width: 16px; height: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }
