/* Inbound calls, Calls direction tag and Voice settings (PitchX console). */

/* ── Direction tags ───────────────────────────────────────────────────── */
.px-direction {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; white-space: nowrap;
  border: 1px solid var(--arena-border, #e5e7eb);
  color: var(--arena-text-secondary, #6b7280);
  background: var(--arena-gray, #f3f4f6);
}
.px-direction.is-inbound {
  color: #92400e; border-color: #fcd34d; background: #fef3c7;
}
.px-direction.is-outbound {
  color: #1e3a8a; border-color: #bfdbfe; background: #eff6ff;
}
[data-theme="dark"] .px-direction.is-inbound { color: #fbbf24; border-color: #78350f; background: #3b2308; }
[data-theme="dark"] .px-direction.is-outbound { color: #93c5fd; border-color: #1e3a8a; background: #0f1f3d; }

/* ── Inbound page ─────────────────────────────────────────────────────── */
.inbound-live-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding: 4px 0 8px;
}
.inbound-card {
  border: 1px solid var(--arena-border, #e5e7eb);
  border-left: 4px solid #f59e0b;
  border-radius: 10px; padding: 12px 14px;
  background: var(--arena-bg, #fff);
}
.inbound-card .ic-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inbound-card .ic-number { font-weight: 700; font-size: 14px; letter-spacing: .01em; }
.inbound-card .ic-name { font-size: 12px; color: var(--arena-text-secondary, #6b7280); margin-top: 2px; }
.inbound-card .ic-meta { display: flex; gap: 14px; margin-top: 10px; font-size: 11px; color: var(--arena-text-secondary, #6b7280); }
.inbound-card .ic-meta strong { color: var(--arena-text, #111827); font-size: 12px; }
.inbound-empty { padding: 18px 4px; color: var(--arena-text-secondary, #6b7280); font-size: 13px; }
.inbound-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  display: inline-block; box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: inboundPulse 1.6s infinite;
}
@keyframes inboundPulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.inbound-status { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #047857; }
#inbound-history td { font-size: 12px; }
#inbound-history tr { cursor: pointer; }
.inbound-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inbound-actions .btn { padding: 3px 8px; font-size: 11px; }

/* ── Inbound highlight in Call Outcome ─────────────────────────────────── */
.call-outcome[data-direction="inbound"] {
  border-top: 3px solid #f59e0b;
  border-radius: 14px;
}
.co-direction-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #92400e; background: #fef3c7; border: 1px solid #fcd34d;
  margin-left: 8px; vertical-align: middle;
}
[data-theme="dark"] .co-direction-badge { color: #fbbf24; background: #3b2308; border-color: #78350f; }
.call-outcome[data-direction="inbound"] .co-title::before {
  content: "Inbound"; display: inline-block;
  font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #92400e; background: #fef3c7; border: 1px solid #fcd34d;
  border-radius: 999px; padding: 2px 8px; margin-right: 8px; vertical-align: middle;
}
[data-theme="dark"] .call-outcome[data-direction="inbound"] .co-title::before {
  color: #fbbf24; background: #3b2308; border-color: #78350f;
}

/* ── Voice settings ───────────────────────────────────────────────────── */
.voice-sample-card { padding: 16px; }
.voice-sample-card textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 56px;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--arena-border, #e5e7eb);
  background: var(--arena-bg, #fff); color: var(--arena-text, #111827);
  font: inherit; font-size: 13px; line-height: 1.5;
}
.voice-sample-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.voice-sample-head label { font-size: 12px; font-weight: 700; }
.voice-sample-head .hint { font-size: 11px; color: var(--arena-text-secondary, #6b7280); }
.voice-sample-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.voice-sample-actions .meta { font-size: 11px; color: var(--arena-text-secondary, #6b7280); margin-right: 12px; }
.voice-sample-actions .btn { padding: 6px 12px; font-size: 12px; }

.voice-filters { display: flex; gap: 8px; margin: 14px 0 10px; flex-wrap: wrap; }
.voice-filters button {
  border: 1px solid var(--arena-border, #e5e7eb); background: var(--arena-bg, #fff);
  color: var(--arena-text-secondary, #6b7280); border-radius: 999px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.voice-filters button.active {
  color: #fff; background: var(--arena-blue, #2563eb); border-color: var(--arena-blue, #2563eb);
}
.voice-filters button span { opacity: .75; font-weight: 500; margin-left: 3px; }

.voice-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.voice-card {
  border: 1px solid var(--arena-border, #e5e7eb); border-radius: 12px;
  padding: 14px; background: var(--arena-bg, #fff);
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.voice-card:hover { border-color: var(--arena-blue, #2563eb); }
.voice-card.selected {
  border-color: var(--arena-blue, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.voice-card .vc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.voice-card .vc-name { font-weight: 700; font-size: 14px; }
.voice-card .vc-gender {
  font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--arena-border, #e5e7eb);
}
.voice-card .vc-gender.female { color: #9d174d; background: #fce7f3; border-color: #f9a8d4; }
.voice-card .vc-gender.male { color: #1e40af; background: #dbeafe; border-color: #93c5fd; }
[data-theme="dark"] .voice-card .vc-gender.female { color: #f9a8d4; background: #4a0f2d; border-color: #831843; }
[data-theme="dark"] .voice-card .vc-gender.male { color: #93c5fd; background: #0f1f3d; border-color: #1e3a8a; }
.voice-card .vc-actions { display: flex; gap: 8px; margin-top: 2px; }
.voice-card .vc-actions .btn { flex: 1; justify-content: center; font-size: 12px; padding: 6px 8px; }
.voice-card .vc-actions .btn.play { flex: 0 0 40px; }
.voice-card .vc-state { font-size: 10px; color: var(--arena-text-secondary, #6b7280); }
.voice-card .vc-state.is-selected { color: #047857; font-weight: 700; }
.voice-card .vc-state.is-failed { color: #b91c1c; }
.voice-card .vc-check { color: var(--arena-blue, #2563eb); font-weight: 800; }

@media (max-width: 640px) {
  .voice-grid { grid-template-columns: 1fr 1fr; }
  .voice-card { padding: 10px; }
  .voice-sample-actions .btn { width: 100%; }
  .inbound-live-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .voice-grid { grid-template-columns: 1fr; }
}

/* Display-only voice description. New element; existing card styles untouched. */
.voice-card .vc-desc {
  font-size: 11px;
  line-height: 1.35;
  opacity: .72;
}
