/* Mocap Lab — extends Character Lab lab styles */

.mocap [hidden] {
  display: none !important;
}

.mocap-stage-wrap:has(#mocap-stage canvas) .mocap-stage-empty {
  display: none;
}

#mocap-toolbar[hidden],
#export-downloads[hidden],
#char-history-wrap[hidden] {
  display: none !important;
}

.mocap-export-note {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.08);
  color: rgba(255, 230, 210, 0.92);
  font-size: 0.78rem;
  line-height: 1.4;
}

.mocap-export-note .btn-sm {
  margin-top: 0.35rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
}

.mocap-stage-empty.is-loading {
  color: rgba(125, 211, 199, 0.75);
}

.mocap {
  --mocap-viewer-h: min(72vh, 640px);
}

.mocap-banner {
  margin: 0 auto 1rem;
  max-width: var(--container, 1120px);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.08);
  color: rgba(255, 230, 210, 0.95);
  font-size: 0.88rem;
}

.mocap-hero {
  max-width: var(--container, 1120px);
  margin: 0 auto 1.25rem;
  padding: 0 1rem;
}

.mocap-hero h1 {
  font-family: Oswald, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0.35rem 0 0.5rem;
}

.mocap-hero-lede {
  margin: 0;
  color: rgba(232, 236, 244, 0.78);
  max-width: 42rem;
}

.mocap-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 1rem;
  max-width: var(--container, 1120px);
  margin: 0 auto 2rem;
  padding: 0 1rem;
  align-items: start;
}

@media (max-width: 900px) {
  .mocap-layout {
    grid-template-columns: 1fr;
  }
}

.mocap-controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mocap-panel {
  padding: 0.85rem 1rem;
  border-radius: var(--radius, 14px);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: rgba(12, 14, 20, 0.72);
}

.mocap-panel-title {
  margin: 0 0 0.5rem;
  font: 600 0.72rem/1.2 Sora, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(125, 211, 199, 0.92);
}

.mocap-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
}

.mocap-field select,
.mocap-field input[type="file"],
.mocap-field input[type="text"] {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
}

.mocap-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: rgba(232, 236, 244, 0.62);
}

.mocap-status {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.82rem;
  color: rgba(232, 236, 244, 0.85);
}

.mocap-status.is-error {
  border-color: rgba(255, 100, 100, 0.35);
  color: #ffb4b4;
}

.mocap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mocap-export {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mocap-export[aria-disabled="true"] .btn {
  pointer-events: none;
  opacity: 0.45;
}

.mocap-stage-wrap {
  position: relative;
  min-height: var(--mocap-viewer-h);
  height: var(--mocap-viewer-h);
  border-radius: var(--radius, 14px);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background:
    radial-gradient(ellipse at 50% 20%, rgba(61, 158, 173, 0.18), transparent 55%),
    linear-gradient(180deg, #10131c, #07080c);
  overflow: hidden;
}

#mocap-stage {
  width: 100%;
  height: 100%;
}

.mocap-stage-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: rgba(232, 236, 244, 0.55);
  font-size: 0.9rem;
  pointer-events: none;
}

.mocap-toolbar {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mocap-toolbar .lab-view-mode {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 10, 16, 0.82);
  color: rgba(232, 236, 244, 0.92);
  font: 600 0.68rem/1.1 Sora, system-ui, sans-serif;
  cursor: pointer;
}

.mocap-toolbar .lab-view-mode.is-active {
  color: #041016;
  background: #3d9ead;
}

.mocap-project-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 10rem;
  overflow: auto;
}

.mocap-project-btn {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.mocap-project-btn:hover,
.mocap-project-btn.is-active {
  border-color: rgba(125, 211, 199, 0.45);
  background: rgba(61, 158, 173, 0.12);
}

/* Beat .lab-progress-board.pipe-board { margin: 0 0 … } from lab.css — CL centers via .lab shell */
.mocap .lab-progress-board.pipe-board.mocap-progress {
  max-width: var(--container, 1120px);
  margin: 0 auto 1rem;
  padding: 0 1rem;
}
