/* VoiceCast — campaign management UI */

.vc-shell {
  width: 100%;
  max-width: none;
}

#tab-voicecast {
  width: 100%;
  max-width: none;
  padding: 12px 16px;
}

#tab-voicecast.active {
  display: block;
}

#tab-voicecast #voicecast-root,
#tab-voicecast .vc-shell,
#tab-voicecast #vc-main-area {
  width: 100%;
  max-width: none;
}

.vc-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.vc-page-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.vc-page-subtitle {
  font-size: 0.78rem;
  color: var(--text2);
  margin: 4px 0 0;
}

.vc-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.vc-subnav {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.vc-subnav-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.vc-subnav-btn:hover {
  color: var(--text);
  background: var(--bg2);
}

.vc-subnav-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

[data-theme="dark"] .vc-subnav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f172a;
}

.vc-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.vc-filter-pill {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  transition: all var(--transition);
}

.vc-filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.vc-filter-pill.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.vc-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: capitalize;
}

.vc-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.vc-status-draft { background: rgba(148, 163, 184, 0.15); color: var(--grey-status); }
.vc-status-active { background: rgba(59, 130, 246, 0.12); color: var(--primary); }
.vc-status-paused { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.vc-status-running { background: rgba(34, 197, 94, 0.12); color: var(--success); }
.vc-status-running::before { animation: pulse 1.5s infinite; }
.vc-status-completed { background: rgba(20, 184, 166, 0.12); color: #0d9488; }
.vc-status-cancelled { background: rgba(148, 163, 184, 0.12); color: var(--grey-status); }
.vc-status-failed { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.vc-rate-good { color: var(--success); font-weight: 700; }
.vc-rate-mid { color: var(--warning); font-weight: 700; }
.vc-rate-bad { color: var(--danger); font-weight: 700; }

.vc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text3);
  margin-bottom: 12px;
}

.vc-breadcrumb a,
.vc-breadcrumb button {
  color: var(--primary);
  font-weight: 600;
}

.vc-breadcrumb-sep { opacity: 0.5; }

.vc-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.vc-detail-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vc-detail-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
}

.vc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text2);
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.vc-meta-item strong {
  color: var(--text);
  font-weight: 600;
}

.vc-progress-wrap {
  margin-bottom: 16px;
}

.vc-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text2);
  margin-bottom: 6px;
}

.vc-progress-bar {
  height: 10px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.vc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 100px;
  transition: width 0.4s ease;
}

.vc-live-feed {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.vc-live-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.vc-live-line:last-child { border-bottom: none; }

.vc-live-ts { color: var(--text3); min-width: 72px; }
.vc-live-phone { flex: 1; font-weight: 600; }
.vc-live-outcome { font-weight: 600; }

.vc-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

/* Wizard modal */
#vc-wizard-modal .modal {
  max-width: min(960px, calc(100vw - 32px));
  width: calc(100% - 32px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

#vc-wizard-modal .modal-title i {
  margin-right: 10px;
  color: var(--primary);
}

[data-theme="dark"] #vc-wizard-modal .modal-title i {
  color: var(--accent);
}

#vc-wizard-modal .modal-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.vc-wizard-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  gap: 4px;
  overflow-x: auto;
}

.vc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 72px;
  text-align: center;
}

.vc-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text3);
  transition: all var(--transition);
}

.vc-step-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text3);
  line-height: 1.2;
}

.vc-step.active .vc-step-num {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.vc-step.active .vc-step-label { color: var(--primary); }

.vc-step.done .vc-step-num {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.vc-step.done .vc-step-label { color: var(--success); }

.vc-wizard-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 280px;
}

.vc-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.vc-wizard-footer-right {
  display: flex;
  gap: 8px;
}

.vc-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.vc-section-hint {
  font-size: 0.72rem;
  color: var(--text3);
  margin: 0 0 14px;
}

.vc-form-section {
  margin-bottom: 20px;
}

.vc-form-section:last-child { margin-bottom: 0; }

.vc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.vc-card-grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.vc-pick-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
  text-align: left;
}

.vc-pick-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.vc-pick-card.selected {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: 0 0 0 1px var(--primary);
}

[data-theme="dark"] .vc-pick-card.selected {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.vc-pick-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
  line-height: 1;
}

.vc-pick-title {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.vc-pick-desc {
  font-size: 0.65rem;
  color: var(--text3);
  line-height: 1.35;
}

.vc-conditional {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.vc-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.vc-review-item {
  padding: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.vc-review-item label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  margin-bottom: 4px;
}

.vc-review-item span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.vc-api-box {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.72rem;
  word-break: break-all;
}

.vc-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text3);
}

.vc-empty i {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.vc-empty p {
  font-size: 0.82rem;
  margin: 0 0 16px;
}

.vc-channel-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  text-transform: capitalize;
}

.vc-days-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vc-day-chip {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
}

.vc-day-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.vc-inline-error {
  font-size: 0.72rem;
  color: var(--danger);
  margin-top: 6px;
}

.vc-hidden-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.vc-audio-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.vc-audio-row .form-control {
  flex: 1;
}

.vc-audio-preview {
  margin-top: 8px;
}

.vc-audio-preview audio {
  width: 100%;
  height: 36px;
}

.vc-dtmf-table {
  width: 100%;
  font-size: 0.78rem;
  margin-top: 12px;
}

.vc-dtmf-table th,
.vc-dtmf-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.vc-api-key-banner {
  margin: 12px 0;
  padding: 14px 16px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.vc-api-key-banner code {
  display: block;
  margin-top: 8px;
  padding: 10px;
  background: var(--bg2);
  border-radius: 6px;
  font-family: var(--mono);
  word-break: break-all;
}

#vc-preview-modal .modal,
#vc-apikey-modal .modal {
  max-width: 640px;
  width: calc(100% - 32px);
}
