/* ==========================================================================
   AirCreative Interactive Demo Suite — CSS
   Studio-grade styling for the interactive commercial workflow demo.
   ========================================================================== */

.demo-hero {
  padding: 64px 24px 40px;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

.demo-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 16px 0 20px;
  color: var(--text-white);
}

.demo-hero h1 em {
  font-style: normal;
  color: var(--blue-brand-light);
}

.demo-hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Demo Control Bar */
.demo-control-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.demo-mode-switcher {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.demo-mode-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-mode-btn:hover {
  color: var(--text-white);
}

.demo-mode-btn.active {
  background: var(--blue-brand);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

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

.demo-presets label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-presets select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
}

.demo-role-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.demo-role-pill-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 4px;
}

.role-pill {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.role-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-white);
}

.role-pill.active {
  background: var(--blue-brand-subtle);
  border-color: var(--blue-brand);
  color: var(--blue-brand-light);
}

/* Stepper Progress Bar */
.demo-stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .demo-stepper {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .demo-stepper {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stepper-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stepper-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-card);
}

.stepper-btn.active {
  background: var(--bg-card);
  border-color: var(--blue-brand);
  box-shadow: 0 0 0 1px var(--blue-brand), 0 4px 12px rgba(37, 99, 235, 0.25);
}

.stepper-btn.completed {
  border-color: rgba(37, 99, 235, 0.4);
}

.stepper-btn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stepper-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
}

.stepper-btn.active .stepper-num {
  color: var(--blue-brand-light);
}

.stepper-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}

.stepper-btn.completed .stepper-status-dot {
  background: var(--blue-brand);
}

.stepper-btn.active .stepper-status-dot {
  background: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
}

.stepper-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.stepper-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Demo Stage Panel */
.demo-stage-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-box);
  margin-bottom: 40px;
}

.stage-header-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.stage-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage-badge {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.4);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stage-badge.blue {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.4);
}

.stage-badge.amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.stage-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
}

.stage-header-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stage-header-meta span strong {
  color: var(--text-primary);
}

/* Stage Body Layout */
.stage-content {
  padding: 24px;
}

.stage-grid-2col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .stage-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Form inputs & studio cards */
.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.demo-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .demo-field-grid {
    grid-template-columns: 1fr;
  }
}

.demo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-input,
.demo-select,
.demo-textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  width: 100%;
}

.demo-input:focus,
.demo-select:focus,
.demo-textarea:focus {
  outline: none;
  border-color: var(--blue-brand);
}

.demo-textarea {
  resize: vertical;
  min-height: 140px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Station Checklist in Order Intake */
.station-tag-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.station-check-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: all 0.2s;
}

.station-check-chip.checked {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--blue-brand);
  color: #93c5fd;
}

/* Script Studio Live Gauge Bar */
.script-gauge-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.gauge-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gauge-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.gauge-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-white);
  font-variant-numeric: tabular-nums;
}

.gauge-delta-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gauge-delta-pill.on-target {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.4);
}

.gauge-delta-pill.over-time {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.gauge-delta-pill.under-time {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.pace-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pace-slider-wrap input[type="range"] {
  width: 110px;
  accent-color: var(--blue-brand);
}

/* Client Portal Simulation */
.client-portal-frame {
  background: #090e17;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.client-portal-top {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.client-review-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #e2e8f0;
}

.approval-audit-trail {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #bfdbfe;
}

/* Audio Player & Waveform */
.audio-studio-wrap {
  background: #090e17;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.waveform-canvas-container {
  background: #060a10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  position: relative;
  cursor: pointer;
  margin-bottom: 14px;
}

.waveform-canvas-container canvas {
  width: 100%;
  height: 90px;
  display: block;
}

.waveform-timeline-ruler {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 6px;
}

.audio-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.audio-transport-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-btn:hover {
  background: var(--bg-card-subtle);
  color: var(--text-white);
  border-color: var(--border-strong);
}

.audio-btn.primary {
  background: var(--blue-brand);
  color: #ffffff;
  border-color: var(--blue-brand);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.28);
}

.audio-btn.primary:hover {
  background: var(--blue-brand-hover);
  border-color: var(--blue-brand-hover);
}

.timecode-display {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #38bdf8;
  background: #020617;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Production Checklist */
.checklist-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.check-item.done {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.08);
}

.check-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Station Traffic Matrix */
.traffic-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}

.traffic-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.traffic-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
}

.traffic-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.traffic-cart-pill {
  font-family: monospace;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

/* FileCopy Automation Log */
.filecopy-log-box {
  background: #020617;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #94a3b8;
  max-height: 180px;
  overflow-y: auto;
}

.filecopy-log-line {
  display: flex;
  gap: 10px;
}

.filecopy-log-time {
  color: #64748b;
}

.filecopy-log-status.ok {
  color: #93c5fd;
}

.filecopy-log-status.info {
  color: #60a5fa;
}

/* Invoice Summary */
.invoice-summary-card {
  background: #0b111e;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
}

.invoice-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.invoice-table th {
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 8px 10px;
  text-align: left;
}

.invoice-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
}

.invoice-total-row {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
  padding-top: 12px;
}

/* Action Footer */
.stage-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--border-light);
  padding: 18px 24px;
  background: var(--bg-card);
}

.stage-step-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Live App Engine View / Iframe Container */
.live-app-engine-view {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-box);
  margin-bottom: 40px;
}

.app-view-bar {
  background: #020617;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.app-view-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.app-tab-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.app-tab-btn:hover {
  color: var(--text-white);
}

.app-tab-btn.active {
  background: var(--blue-brand);
  color: var(--text-white);
  border-color: var(--blue-brand);
}

.app-iframe-shell {
  width: 100%;
  height: 720px;
  border: none;
  background: #0b111e;
}
