/* ============================================================
   vp-copiloto.css — Bolinha global (Copiloto VP)
   Bolinha + painel de chat. Tema VP (amarelo/preto).
   z-index acima do painel de Tweaks (2147483646).
   ============================================================ */

/* ---------- Bolinha minimizada ---------- */
.vpc-bubble {
  position: fixed;
  right: 20px;
  bottom: 84px;            /* acima do painel de Tweaks (bottom:16) */
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 2147483646;
  background: var(--vp-yellow, #f5c400);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22), 0 0 0 4px rgba(245, 196, 0, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.vpc-bubble:hover { transform: translateY(-2px) scale(1.04); }
.vpc-bubble-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #111;
  position: relative;
}
.vpc-bubble-dot::after {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50%; background: var(--vp-yellow, #f5c400);
}
.vpc-bubble::before {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid var(--vp-yellow, #f5c400);
  opacity: .5; animation: vpc-pulse 2s ease-out infinite;
}
@keyframes vpc-pulse {
  0% { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- Painel ---------- */
.vpc-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 372px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 40px);
  z-index: 2147483646;
  background: #fff;
  border: 1px solid var(--vp-gray-200, #e6e6e6);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
  animation: vpc-up .18s ease;
}
@keyframes vpc-up { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.vpc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: #111; color: #fff;
  flex: 0 0 auto;
}
.vpc-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.vpc-title-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--vp-yellow, #f5c400); box-shadow: 0 0 0 3px rgba(245, 196, 0, .25); }
.vpc-x { background: transparent; border: none; color: #bbb; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.vpc-x:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* ---------- Corpo / mensagens ---------- */
.vpc-body { flex: 1 1 auto; overflow-y: auto; padding: 14px; background: var(--vp-gray-50, #f9f9f9); display: flex; flex-direction: column; gap: 10px; }
.vpc-msg { display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.vpc-msg--user { align-self: flex-end; align-items: flex-end; }
.vpc-msg--assistant { align-self: flex-start; align-items: flex-start; }
.vpc-bubble-text {
  padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
}
.vpc-msg--user .vpc-bubble-text { background: #111; color: #fff; border-bottom-right-radius: 4px; }
.vpc-msg--assistant .vpc-bubble-text { background: #fff; color: #1a1a1a; border: 1px solid var(--vp-gray-200, #e6e6e6); border-bottom-left-radius: 4px; }

.vpc-note { font-size: 12px; padding: 6px 10px; border-radius: 8px; font-weight: 600; }
.vpc-note--ok { background: #e7f6ec; color: #15803d; border: 1px solid #bbe6c9; }

.vpc-questions { margin: 2px 0 0; padding: 8px 10px 8px 26px; background: #fff7e0; border: 1px solid #f3dd9a; border-radius: 8px; font-size: 12.5px; line-height: 1.5; color: #5b4b16; }
.vpc-questions li { margin: 2px 0; }

/* ---------- Issues (revisão) ---------- */
.vpc-issues { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.vpc-issue { border: 1px solid var(--vp-gray-200, #e6e6e6); border-left-width: 4px; border-radius: 8px; background: #fff; padding: 8px 10px; }
.vpc-issue--alta { border-left-color: #dc2626; }
.vpc-issue--media { border-left-color: #f59e0b; }
.vpc-issue--baixa { border-left-color: #2563eb; }
.vpc-issue-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.vpc-sev { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 999px; color: #fff; }
.vpc-issue--alta .vpc-sev { background: #dc2626; }
.vpc-issue--media .vpc-sev { background: #f59e0b; }
.vpc-issue--baixa .vpc-sev { background: #2563eb; }
.vpc-where { font-size: 12px; font-weight: 700; color: #333; }
.vpc-issue-prob { font-size: 12.5px; color: #1a1a1a; line-height: 1.4; }
.vpc-issue-sug { font-size: 12.5px; color: #15662f; line-height: 1.4; margin-top: 4px; }

/* ---------- Typing ---------- */
.vpc-typing { display: flex; gap: 4px; padding: 10px 12px; background: #fff; border: 1px solid var(--vp-gray-200, #e6e6e6); border-radius: 12px; border-bottom-left-radius: 4px; }
.vpc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #bbb; animation: vpc-blink 1.2s infinite ease-in-out; }
.vpc-typing i:nth-child(2) { animation-delay: .2s; }
.vpc-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes vpc-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* ---------- Ações rápidas ---------- */
.vpc-actions { display: flex; gap: 8px; padding: 10px 12px 0; flex: 0 0 auto; background: #fff; }
.vpc-act {
  flex: 1; padding: 8px 6px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--vp-gray-200, #e6e6e6); border-radius: 8px; background: var(--vp-gray-50, #f9f9f9); color: #1a1a1a;
}
.vpc-act:hover:not(:disabled) { background: var(--vp-yellow, #f5c400); border-color: var(--vp-yellow, #f5c400); }
.vpc-act:disabled { opacity: .5; cursor: default; }

/* ---------- Input ---------- */
.vpc-input-row { display: flex; gap: 8px; padding: 10px 12px 12px; flex: 0 0 auto; background: #fff; }
.vpc-input {
  flex: 1; padding: 10px 12px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--vp-gray-300, #d4d4d4); border-radius: 9px; outline: none;
}
.vpc-input:focus { border-color: var(--vp-yellow, #f5c400); box-shadow: 0 0 0 3px rgba(245, 196, 0, .25); }
.vpc-send {
  width: 40px; flex: 0 0 auto; border: none; border-radius: 9px; cursor: pointer;
  background: #111; color: var(--vp-yellow, #f5c400); font-size: 15px;
}
.vpc-send:disabled { opacity: .4; cursor: default; }

/* ---------- Flash no campo preenchido ---------- */
.vpc-flash { animation: vpc-fieldflash 1.6s ease; }
@keyframes vpc-fieldflash {
  0% { box-shadow: 0 0 0 0 rgba(245, 196, 0, .9); background-color: rgba(245, 196, 0, .25); }
  100% { box-shadow: 0 0 0 6px rgba(245, 196, 0, 0); background-color: transparent; }
}
