/* ==========================================================================
   STREAMPIX CALL AI V2 — FULL-SCREEN AVANÇADO, COMPACTÁVEL/ARRASTÁVEL,
   VISÃO DE TELA EM FRAMES E AURA LUMINOSA DE CONTROLE DE TELA PELA IA
   ========================================================================== */

/* Botão Call AI exclusivo no cabeçalho do chat StreamPix IA (somente ícone) */
.mobile-chat-icon-button.is-call-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(20, 211, 224, 0.16), rgba(99, 102, 241, 0.16));
  border: 1px solid rgba(56, 189, 248, 0.36);
  color: #67e8f9;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 150ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.mobile-chat-icon-button.is-call-btn:hover {
  background: linear-gradient(135deg, rgba(20, 211, 224, 0.28), rgba(99, 102, 241, 0.24));
  border-color: rgba(103, 232, 249, 0.72);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.mobile-chat-icon-button.is-call-btn.is-active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.36), rgba(56, 189, 248, 0.28));
  border-color: rgba(165, 243, 252, 0.88);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.5);
  animation: spCallBtnPulse 2.1s ease-in-out infinite;
}

body[data-theme="light"] .mobile-chat-icon-button.is-call-btn {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.12));
  border-color: rgba(14, 165, 233, 0.34);
  color: #0284c7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .mobile-chat-icon-button.is-call-btn:hover,
body[data-theme="light"] .mobile-chat-icon-button.is-call-btn.is-active {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
}

@keyframes spCallBtnPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(34, 211, 238, 0.35); }
  50% { box-shadow: 0 0 26px rgba(103, 232, 249, 0.65); }
}

/* ==========================================================================
   1. AURA LUMINOSA OSCILANTE EM GRADIENTE DE LUZ (IA CONTROLANDO A TELA)
      — Zero linhas rígidas: luz volumétrica difusa que oscila suavemente nas 4 bordas
   ========================================================================== */
.sp-ai-control-aura {
  position: fixed;
  inset: 0;
  z-index: 9550;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms cubic-bezier(.16, 1, .3, 1);
  overflow: hidden;
}

.sp-ai-control-aura.is-active {
  opacity: 1;
}

/* Halo perimetral volumétrico difuso (sem borda sólida/linha dura) */
.sp-ai-control-aura-frame {
  position: absolute;
  inset: -14px;
  box-shadow:
    inset 0 0 42px 8px rgba(34, 211, 238, 0.34),
    inset 0 0 92px 18px rgba(99, 102, 241, 0.24),
    inset 0 0 150px 26px rgba(16, 185, 129, 0.14);
  filter: blur(8px);
  animation: spAiAuraBreathe 3.2s cubic-bezier(.45, .05, .55, .95) infinite;
}

/* Ondas suaves de gradiente luminoso oscilando pelas 4 bordas */
.sp-ai-control-aura-edge {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity, background-position;
}

.sp-ai-control-aura-edge.is-top {
  top: -28px; left: -6%; right: -6%; height: 96px;
  background: radial-gradient(62% 100% at 50% 0%, rgba(56, 189, 248, 0.62) 0%, rgba(129, 140, 248, 0.34) 44%, rgba(16, 185, 129, 0.14) 70%, transparent 100%);
  filter: blur(22px);
  animation: spAiLightWaveX 4.2s ease-in-out infinite;
}

.sp-ai-control-aura-edge.is-bottom {
  bottom: -28px; left: -6%; right: -6%; height: 96px;
  background: radial-gradient(62% 100% at 50% 100%, rgba(167, 139, 250, 0.56) 0%, rgba(34, 211, 238, 0.34) 46%, rgba(52, 211, 153, 0.14) 72%, transparent 100%);
  filter: blur(24px);
  animation: spAiLightWaveXRev 4.6s ease-in-out infinite;
}

.sp-ai-control-aura-edge.is-left {
  top: -6%; bottom: -6%; left: -28px; width: 92px;
  background: radial-gradient(100% 62% at 0% 50%, rgba(52, 211, 153, 0.52) 0%, rgba(56, 189, 248, 0.32) 48%, rgba(129, 140, 248, 0.14) 74%, transparent 100%);
  filter: blur(22px);
  animation: spAiLightWaveY 4.4s ease-in-out infinite;
}

.sp-ai-control-aura-edge.is-right {
  top: -6%; bottom: -6%; right: -28px; width: 92px;
  background: radial-gradient(100% 62% at 100% 50%, rgba(99, 102, 241, 0.56) 0%, rgba(34, 211, 238, 0.34) 48%, rgba(251, 191, 36, 0.14) 74%, transparent 100%);
  filter: blur(22px);
  animation: spAiLightWaveYRev 4.8s ease-in-out infinite;
}

.sp-ai-control-pill {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-10px) scale(0.96);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(8, 11, 20, 0.84);
  border: 1px solid rgba(103, 232, 249, 0.38);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(34, 211, 238, 0.24);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #f8fafc;
  font: 600 12.5px/1.2 var(--sp-font, "Inter", system-ui, sans-serif);
  letter-spacing: -0.01em;
  white-space: nowrap;
  max-width: min(92vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 340ms cubic-bezier(.16, 1, .3, 1), top 240ms ease;
}

.sp-ai-control-aura.is-active .sp-ai-control-pill {
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Se o banner de tela compartilhada também estiver visível, desloca o badge para não sobrepor */
body.sp-call-screen-sharing .sp-ai-control-pill {
  top: 66px;
}

.sp-ai-control-pill-spark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #38bdf8 55%, #818cf8);
  box-shadow: 0 0 12px #22d3ee, 0 0 22px #a78bfa;
  flex: 0 0 auto;
  animation: spCallDotPulse 1.2s ease-in-out infinite;
}

.sp-ai-control-pill-action {
  color: rgba(186, 230, 253, 0.92);
  font-weight: 500;
}

@keyframes spAiAuraBreathe {
  0%, 100% {
    opacity: 0.72;
    transform: scale(1);
    box-shadow:
      inset 0 0 38px 6px rgba(34, 211, 238, 0.32),
      inset 0 0 86px 14px rgba(99, 102, 241, 0.22),
      inset 0 0 140px 22px rgba(16, 185, 129, 0.12);
  }
  50% {
    opacity: 1;
    transform: scale(0.996);
    box-shadow:
      inset 0 0 58px 14px rgba(56, 189, 248, 0.46),
      inset 0 0 118px 24px rgba(167, 139, 250, 0.32),
      inset 0 0 170px 30px rgba(52, 211, 153, 0.18);
  }
}

@keyframes spAiLightWaveX {
  0%, 100% { transform: translateX(-8%) scaleY(0.85); opacity: 0.68; }
  50% { transform: translateX(8%) scaleY(1.22); opacity: 1; }
}
@keyframes spAiLightWaveXRev {
  0%, 100% { transform: translateX(8%) scaleY(0.88); opacity: 0.7; }
  50% { transform: translateX(-8%) scaleY(1.24); opacity: 1; }
}
@keyframes spAiLightWaveY {
  0%, 100% { transform: translateY(-7%) scaleX(0.84); opacity: 0.65; }
  50% { transform: translateY(7%) scaleX(1.22); opacity: 0.98; }
}
@keyframes spAiLightWaveYRev {
  0%, 100% { transform: translateY(7%) scaleX(0.86); opacity: 0.68; }
  50% { transform: translateY(-7%) scaleX(1.22); opacity: 1; }
}

@media (max-width: 760px) {
  .sp-ai-control-aura-edge { display: none; }
  .sp-ai-control-aura-frame { filter: blur(4px); }
}

/* ==========================================================================
   2. BANNER PERSISTENTE DE TELA COMPARTILHADA (CLICÁVEL PARA ENCERRAR)
   ========================================================================== */
.sp-call-screen-banner {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: rgba(6, 10, 18, 0.9);
  color: #f8fafc;
  font: 600 12.5px/1.2 var(--sp-font, "Inter", system-ui, sans-serif);
  letter-spacing: -0.01em;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.58),
    0 0 24px rgba(56, 189, 248, 0.3);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  max-width: min(94vw, 540px);
  text-align: left;
}

.sp-call-screen-banner[hidden] {
  display: none !important;
}

.sp-call-screen-banner:hover {
  transform: translateX(-50%) translateY(-1px);
  background: rgba(127, 29, 29, 0.92);
  border-color: rgba(248, 113, 113, 0.78);
  box-shadow: 0 14px 36px rgba(239, 68, 68, 0.36);
}

.sp-call-screen-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.95);
  flex: 0 0 auto;
  animation: spCallDotPulse 1.35s ease-in-out infinite;
}

.sp-call-screen-banner:hover .sp-call-screen-dot {
  background: #fca5a5;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.95);
}

.sp-call-screen-banner-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-call-screen-banner-end {
  font-size: 11px;
  opacity: 0.72;
  margin-left: 2px;
}

/* ==========================================================================
   3. CALL AI FULL-SCREEN OLED AVANÇADO (#000000)
   ========================================================================== */
.sp-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  background: #000000;
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: max(18px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  font-family: var(--sp-font, "Inter", system-ui, -apple-system, sans-serif);
  overflow: hidden;
  user-select: none;
  animation: spCallOverlayFadeIn 260ms cubic-bezier(.16, 1, .3, 1);
}

.sp-call-overlay *,
.sp-call-overlay *::before,
.sp-call-overlay *::after {
  box-sizing: border-box;
}

.sp-call-overlay[hidden] {
  display: none !important;
}

@keyframes spCallOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fundo ambiental reativo mantendo preto puro OLED nas bordas */
.sp-call-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle 360px at 50% 52%,
      rgba(255, 255, 255, var(--call-glow-alpha, 0.055)) 0%,
      rgba(125, 211, 252, calc(var(--call-glow-alpha, 0.055) * 0.62)) 34%,
      rgba(167, 139, 250, calc(var(--call-glow-alpha, 0.055) * 0.25)) 56%,
      rgba(0, 0, 0, 0) 76%
    );
  transition: opacity 280ms ease;
}

/* Barra superior Studio HUD */
.sp-call-topbar {
  position: relative;
  z-index: 3;
  width: min(980px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sp-call-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.sp-call-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.72);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.sp-call-overlay[data-call-state="listening"] .sp-call-live-dot {
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.9);
}

.sp-call-overlay[data-call-state="thinking"] .sp-call-live-dot {
  background: #c4b5fd;
  box-shadow: 0 0 12px rgba(196, 181, 253, 0.9);
  animation: spCallDotPulse 900ms ease-in-out infinite;
}

.sp-call-overlay[data-call-state="speaking"] .sp-call-live-dot {
  background: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.95);
}

.sp-call-overlay[data-call-state="muted"] .sp-call-live-dot {
  background: #71717a;
  box-shadow: none;
}

@keyframes spCallDotPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.84); }
  50% { opacity: 1; transform: scale(1.18); }
}

.sp-call-brand-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.95);
}

.sp-call-timer {
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.54);
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.sp-call-vision-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid rgba(103, 232, 249, 0.42);
  color: #67e8f9;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sp-call-vision-chip[hidden] {
  display: none !important;
}

.sp-call-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sp-call-voice-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.sp-call-voice-select-wrap i {
  font-size: 11.5px;
  color: rgba(186, 230, 253, 0.92);
}

.sp-call-voice-select {
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font: 600 12px/1 var(--sp-font, Inter, sans-serif);
  cursor: pointer;
  padding-right: 4px;
}

.sp-call-voice-select option {
  background: #0b0b0f;
  color: #ffffff;
}

.sp-call-top-btn,
.sp-call-close-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: 600 12px/1 var(--sp-font, Inter, sans-serif);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 140ms ease;
}

.sp-call-close-btn {
  width: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
}

.sp-call-top-btn:hover,
.sp-call-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

/* Palco Central */
.sp-call-stage {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 8px 0;
}

/* Legenda de EXATAMENTE 2 linhas acima do círculo */
.sp-call-caption-stage {
  width: min(620px, 92vw);
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-align: center;
}

.sp-call-mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(186, 230, 253, 0.94);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.sp-call-mood-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sp-call-caption-window {
  width: 100%;
  --sp-cap-lh: 1.44em;
  height: calc(2 * var(--sp-cap-lh));
  max-height: calc(2 * var(--sp-cap-lh));
  overflow: hidden;
  position: relative;
  font-size: clamp(18px, 2.5vw, 22px);
  line-height: 1.44;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 2px 24px rgba(255, 255, 255, 0.16);
}

.sp-call-caption-track {
  display: block;
  width: 100%;
  transform: translateY(0);
  transition: transform 240ms cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
  word-break: break-word;
}

.sp-call-caption-word {
  display: inline;
  animation: spCallWordIn 220ms ease forwards;
}

@keyframes spCallWordIn {
  from { opacity: 0.25; }
  to { opacity: 1; }
}

.sp-call-caption-window.is-placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 400;
  text-shadow: none;
}

/* Orbe Branco com Gradiente Abstrato Suave + Anéis Sussurro */
.sp-call-orb-shell {
  position: relative;
  width: 260px;
  height: 260px;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sp-call-orb-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  opacity: 0.45;
  transform: scale(1);
  transition: border-color 260ms ease, opacity 260ms ease;
}

.sp-call-orb-ring.is-outer {
  inset: -26px;
  border-color: rgba(186, 230, 253, 0.06);
}

.sp-call-overlay[data-call-state="speaking"] .sp-call-orb-ring {
  border-color: rgba(186, 230, 253, 0.22);
  animation: spCallRingPulse 2.4s ease-out infinite;
}

.sp-call-overlay[data-call-state="speaking"] .sp-call-orb-ring.is-outer {
  animation-delay: 0.8s;
}

@keyframes spCallRingPulse {
  0% { transform: scale(0.96); opacity: 0.55; }
  100% { transform: scale(1.24); opacity: 0; }
}

.sp-call-orb-halo {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.36) 0%,
    rgba(186, 230, 253, 0.24) 38%,
    rgba(167, 139, 250, 0.1) 60%,
    rgba(0, 0, 0, 0) 76%
  );
  opacity: 0.44;
  transform: scale(0.96);
  filter: blur(20px);
  will-change: transform, opacity;
}

.sp-call-orb-canvas {
  position: relative;
  z-index: 2;
  width: 228px;
  height: 228px;
  border-radius: 50%;
  display: block;
  box-shadow:
    0 0 42px rgba(255, 255, 255, 0.26),
    0 0 88px rgba(186, 230, 253, 0.18);
  will-change: transform, box-shadow;
}

/* Status + transcrição leve abaixo do orbe */
.sp-call-status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  text-align: center;
}

.sp-call-state-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.78);
}

.sp-call-user-transcript {
  max-width: min(540px, 88vw);
  font-size: 13px;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 19px;
  user-select: text;
}

/* Mini-prévia da tela compartilhada no canto inferior esquerdo da chamada cheia */
.sp-call-screen-preview {
  position: fixed;
  left: 22px;
  bottom: 24px;
  z-index: 4;
  width: 210px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(12, 16, 26, 0.88);
  border: 1px solid rgba(103, 232, 249, 0.34);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.65), 0 0 20px rgba(34, 211, 238, 0.16);
  backdrop-filter: blur(14px);
}

.sp-call-screen-preview[hidden] {
  display: none !important;
}

.sp-call-screen-preview-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #05070c;
}

.sp-call-screen-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(224, 242, 254, 0.9);
}

.sp-call-screen-preview-meta span:last-child {
  color: rgba(148, 163, 184, 0.9);
  font-variant-numeric: tabular-nums;
}

/* Barra inferior de controles avançada */
.sp-call-controls-wrap {
  position: relative;
  z-index: 3;
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sp-call-text-fallback {
  width: min(520px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.sp-call-text-fallback[hidden] {
  display: none !important;
}

.sp-call-text-fallback input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font: 500 13.5px/1.3 var(--sp-font, Inter, sans-serif);
}

.sp-call-text-fallback input::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.sp-call-text-fallback button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #ffffff;
  color: #000000;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 140ms ease, opacity 140ms ease;
}

.sp-call-text-fallback button:hover {
  transform: scale(1.06);
}

.sp-call-dock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.56);
}

.sp-call-ctrl-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.sp-call-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.sp-call-ctrl-btn.is-active {
  background: rgba(255, 255, 255, 0.94);
  color: #050507;
  border-color: #ffffff;
}

.sp-call-ctrl-btn.is-sharing {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(99, 102, 241, 0.28));
  border-color: rgba(103, 232, 249, 0.85);
  color: #e0f2fe;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.42);
}

.sp-call-ctrl-btn.is-muted {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

.sp-call-action-pill {
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font: 600 12.5px/1 var(--sp-font, Inter, sans-serif);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 140ms ease;
}

.sp-call-action-pill[hidden] {
  display: none !important;
}

.sp-call-action-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.sp-call-end-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.44);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.sp-call-end-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 34px rgba(239, 68, 68, 0.62);
}

/* ==========================================================================
   4. MODO COMPACTO FLUTUANTE & ARRASTÁVEL (NO CANTO DA TELA USANDO O APP)
   ========================================================================== */
.sp-call-mini-dock {
  position: fixed;
  z-index: 9620;
  left: calc(100vw - 104px);
  top: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  user-select: none;
  touch-action: none;
  animation: spCallMiniIn 260ms cubic-bezier(.16, 1, .3, 1);
}

.sp-call-mini-dock[hidden] {
  display: none !important;
}

@keyframes spCallMiniIn {
  from { opacity: 0; transform: scale(0.76); }
  to { opacity: 1; transform: scale(1); }
}

.sp-call-mini-dock.is-dragging {
  cursor: grabbing;
}

/* Balão compacto de legenda (2 linhas) acima do orbe flutuante quando a IA fala */
.sp-call-mini-caption {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: min(290px, 76vw);
  padding: 9px 13px;
  border-radius: 16px;
  background: rgba(7, 9, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.96);
  font: 500 12.5px/1.38 var(--sp-font, "Inter", system-ui, sans-serif);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.sp-call-mini-caption.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sp-call-mini-dock.is-left .sp-call-mini-caption {
  right: auto;
  left: 0;
}

.sp-call-mini-dock.is-top .sp-call-mini-caption {
  bottom: auto;
  top: calc(100% + 12px);
}

.sp-call-mini-core {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(7, 9, 14, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.56),
    0 0 28px rgba(186, 230, 253, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.sp-call-mini-dock.is-left .sp-call-mini-core {
  flex-direction: row-reverse;
}

.sp-call-mini-dock:hover .sp-call-mini-core {
  border-color: rgba(186, 230, 253, 0.36);
}

.sp-call-mini-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-left: 4px;
}

.sp-call-mini-dock.is-left .sp-call-mini-controls {
  padding-left: 0;
  padding-right: 4px;
}

.sp-call-mini-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, color 140ms ease, border-color 140ms ease;
}

.sp-call-mini-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: scale(1.06);
}

.sp-call-mini-btn.is-sharing {
  background: rgba(34, 211, 238, 0.25);
  border-color: rgba(103, 232, 249, 0.78);
  color: #67e8f9;
}

.sp-call-mini-btn.is-muted {
  background: rgba(239, 68, 68, 0.24);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fca5a5;
}

.sp-call-mini-btn.is-end {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: transparent;
  color: #ffffff;
}

.sp-call-mini-orb-btn {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: grab;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  touch-action: none;
}

.sp-call-mini-dock.is-dragging .sp-call-mini-orb-btn {
  cursor: grabbing;
}

.sp-call-mini-orb-canvas {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.34),
    0 0 46px rgba(186, 230, 253, 0.22);
  will-change: transform, box-shadow;
}

.sp-call-mini-chat-hint {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #090d16;
  border: 1px solid rgba(103, 232, 249, 0.65);
  color: #67e8f9;
  display: grid;
  place-items: center;
  font-size: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

/* Oculta a barra flutuante de busca enquanto o orbe compacto ocupa o canto (evita sobreposição) */
body.sp-call-ai-compact .search-assistant {
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 720px) {
  .sp-call-screen-preview {
    display: none !important;
  }
  .sp-call-top-btn span {
    display: none;
  }
}

/* ==========================================================================
   MOTION GRAPHICS CALL AI V4: ORBE 2D PREMIUM ESTILO CHATGPT (1:1 PERFEITO),
   SEM EMOÇÃO ACIMA DA FALA, MORPH SUAVE ORBE -> PREVIEW DE CARD & INTERRUPÇÃO
   ========================================================================== */
.sp-call-mood-pill,
.sp-call-orb-ring,
.sp-call-orb-halo {
  display: none !important;
}

.sp-call-orb-shell {
  width: 248px;
  height: 248px;
  aspect-ratio: 1 / 1;
  border-radius: 124px;
  transition:
    width 560ms cubic-bezier(0.22, 1, 0.36, 1),
    height 560ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 560ms cubic-bezier(0.22, 1, 0.36, 1),
    background 420ms ease,
    border-color 420ms ease,
    box-shadow 480ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: visible;
}

.sp-call-orb-canvas {
  width: 248px;
  height: 248px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: none !important;
  transition: opacity 280ms ease, transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-call-orb-shell.is-morphed-card {
  width: min(560px, 92vw) !important;
  height: min(350px, 50vh) !important;
  aspect-ratio: auto !important;
  border-radius: 24px !important;
  background: rgba(10, 14, 24, 0.96);
  border: 1px solid rgba(125, 211, 252, 0.34);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.78),
    0 0 42px rgba(56, 189, 248, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
  cursor: default;
}

.sp-call-orb-shell.is-morphed-card .sp-call-orb-canvas,
.sp-call-orb-shell.is-morphed-card .sp-call-orb-halo {
  opacity: 0 !important;
  visibility: hidden;
  transform: scale(0.72);
  pointer-events: none;
}

/* Responsividade Mobile (DEPOIS das regras base — círculo 1:1 perfeito, zero distorção e zero corte!) */
@media (max-width: 760px) {
  .sp-call-overlay {
    padding: max(12px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
  }
  .sp-call-topbar {
    width: 100%;
    max-width: 100%;
    gap: 6px;
  }
  .sp-call-brand {
    padding: 6px 10px;
    gap: 6px;
    min-width: 0;
  }
  .sp-call-brand-title {
    font-size: 11px;
    white-space: nowrap;
  }
  .sp-call-timer {
    font-size: 10.5px;
    padding-left: 6px;
  }
  .sp-call-top-actions {
    gap: 5px;
    flex: 0 0 auto;
  }
  .sp-call-voice-select-wrap {
    height: 32px;
    padding: 0 8px;
    gap: 5px;
    max-width: 104px;
  }
  .sp-call-voice-select {
    max-width: 74px;
    font-size: 11px;
    text-overflow: ellipsis;
  }
  .sp-call-top-btn,
  .sp-call-close-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    font-size: 12.5px;
  }
  .sp-call-stage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 18px;
  }
  .sp-call-caption-stage {
    width: 100%;
    max-width: 100%;
    min-height: 60px;
    padding: 0 6px;
  }
  .sp-call-ambient {
    display: none !important;
    animation: none !important;
  }
  .sp-call-orb-shell:not(.is-morphed-card) {
    width: min(56vw, 212px);
    height: min(56vw, 212px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
  }
  .sp-call-orb-shell:not(.is-morphed-card) .sp-call-orb-canvas {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    box-shadow: none !important;
  }
  .sp-call-orb-shell.is-morphed-card {
    width: min(100%, calc(100vw - 24px)) !important;
    height: min(46vh, 330px) !important;
    border-radius: 22px !important;
  }
  .sp-call-caption-window {
    font-size: 16px;
  }
  .sp-call-controls-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .sp-call-dock {
    max-width: 100%;
    gap: 7px;
    padding: 7px 10px;
  }
  .sp-call-ctrl-btn {
    width: 42px;
    height: 42px;
    font-size: 15px;
    flex: 0 0 auto;
  }
  .sp-call-action-pill {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    flex: 0 0 auto;
  }
  .sp-call-action-pill span {
    display: none;
  }
  .sp-call-end-btn {
    width: 46px;
    height: 46px;
    font-size: 16px;
    flex: 0 0 auto;
  }
  .sp-call-mini-orb-btn,
  .sp-call-mini-orb-canvas {
    width: 62px;
    height: 62px;
    aspect-ratio: 1 / 1;
  }
}

.sp-call-card-morph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1) 140ms, transform 520ms cubic-bezier(0.22, 1, 0.36, 1) 120ms;
  z-index: 6;
}

.sp-call-orb-shell.is-morphed-card .sp-call-card-morph {
  opacity: 1;
  transform: scale(1);
}

.sp-call-card-morph-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.sp-call-card-morph-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #e0f2fe;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-call-card-morph-actions {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.sp-call-card-morph-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 150ms ease, transform 150ms ease;
}

.sp-call-card-morph-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.sp-call-card-morph-btn.is-primary {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(103, 232, 249, 0.45);
  color: #7dd3fc;
}

.sp-call-card-morph-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.sp-call-card-morph-body {
  color: #f1f5f9;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

/* Traço verde + ícone de interrupção + restante da mensagem interrompida no chat */
.sp-chat-interrupted-wrap {
  display: grid;
  gap: 8px;
}

.sp-chat-spoken-part {
  padding: 4px 0 4px 12px;
  border-left: 3px solid #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.09), transparent 70%);
  border-radius: 0 8px 8px 0;
  color: inherit;
}

.sp-chat-interrupt-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.36);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sp-chat-unspoken-part {
  padding-left: 12px;
  border-left: 2px dashed rgba(148, 163, 184, 0.34);
  opacity: 0.62;
  font-size: 0.96em;
}

/* ==========================================================================
   AI ACTION AGENT NO CALL AI: ONDA EMOCIONAL BORRADA, PAINEL DIREITO DE PERSONAGEM
   & MENU ESQUERDO DE PERSONAGENS DA COMUNIDADE
   ========================================================================== */
.sp-call-emotion-wave {
  position: absolute;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
  filter: blur(88px);
  --wave-c1: rgba(37, 99, 235, 0.32);
  --wave-c2: rgba(56, 189, 248, 0.22);
  --wave-c3: rgba(96, 165, 250, 0.14);
  background:
    radial-gradient(ellipse 62% 46% at 28% 35%, var(--wave-c1) 0%, transparent 70%),
    radial-gradient(ellipse 58% 52% at 72% 65%, var(--wave-c2) 0%, transparent 72%),
    radial-gradient(ellipse 50% 42% at 50% 85%, var(--wave-c3) 0%, transparent 75%);
  animation: spCallEmotionWaveMove 11s ease-in-out infinite alternate;
  transition: --wave-c1 900ms ease, --wave-c2 900ms ease, --wave-c3 900ms ease, opacity 600ms ease;
}

@keyframes spCallEmotionWaveMove {
  0% { transform: translate3d(-3%, -2%, 0) scale(1) rotate(0deg); }
  50% { transform: translate3d(3%, 2.5%, 0) scale(1.06) rotate(3deg); }
  100% { transform: translate3d(-2%, 3%, 0) scale(1.02) rotate(-3deg); }
}

.sp-call-emotion-wave[data-emotion="raiva"]       { --wave-c1: rgba(239, 68, 68, 0.42);  --wave-c2: rgba(185, 28, 28, 0.32);  --wave-c3: rgba(248, 113, 113, 0.20); }
.sp-call-emotion-wave[data-emotion="amor"]        { --wave-c1: rgba(236, 72, 153, 0.40); --wave-c2: rgba(244, 114, 182, 0.30); --wave-c3: rgba(251, 113, 133, 0.20); }
.sp-call-emotion-wave[data-emotion="neutro"]      { --wave-c1: rgba(37, 99, 235, 0.34);  --wave-c2: rgba(56, 189, 248, 0.24);  --wave-c3: rgba(96, 165, 250, 0.16); }
.sp-call-emotion-wave[data-emotion="alegre"]      { --wave-c1: rgba(16, 185, 129, 0.40); --wave-c2: rgba(52, 211, 153, 0.28);  --wave-c3: rgba(34, 197, 94, 0.18); }
.sp-call-emotion-wave[data-emotion="melancolico"] { --wave-c1: rgba(100, 116, 139, 0.38); --wave-c2: rgba(148, 163, 184, 0.24); --wave-c3: rgba(71, 85, 105, 0.20); }
.sp-call-emotion-wave[data-emotion="vibe"]        { --wave-c1: rgba(139, 92, 246, 0.42); --wave-c2: rgba(168, 85, 247, 0.30);  --wave-c3: rgba(192, 132, 252, 0.20); }
.sp-call-emotion-wave[data-emotion="vergonha"]    { --wave-c1: rgba(234, 179, 8, 0.38);  --wave-c2: rgba(250, 204, 21, 0.26);  --wave-c3: rgba(253, 224, 71, 0.16); }
.sp-call-emotion-wave[data-emotion="entediado"]   { --wave-c1: rgba(249, 115, 22, 0.38); --wave-c2: rgba(251, 146, 60, 0.28);  --wave-c3: rgba(234, 88, 12, 0.18); }

.sp-call-chars-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #e0f2fe;
  font: 600 11px/1 var(--sp-font, Inter, sans-serif);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.sp-call-chars-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(103, 232, 249, 0.5);
}

.sp-call-main-grid {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 24px;
}

.sp-call-main-grid.has-builder {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
}

.sp-call-action-builder {
  width: 100%;
  max-height: min(74vh, 560px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 20px;
  background: rgba(10, 15, 28, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.28);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  display: grid;
  gap: 12px;
  text-align: left;
}

.sp-call-action-builder[hidden] {
  display: none !important;
}

.sp-call-ab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sp-call-ab-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #22d3ee;
}

.sp-call-ab-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.sp-call-ab-toggle,
.sp-call-chars-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sp-call-ab-body {
  display: grid;
  gap: 10px;
}

.sp-call-ab-field {
  display: grid;
  gap: 4px;
}

.sp-call-ab-field span {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.sp-call-ab-field input,
.sp-call-ab-field select,
.sp-call-ab-field textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(2, 6, 17, 0.72);
  color: #f8fafc;
  font: inherit;
  font-size: 12.5px;
  outline: none;
  resize: vertical;
}

.sp-call-ab-field input:focus,
.sp-call-ab-field select:focus,
.sp-call-ab-field textarea:focus {
  border-color: #22d3ee;
}

.sp-call-ab-row2 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sp-call-ab-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  padding-bottom: 8px;
  cursor: pointer;
}

.sp-call-ab-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.sp-call-ab-btn {
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: 700 12px/1 var(--sp-font, Inter, sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.sp-call-ab-btn.is-save {
  border: 0;
  background: linear-gradient(135deg, #14d3e0, #10b981);
  color: #031518;
}

.sp-call-ab-msg {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: #6ee7b7;
}

/* Menu lateral esquerdo de personagens */
.sp-call-chars-drawer {
  position: fixed;
  top: max(64px, calc(env(safe-area-inset-top) + 56px));
  left: 16px;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 84px));
  width: min(340px, calc(100vw - 32px));
  z-index: 9630;
  border-radius: 20px;
  background: rgba(9, 13, 24, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sp-call-chars-drawer[hidden] {
  display: none !important;
}

.sp-call-chars-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sp-call-chars-head strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: #ffffff;
}

.sp-call-chars-head strong i {
  color: #22d3ee;
}

.sp-call-chars-head small {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.sp-call-chars-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.sp-call-char-card {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  gap: 6px;
  text-align: left;
}

.sp-call-char-card.is-active {
  border-color: #22d3ee;
  background: rgba(20, 211, 224, 0.1);
}

.sp-call-char-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sp-call-char-head strong {
  font-size: 13px;
  color: #ffffff;
}

.sp-call-char-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.sp-call-char-badge.is-pub {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

.sp-call-char-badge.is-priv {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.sp-call-char-author {
  font-size: 11px;
  color: #7dd3fc;
}

.sp-call-char-desc {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.42;
  color: #cbd5e1;
}

.sp-call-char-actions {
  display: flex;
  gap: 7px;
  margin-top: 4px;
}

.sp-call-char-btn {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font: 600 11.5px/1 var(--sp-font, Inter, sans-serif);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.sp-call-char-btn.is-use {
  border: 0;
  background: linear-gradient(135deg, #14d3e0, #10b981);
  color: #031518;
  font-weight: 800;
}

@media (max-width: 860px) {
  .sp-call-main-grid.has-builder {
    grid-template-columns: minmax(0, 1fr);
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
    padding-bottom: 12px;
  }
  .sp-call-chars-btn span {
    display: none;
  }
}
