/* GriGsi VMCR — split part 10/10 — Etap 1 (beta) server-side camera-switching sync panel. Part of website/css/vmcr.css, cut in original order (2026-09-23); load all 10 vmcr-*.css files together in order, never reorder. */
/* Etap 1 (beta): server-side camera-switching sync panel, opt-in via the "Server Sync" button
   next to Show Log. Small and fixed so it never disturbs the existing workbench layout. */
#vmcr-sfusync-toggle-btn.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.vmcr-sfusync-panel {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 9000;
  width: 240px;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  padding: 8px;
  color: #e2e8f0;
  font-size: 0.75rem;
}
.vmcr-sfusync-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: #5eead4;
}
.vmcr-sfusync-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  border-radius: 6px;
}
.vmcr-sfusync-status {
  margin: 6px 0 0;
  color: #94a3b8;
}
.vmcr-sfusync-layout-row {
  display: flex;
  gap: 6px;
  margin: 8px 0 0;
}
.vmcr-sfusync-layout-btn {
  flex: 1;
  padding: 5px 4px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}
.vmcr-sfusync-layout-btn:hover {
  background: #334155;
  color: #e2e8f0;
}
.vmcr-sfusync-layout-btn.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.vmcr-sfusync-voice-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 0;
  padding: 6px 4px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.vmcr-sfusync-voice-btn:hover {
  background: #334155;
}
.vmcr-sfusync-voice-btn.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.vmcr-sfusync-rtmp {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 0;
  padding: 6px 8px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.72rem;
}
.vmcr-sfusync-rtmp::placeholder {
  color: #64748b;
}
.vmcr-sfusync-live-row {
  display: flex;
  gap: 6px;
  margin: 8px 0 0;
}
.vmcr-sfusync-golive-btn,
.vmcr-sfusync-record-btn {
  flex: 1;
  padding: 6px 4px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.vmcr-sfusync-golive-btn:hover,
.vmcr-sfusync-record-btn:hover {
  background: #334155;
}
.vmcr-sfusync-golive-btn.is-active {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.vmcr-sfusync-record-btn.is-active {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.vmcr-sfusync-live-status {
  margin: 6px 0 0;
  color: #fbbf24;
  min-height: 1em;
}

.vmcr-sfusync-record-download {
  display: block;
  margin: 4px 0 0;
  color: #7ad3ff;
  font-size: 0.85em;
}

.vmcr-sfusync-replay {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.vmcr-sfusync-replay-toggle {
  width: 100%;
  padding: 6px 4px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.vmcr-sfusync-replay-toggle:hover {
  background: #334155;
}
.vmcr-sfusync-replay-toggle.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.vmcr-sfusync-replay-controls {
  margin-top: 8px;
}
.vmcr-sfusync-replay-slot {
  width: 100%;
  margin-bottom: 6px;
  padding: 5px 6px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.72rem;
}
.vmcr-sfusync-replay-scrub {
  width: 100%;
  margin: 4px 0;
}
.vmcr-sfusync-replay-time {
  display: block;
  color: #94a3b8;
  font-size: 0.7rem;
  margin-bottom: 6px;
}
.vmcr-sfusync-replay-actions {
  display: flex;
  gap: 6px;
}
.vmcr-sfusync-replay-actions button {
  flex: 1;
  padding: 6px 4px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}
.vmcr-sfusync-replay-actions button:hover {
  background: #334155;
}
.vmcr-sfusync-replay-status {
  margin: 6px 0 0;
  color: #7ad3ff;
  font-size: 0.7rem;
  min-height: 1em;
}

/* ---- Record button phases under LIVE (see paintRecordPhase in vmcr-director-sfu-sync.js) ----
   Idle Record is neutral; it turns red only once the server's file is really growing. While the
   take starts or the file is being closed after Stop, a spinner says what is happening. */
#vmcr-live-rec-btn:not(.is-recording) {
  background: linear-gradient(180deg, #3a3f4a 0%, #2a2e36 100%);
  border-color: rgba(255, 255, 255, 0.18);
}
#vmcr-live-rec-btn.is-recording {
  background: linear-gradient(180deg, #ff3b30 0%, #c4170c 100%);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.35);
  animation: vmcr-rec-glow 1.6s ease-in-out infinite;
}
#vmcr-live-rec-btn.is-rec-starting,
#vmcr-live-rec-btn.is-rec-finishing {
  opacity: 1;
  cursor: progress;
}
.vmcr-rec-spin {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.45em;
  vertical-align: -0.12em;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vmcr-rec-spin 0.8s linear infinite;
}
.vmcr-rec-dot {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.45em;
  border-radius: 50%;
  background: #fff;
  animation: vmcr-rec-blink 1s steps(2, start) infinite;
}
#vmcr-live-download-btn.is-preparing {
  pointer-events: none;
  cursor: progress;
  opacity: 0.85;
}
#vmcr-live-download-btn.is-fresh {
  background: linear-gradient(180deg, #2fbf5a 0%, #1d8a3e 100%);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(47, 191, 90, 0.35);
}
@keyframes vmcr-rec-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes vmcr-rec-blink {
  to {
    visibility: hidden;
  }
}
@keyframes vmcr-rec-glow {
  50% {
    box-shadow: 0 0 0 6px rgba(255, 59, 48, 0.12);
  }
}
@media (prefers-reduced-motion: reduce) {
  .vmcr-rec-spin,
  .vmcr-rec-dot,
  #vmcr-live-rec-btn.is-recording {
    animation: none;
  }
}
