/* camrec.css — split out of style.css on 2026-09-02 so a feature's styles live
   with the feature and parallel sessions stop colliding in one 4,600-line
   file. The webcam window and Record run / Record everything (camrec.js): the pills, the clip card, the mic picker and the pause menu's input card.
   Loads AFTER style.css (index.html), so the cascade order the rules had
   inside it is preserved: nothing here was moved relative to what follows it. */

/* ------------------------------------------------ webcam + record the run
   (camrec.js): the pills, the draggable webcam window, the clip card */
.camrec-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
#pp-camrec button {
  font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .5px; cursor: pointer;
  color: #d7e0ea; background: rgba(8, 10, 22, 0.55); border: 1px solid rgba(215, 224, 234, 0.35);
  border-radius: 999px; padding: 6px 12px; opacity: .8; transition: opacity .15s, border-color .15s, color .15s;
}
#pp-camrec button:hover { opacity: 1; }
#pp-camrec button:disabled, #pz-camrec button:disabled { opacity: .3; cursor: default; }
.camrec-sel {
  font: inherit; font-size: 12px; font-weight: 700; color: #d7e0ea; cursor: pointer; max-width: 260px;
  background: rgba(8, 10, 22, 0.55); border: 1px solid rgba(215, 224, 234, 0.35);
  border-radius: 999px; padding: 6px 10px;
}
.camrec-sel option { background: #101426; color: #fff; }
#pp-camrec button.on, #pz-camrec button.on { color: var(--gold); border-color: var(--gold); }
#pp-rec.recording, #pz-rec.recording,
#pp-recall.recording, #pz-recall.recording {
  color: #ff5a5a !important; border-color: #ff5a5a !important; opacity: 1;
  animation: camrec-blink 1.2s ease-in-out infinite;
}
@keyframes camrec-blink { 50% { border-color: rgba(255, 90, 90, .35); } }
#cam-pip {
  position: fixed; top: 8px; right: 72px; z-index: 45; cursor: grab;
  border-radius: 12px; overflow: hidden; background: #000; touch-action: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .18);
  user-select: none;
}
#cam-pip.dragging { cursor: grabbing; }
#cam-pip video { display: block; height: var(--cp-h, 220px); width: auto; min-width: 120px; background: #000; }
#cam-pip.mirror video { transform: scaleX(-1); }
#cam-pip .cp-bar {
  position: absolute; top: 6px; right: 6px; display: flex; gap: 4px;
  opacity: 0; transition: opacity .15s;
}
#cam-pip:hover .cp-bar { opacity: 1; }
#cam-pip .cp-bar button {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px;
  color: #fff; background: rgba(8, 10, 22, .7); border: 1px solid rgba(255, 255, 255, .3);
}
#cam-pip .cp-bar button:hover { background: rgba(52, 211, 255, .35); }
#cam-pip .cp-rec {
  position: absolute; top: 10px; left: 10px; width: 12px; height: 12px; border-radius: 50%;
  background: #ff3b3b; box-shadow: 0 0 8px #ff3b3b; display: none;
}
#cam-pip.rec-on .cp-rec { display: block; animation: camrec-blink-dot 1.2s ease-in-out infinite; }
@keyframes camrec-blink-dot { 50% { opacity: .25; } }
#clip-card {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 340px; max-width: calc(100vw - 36px);
  padding: 12px 14px; border-radius: 14px; color: #fff;
  background: rgba(12, 14, 30, .96); border: 1px solid rgba(255, 215, 94, .5);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
#clip-card .cc-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
#clip-card .cc-x { margin-left: auto; background: none; border: 0; color: #aab; font-size: 16px; cursor: pointer; }
#clip-card .cc-x:hover { color: #fff; }
#clip-card .cc-prev { display: block; width: 100%; border-radius: 8px; background: #000; max-height: 200px; }
#clip-card .cc-meta { font-size: 12px; opacity: .8; margin: 8px 0; }
#clip-card .cc-row { display: flex; gap: 8px; align-items: center; }
#clip-card .cc-row .mode-btn { margin: 0; flex: 1; }
#camrec-toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%) translateY(-8px);
  z-index: 70; pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s;
  background: rgba(8, 10, 22, 0.92); color: #fff; font-size: 14px; font-weight: 700;
  padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); max-width: 80vw; text-align: center;
}
#camrec-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Pause menu → "How you play" (bug report #8, 2026-08-31: the player who
   cannot make a note is standing on this screen). Named first in the card
   list, and the only card that reports a STATE rather than offering a knob. */
#pz-input-card .pz-input-now { text-align: left; font-size: 12.5px; line-height: 1.5; margin-bottom: 8px; }
#pz-input-card .pz-input-now b { display: block; font-size: 14px; color: #ffe9a3; margin-bottom: 2px; }
#pz-input-card .pz-input-now span { opacity: .8; }
#pz-input-card .pz-input-now span.ok { color: #b6f5d4; opacity: 1; }
#pz-input-card .pz-input-now span.warn { color: #ffc46b; opacity: 1; }
/* the menu's status pill is a door now, not a label */
.midi-status[role="button"] { cursor: pointer; }
.midi-status[role="button"]:hover { text-decoration: underline; }
