/* ================================================================
   FRIDAY AI — Books Studio v2
   books-studio-pipeline.css — Vista Pipeline + Voice FAB
   Uses existing CSS vars: --accent, --text, --border, --bg, --card
   ================================================================ */

/* ── Pipeline conveyor wrapper ── */
#bs-pipeline {
  margin-bottom: 20px;
  background: var(--card, #1a1a2e);
  border: 1px solid var(--border, #2a2a4a);
  border-radius: 10px;
  padding: 16px;
  overflow-x: auto;
}

.bs-pipeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.bs-pipeline-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #e0e0e0);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bs-pipeline-subtitle {
  font-size: 12px;
  color: var(--text-muted, #888);
}

/* ── Stages row ── */
.bs-pipeline-stages {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: max-content;
}

/* ── Arrow connector ── */
.bs-pipeline-arrow {
  color: var(--text-muted, #666);
  font-size: 18px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  flex-shrink: 0;
}

/* ── Individual stage card ── */
.bs-stage {
  background: var(--bg, #12122a);
  border: 1px solid var(--border, #2a2a4a);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.bs-stage:hover {
  border-color: var(--accent, #7c3aed);
}

.bs-stage-active {
  border-color: var(--accent, #7c3aed);
  background: rgba(124, 58, 237, 0.08);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.18);
}

/* Dimmed = all agents are todo */
.bs-stage-dimmed {
  opacity: 0.55;
  border-style: dashed;
}

/* ── Stage header ── */
.bs-stage-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bs-stage-num {
  font-size: 15px;
  line-height: 1;
}

.bs-stage-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text, #e0e0e0);
  white-space: nowrap;
}

.bs-stage-pin {
  font-size: 13px;
  margin-left: auto;
  title: "Voce esta aqui";
}

/* ── Agent chips ── */
.bs-stage-agents {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bs-agent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: default;
  white-space: nowrap;
  user-select: none;
}

.bs-seal-pass {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.bs-seal-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.bs-seal-todo {
  background: rgba(71, 85, 105, 0.15);
  color: #94a3b8;
  border: 1px dashed rgba(71, 85, 105, 0.40);
  cursor: pointer;
}

.bs-seal-todo:hover {
  background: rgba(71, 85, 105, 0.25);
}

.bs-agent-soon {
  font-size: 9px;
  font-weight: 400;
  color: #64748b;
  margin-left: 2px;
}

/* ── Section nav (5 sections) ── */
#bs-sections {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border, #2a2a4a);
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 0;
}

.bs-section-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted, #888);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.bs-section-btn:hover {
  color: var(--text, #e0e0e0);
}

.bs-section-btn.active {
  color: var(--accent, #7c3aed);
  border-bottom-color: var(--accent, #7c3aed);
  font-weight: 700;
}

/* ── Sub-nav ── */
#bs-subnav {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.bs-subnav-btn {
  background: var(--bg, #12122a);
  border: 1px solid var(--border, #2a2a4a);
  border-radius: 6px;
  color: var(--text-muted, #888);
  cursor: pointer;
  font-size: 12px;
  padding: 5px 12px;
  transition: all 0.15s;
}

.bs-subnav-btn:hover {
  color: var(--text, #e0e0e0);
  border-color: var(--accent, #7c3aed);
}

.bs-subnav-btn.active {
  background: rgba(124, 58, 237, 0.12);
  border-color: var(--accent, #7c3aed);
  color: var(--accent, #7c3aed);
  font-weight: 600;
}

/* ── Voice FAB ── */
.bs-voice-fab {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 1000;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent, #7c3aed);
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.bs-voice-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.60);
}

/* ── Voice Drawer ── */
.bs-voice-drawer {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 999;
  width: 360px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--card, #1a1a2e);
  border: 1px solid var(--border, #2a2a4a);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  padding: 16px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.bs-voice-drawer-hidden {
  display: none;
}
