/* Voice Intelligence (C4) — per-tab styles.
   Loaded from customer.html. Uses the same --orange/--m/--s2 CSS
   variables as the rest of the app so theming stays consistent. */

.nbd-voice-root { font-size: 13px; }

.nbd-voice-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--s2, #1a1d29);
  border: 1px solid var(--border, #2a2f3c);
  border-radius: 8px;
  margin-bottom: 14px;
}

.nbd-voice-record {
  background: var(--orange, #BD5728);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .08s ease;
}
.nbd-voice-record:hover { transform: translateY(-1px); }
.nbd-voice-record.is-recording {
  background: #c63030;
  animation: nbd-voice-pulse 1.6s ease-in-out infinite;
}
.nbd-voice-dot {
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
  display: inline-block;
}
.nbd-voice-record.is-recording .nbd-voice-dot {
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.6);
  animation: nbd-voice-dot-pulse 1.2s ease-in-out infinite;
}
@keyframes nbd-voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(198,48,48,.35); }
  50%      { box-shadow: 0 0 0 8px rgba(198,48,48,0); }
}
@keyframes nbd-voice-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: .6; }
}

.nbd-voice-upload {
  background: transparent;
  color: var(--text, #e8eaf0);
  border: 1px dashed var(--border, #3a4155);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s;
}
.nbd-voice-upload:hover { border-color: var(--orange, #BD5728); }

.nbd-voice-calltype-sel {
  background: var(--s2, #1a1d29);
  color: var(--text, #e8eaf0);
  border: 1px solid var(--border, #2a2f3c);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.nbd-voice-timer {
  margin-left: auto;
  font-family: 'Syne Mono', ui-monospace, monospace;
  font-size: 16px;
  color: #c63030;
  min-width: 60px;
  text-align: right;
}

.nbd-voice-progress:not(:empty) {
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--s2, #1a1d29);
  border-left: 3px solid var(--orange, #BD5728);
  border-radius: 4px;
  font-size: 12px;
}

/* Recording list items */
.nbd-voice-list > .nbd-voice-item:not(:last-child) { margin-bottom: 12px; }
.nbd-voice-item {
  background: var(--s2, #1a1d29);
  border: 1px solid var(--border, #2a2f3c);
  border-radius: 8px;
  padding: 14px;
}
.nbd-voice-item-head {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--m, #8892a4);
}
.nbd-voice-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--border, #2a2f3c);
  color: var(--text, #e8eaf0);
}
.nbd-voice-status-transcribing,
.nbd-voice-status-analyzing {
  background: rgba(189, 87, 40, .18);
  color: var(--orange, #BD5728);
}
.nbd-voice-status-complete {
  background: rgba(46, 204, 138, .18);
  color: var(--green, #2ecc8a);
}
.nbd-voice-status-failed,
.nbd-voice-status-quarantined_consent {
  background: rgba(224, 82, 82, .18);
  color: var(--red, #e05252);
}
.nbd-voice-when,
.nbd-voice-duration,
.nbd-voice-cost,
.nbd-voice-calltype { font-family: 'Syne Mono', ui-monospace, monospace; }
.nbd-voice-calltype {
  padding: 2px 8px;
  border: 1px solid var(--border, #2a2f3c);
  border-radius: 3px;
}

.nbd-voice-err {
  background: rgba(224, 82, 82, .10);
  border-left: 3px solid var(--red, #e05252);
  color: var(--red, #e05252);
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 12px;
  border-radius: 3px;
}
.nbd-voice-empty {
  padding: 32px;
  text-align: center;
  color: var(--m, #8892a4);
  font-size: 13px;
}

/* Structured summary */
.nbd-voice-summary { margin-top: 10px; }
.nbd-voice-summary p { line-height: 1.5; margin: 8px 0; }
.nbd-voice-list ul { margin: 4px 0 8px 20px; line-height: 1.5; }
.nbd-voice-list strong { color: var(--text, #e8eaf0); }
.nbd-voice-red strong { color: var(--red, #e05252); }
.nbd-voice-red li { color: var(--red, #e05252); }
.nbd-voice-when-inline { color: var(--m, #4a5568); font-size: 11px; }
.nbd-voice-conf { color: var(--m, #4a5568); font-size: 10px; }

.nbd-voice-transcript { margin-top: 12px; }
.nbd-voice-transcript summary {
  cursor: pointer;
  color: var(--orange, #BD5728);
  font-size: 12px;
  padding: 6px 0;
}
.nbd-voice-segments {
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Syne Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 10px;
  background: var(--surface, #0d1117);
  border-radius: 4px;
  border: 1px solid var(--border, #2a2f3c);
}
.nbd-voice-seg { padding: 3px 0; line-height: 1.45; }
.nbd-voice-seg-t { color: var(--m, #4a5568); }
.nbd-voice-seg-s { color: var(--orange, #BD5728); margin-right: 4px; }

/* Consent modal */
.nbd-voice-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.68);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}
.nbd-voice-modal {
  background: var(--card, #111722);
  border: 1px solid var(--border, #2a2f3c);
  border-radius: 10px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
}
.nbd-voice-modal h2 {
  color: var(--orange, #BD5728);
  font-size: 18px;
  margin: 0 0 10px 0;
}
.nbd-voice-modal p { color: var(--m, #8892a4); line-height: 1.55; margin: 0 0 14px 0; }
.nbd-voice-consent-check {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text, #e8eaf0);
  padding: 10px 0;
  cursor: pointer;
  font-size: 13px;
}
.nbd-voice-consent-check input { width: 18px; height: 18px; cursor: pointer; }
.nbd-voice-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.nbd-voice-modal-actions button {
  padding: 9px 16px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border, #3a4155);
  background: transparent;
  color: var(--text, #e8eaf0);
}
.nbd-voice-modal-actions button[data-act="ok"] {
  background: var(--orange, #BD5728);
  border-color: var(--orange, #BD5728);
  color: #fff;
  font-weight: 600;
}
.nbd-voice-modal-actions button[data-act="ok"]:disabled {
  background: var(--border, #2a2f3c);
  border-color: var(--border, #2a2f3c);
  color: var(--m, #4a5568);
  cursor: not-allowed;
}

/* Toast
   Rides in the page's toast lane (2026-09-25, phone-audit follow-up from
   review:chrome). At a bare bottom:20px / z 10001 it painted over the
   customer page's CALL / TEXT / EMAIL / TASK bar on a phone for its whole
   5s life once that bar moved under the toast layer — the same fix
   #toastContainer got: --nbd-toast-bottom (customer.html's phone lane, which
   clears the bar and the ⋯ launcher), else 20px above any bottom strip, plus
   --nbd-upload-lift so it also stacks above an in-flight upload widget.
   z-index moves onto the token ladder's toast tier (--z-toast).
   right reads the same lane (2026-09-25): customer.html's --nbd-toast-right
   starts it beside the desktop FAB column instead of inside it, where a toast
   lifted above the upload widget sat on the Quick Capture FAB. Unset (the
   dashboard) it stays 20px. */
.nbd-voice-toast {
  position: fixed;
  bottom: calc(var(--nbd-toast-bottom, calc(20px + var(--nbd-bottom-chrome, 0px))) + var(--nbd-upload-lift, 0px));
  right: var(--nbd-toast-right, 20px);
  background: var(--card, #111722);
  border-left: 3px solid var(--orange, #BD5728);
  color: var(--text, #e8eaf0);
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  z-index: var(--z-toast, 10002);
  font-size: 13px;
  max-width: 360px;
  /* ...and never wider than the screen less both 20px gutters: at 360px the
     bare 360px cap ran the toast into the left edge (x 0). */
  max-width: min(360px, calc(100vw - 40px));
}
.nbd-voice-toast-err { border-left-color: var(--red, #e05252); }
