/* StreamEzy Multi-Camera Live Studio Stylesheet */
:root {
  --studio-bg: #090c10;
  --studio-panel: #131722;
  --studio-panel-border: #262c3d;
  --studio-pvw: #10b981;
  --studio-pvw-glow: rgba(16, 185, 129, 0.4);
  --studio-prg: #ef4444;
  --studio-prg-glow: rgba(239, 68, 68, 0.5);
  --studio-accent: #6366f1;
}

body.studio-body {
  background-color: var(--studio-bg);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOP HEADER */
.studio-header {
  background-color: var(--studio-panel);
  border-bottom: 2px solid var(--studio-panel-border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.studio-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 26px;
  color: var(--studio-accent);
}

.studio-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0;
  color: #f8fafc;
}

.studio-subtitle {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.2px;
}

.tally-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tally-pill.standby {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.tally-pill.on-air {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 10px var(--studio-prg-glow);
}

.tally-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.tally-pill.on-air .tally-dot {
  animation: pulse-dot 1.2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.header-center {
  display: flex;
  gap: 10px;
  align-items: center;
}

.metric-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--studio-panel-border);
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chip-label {
  font-size: 9px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}

.chip-value {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
}

.chip-pvw {
  color: var(--studio-pvw);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-studio-power {
  font-weight: 700;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
}

.btn-studio-power.live {
  background: #dc2626;
  border-color: #b91c1c;
}

.btn-eco-toggle {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-eco-toggle:not(.active) {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.2);
}

.btn-eco-toggle:hover {
  filter: brightness(1.15);
}

.nav-link-btn {
  padding: 7px 12px;
  font-size: 13px;
}

/* WORKSPACE */
.studio-workspace {
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* DUAL MONITORS & TRANSITIONS */
.master-monitors-deck {
  display: grid;
  grid-template-columns: 1fr 240px 1fr;
  gap: 20px;
  align-items: stretch;
}

.monitor-wrapper {
  background: var(--studio-panel);
  border-radius: 10px;
  border: 2px solid var(--studio-panel-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.preview-wrapper {
  border-color: var(--studio-pvw);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.program-wrapper {
  border-color: var(--studio-prg);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.monitor-header {
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--studio-panel-border);
}

.monitor-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tally-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.pvw-tally {
  background: var(--studio-pvw);
  color: #064e3b;
}

.prg-tally {
  background: var(--studio-prg);
  color: #ffffff;
  animation: pulse-badge 1.8s infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 4px var(--studio-prg-glow); }
  50% { box-shadow: 0 0 12px var(--studio-prg-glow); }
}

.source-label {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.monitor-specs {
  font-size: 11px;
  color: #94a3b8;
  font-family: monospace;
}

.monitor-screen {
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.monitor-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.monitor-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}

.monitor-placeholder i {
  font-size: 32px;
}

.monitor-footer {
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid var(--studio-panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
}

.btn-pvw-quick {
  background: var(--studio-pvw);
  color: #064e3b;
  font-weight: 700;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-pvw-quick:hover {
  background: #34d399;
}

.prg-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f87171;
  font-weight: 700;
  font-size: 11px;
}

/* TRANSITION CONTROL CENTER */
.transition-control-center {
  background: var(--studio-panel);
  border-radius: 10px;
  border: 1px solid var(--studio-panel-border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.transition-title {
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 1px;
  text-align: center;
  border-bottom: 1px solid var(--studio-panel-border);
  padding-bottom: 6px;
}

.btn-cut {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 2px solid #475569;
  color: #f8fafc;
  padding: 14px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cut:hover {
  border-color: #94a3b8;
  background: #334155;
}

.btn-cut:active {
  background: #ef4444;
  border-color: #ef4444;
  transform: translateY(2px);
}

.btn-take {
  background: linear-gradient(180deg, #10b981, #059669);
  border: 2px solid #34d399;
  color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.15s;
}

.btn-take:hover {
  background: linear-gradient(180deg, #34d399, #10b981);
}

.btn-take:active {
  transform: translateY(2px);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.5);
}

.action-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.take-duration {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.shortcut-hint {
  font-size: 9px;
  opacity: 0.75;
  letter-spacing: 0.5px;
}

.trans-options-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.btn-group-segmented {
  display: flex;
  background: #0f172a;
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--studio-panel-border);
}

.btn-seg {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-seg.active {
  background: var(--studio-accent);
  color: #ffffff;
}

.ftb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.btn-ftb {
  width: 100%;
  background: #1e1b4b;
  border: 1px solid #4338ca;
  color: #a5b4fc;
  font-weight: 800;
  font-size: 11px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-ftb.active {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
  animation: pulse-ftb 1s infinite;
}

@keyframes pulse-ftb {
  0%, 100% { box-shadow: 0 0 4px var(--studio-prg-glow); }
  50% { box-shadow: 0 0 16px var(--studio-prg-glow); }
}

.ftb-hint {
  font-size: 9px;
  color: #64748b;
}

/* 4-CAMERA MULTIVIEW GRID */
.camera-multiview-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sec-title-group h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #f1f5f9;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-desc {
  font-size: 12px;
  color: #94a3b8;
}

.tip-pill {
  font-size: 11px;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.5);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--studio-panel-border);
}

.camera-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cam-card {
  background: var(--studio-panel);
  border: 2px solid var(--studio-panel-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s;
}

.cam-card:hover {
  border-color: #475569;
  transform: translateY(-2px);
}

.cam-card.is-pvw {
  border-color: var(--studio-pvw);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.cam-card.is-prg {
  border-color: var(--studio-prg);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.cam-card-top {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--studio-panel-border);
}

.cam-title-box {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.cam-id-pill {
  font-size: 10px;
  font-weight: 800;
  background: #334155;
  color: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
}

.cam-name {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
}

.btn-icon:hover {
  color: #f8fafc;
}

.cam-tally-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  background: #1e293b;
  color: #64748b;
}

.cam-tally-pill.pvw {
  background: var(--studio-pvw);
  color: #064e3b;
}

.cam-tally-pill.prg {
  background: var(--studio-prg);
  color: #ffffff;
}

.cam-video-box {
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.cam-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cam-standby {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.cam-standby i {
  font-size: 22px;
}

.cam-overlay-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.65);
  color: #94a3b8;
}

.cam-overlay-badge.live {
  background: rgba(16, 185, 129, 0.85);
  color: #ffffff;
}

.cam-metrics-row {
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a3b8;
  font-family: monospace;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid var(--studio-panel-border);
}

.cam-ingest-drawer {
  padding: 6px 10px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.3);
  border-bottom: 1px solid var(--studio-panel-border);
}

.ingest-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.ingest-info-row code {
  color: #38bdf8;
  font-size: 10px;
}

.btn-copy-sm {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
}

.btn-copy-sm:hover {
  color: #38bdf8;
}

.cam-card-actions {
  display: flex;
  padding: 6px;
  gap: 6px;
  background: #0f172a;
}

.cam-card-actions .btn {
  flex: 1;
  font-weight: 700;
  font-size: 11px;
  padding: 4px;
  border-radius: 4px;
}

.btn-pvw {
  background: #064e3b;
  color: #a7f3d0;
  border: 1px solid #059669;
}

.btn-pvw:hover {
  background: #059669;
  color: #ffffff;
}

.btn-prg {
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid #dc2626;
}

.btn-prg:hover {
  background: #dc2626;
  color: #ffffff;
}

/* LOWER CONSOLE */
.lower-production-console {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.console-box-header {
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.console-box-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-with-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.toggle-afv-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

.audio-strips-container {
  display: flex;
  gap: 12px;
  background: var(--studio-panel);
  border: 1px solid var(--studio-panel-border);
  border-radius: 8px;
  padding: 16px;
  justify-content: space-around;
}

.audio-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #0f172a;
  border: 1px solid var(--studio-panel-border);
  border-radius: 6px;
  padding: 12px 10px;
  width: 74px;
}

.audio-strip.master-strip {
  background: #1e1b4b;
  border-color: #4338ca;
  width: 84px;
}

.strip-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.strip-name {
  font-size: 11px;
  font-weight: 800;
  color: #e2e8f0;
}

.master-badge {
  font-size: 9px;
  font-weight: 800;
  background: #4f46e5;
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
}

.vu-meter-bar-vertical {
  width: 14px;
  height: 120px;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 3px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.vu-level-fill {
  width: 100%;
  background: linear-gradient(0deg, #10b981 0%, #10b981 70%, #f59e0b 85%, #ef4444 100%);
  transition: height 0.05s ease-out;
}

.fader-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vertical-fader {
  -webkit-appearance: slider-vertical;
  width: 18px;
  height: 90px;
  cursor: pointer;
}

.fader-db {
  font-size: 9px;
  font-family: monospace;
  color: #94a3b8;
}

.btn-mute {
  background: #334155;
  border: 1px solid #475569;
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
}

.btn-mute.active {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
}

/* DESTINATIONS SECTION */
.destinations-section {
  background: var(--studio-panel);
  border: 1px solid var(--studio-panel-border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.destinations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dest-card {
  background: #0f172a;
  border: 1px solid var(--studio-panel-border);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dest-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.icon-yt { color: #ff0000; font-size: 16px; }
.icon-fb { color: #1877f2; font-size: 16px; }

.dest-status-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.dest-status-pill.offline {
  background: #334155;
  color: #94a3b8;
}

.dest-status-pill.live {
  background: #16a34a;
  color: #ffffff;
}

.dest-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group-sm {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.input-group-sm label {
  font-size: 10px;
  color: #94a3b8;
}

.input-group-sm input {
  background: #020617;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.program-output-summary {
  background: #0f172a;
  border: 1px dashed var(--studio-panel-border);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.output-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.output-item .label {
  color: #94a3b8;
  font-weight: 700;
  font-size: 10px;
  width: 160px;
}

.output-item code {
  color: #38bdf8;
  font-family: monospace;
  font-size: 11px;
  flex: 1;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: var(--studio-panel);
  border: 1px solid var(--studio-panel-border);
  border-radius: 10px;
  width: 440px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--studio-panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 15px;
  margin: 0;
  color: #f8fafc;
}

.btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.form-group input {
  background: #0f172a;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.hint-text {
  font-size: 11px;
  color: #64748b;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--studio-panel-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(15, 23, 42, 0.5);
}
