/* ============================================================
   Agente VG — Página cheia (Opção B: clara, identidade Guanabara)
   Estilos isolados (.agvg-fp-*), não dependem do chat.css do modal.
   ============================================================ */

#agvg-fp-root {
  font-family: 'Nunito Sans', -apple-system, sans-serif;
  min-height: 100vh;
  min-height: 100dvh; /* trata melhor o teclado do celular que 100vh */
  background: #f4f7fc;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 24px;
  box-sizing: border-box;
}
#agvg-fp-root * { box-sizing: border-box; }

.agvg-fp-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #19398A; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none;
  transition: opacity .25s; z-index: 50;
}
.agvg-fp-toast.agvg-fp-show { opacity: 1; }

/* ---------- Tela inicial (hero) ---------- */
.agvg-fp-hero {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 22px; width: 100%; max-width: 640px;
  min-height: 60vh; text-align: center;
}
.agvg-fp-hero.agvg-fp-hidden { display: none; }
.agvg-fp-hero-title { font-size: clamp(22px, 4vw, 32px); font-weight: 800; color: #19398A; margin: 0; }
.agvg-fp-hero-sub { font-size: 15px; color: #64748b; margin: 0; }
.agvg-fp-suggestions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 560px; }
.agvg-fp-sugg {
  display: flex; align-items: center; gap: 7px; background: #fff !important;
  border: 1px solid #c9d6ea !important; border-radius: 999px; padding: 10px 18px;
  font-size: 13.5px; font-weight: 700; color: #19398A !important; cursor: pointer;
}
.agvg-fp-sugg:hover { background: #eef3fb !important; color: #19398A !important; border-color: #c9d6ea !important; }

/* ---------- Composer (input): nasce dentro do hero, centralizado; depois da
   1ª mensagem, o próprio JS move este elemento para o rodapé fixo da tela. ---------- */
.agvg-fp-composer {
  width: 100%; max-width: 640px; display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.agvg-fp-composer-fixed {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 720px;
  background: linear-gradient(to top, #f4f7fc 65%, rgba(244,247,252,0));
  padding: 22px 0 16px; z-index: 20;
}
.agvg-fp-inputwrap {
  width: 100%; display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #c9d6ea !important; border-radius: 999px;
  padding: 8px 8px 8px 18px; box-shadow: 0 4px 18px rgba(16,38,77,.08);
}
.agvg-fp-inputwrap input { flex: 1; border: none; outline: none; font-size: 15px; font-family: inherit; background: transparent; min-width: 0; }
.agvg-fp-inputwrap input::placeholder { color: #94a3b8 !important; }
.agvg-fp-mic { background: none !important; border: none; cursor: pointer; color: #94a3b8 !important; display: flex; align-items: center; justify-content: center; padding: 6px; flex-shrink: 0; }
.agvg-fp-mic:hover { color: #19398A !important; background: none !important; }
.agvg-fp-mic-ouvindo { color: #d64545 !important; animation: agvgFpPulse 1s infinite; }
@keyframes agvgFpPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
#agvg-fp-send { width: 42px; height: 42px; border-radius: 50%; background: #19398A !important; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
#agvg-fp-send:hover:not(:disabled) { background: #19398A !important; filter: brightness(1.15); }
#agvg-fp-send:disabled { opacity: .85; cursor: default; }
#agvg-fp-send svg { width: 22px !important; height: 22px !important; }
.agvg-fp-send-dots { display: inline-flex; gap: 3px; }
.agvg-fp-send-dots i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: agvgFpBlink 1.2s infinite ease-in-out; }
.agvg-fp-send-dots i:nth-child(2) { animation-delay: .2s; }
.agvg-fp-send-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes agvgFpBlink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.agvg-fp-disclaimer { text-align: center; font-size: 11px; color: #94a3b8; margin: 0; }

/* ---------- Conversa ---------- */
.agvg-fp-thread {
  width: 100%; max-width: 720px; display: flex; flex-direction: column;
  gap: 14px; padding: 8px 0 140px; /* espaço pro composer fixo não cobrir a última mensagem */
}
.agvg-fp-msg { max-width: 78%; padding: 13px 17px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.agvg-fp-msg p { margin: 0 0 8px; }
.agvg-fp-msg p:last-child { margin-bottom: 0; }
.agvg-fp-user { align-self: flex-end; background: #19398A; color: #fff; border-bottom-right-radius: 4px; }
.agvg-fp-assistant { align-self: flex-start; background: #fff; border: 1px solid #e2e8f0; color: #1f2937; border-bottom-left-radius: 4px; }
.agvg-fp-assistant a { color: #19398A !important; font-weight: 700; }
.agvg-fp-assistant strong { color: #0d2a66; }

.agvg-fp-feedback { display: flex; align-items: center; gap: 10px; align-self: flex-start; margin: -6px 0 0 4px; }
.agvg-fp-feedback button { background: none !important; border: none; cursor: pointer; font-size: 17px; opacity: .55; }
.agvg-fp-feedback button:hover { opacity: 1; background: none !important; }
.agvg-fp-feedback-sep { width: 1px; height: 14px; background: #dbe4f0; }
.agvg-fp-iconbtn { display: flex; align-items: center; justify-content: center; color: #8a94a6 !important; opacity: 1 !important; background: none !important; }
.agvg-fp-iconbtn:hover { color: #19398A !important; background: none !important; }
.agvg-fp-feedback-obrigado { font-size: 12px; color: #8a94a6; }

/* ---------- Carrossel de cards: barra de rolagem fina, não a crua do navegador ---------- */
.agvg-fp-carousel {
  align-self: flex-start; width: 100%; max-width: 78%; overflow-x: auto; padding: 2px 2px 8px;
  scrollbar-width: thin; scrollbar-color: #c9d6ea transparent;
}
.agvg-fp-carousel::-webkit-scrollbar { height: 6px; }
.agvg-fp-carousel::-webkit-scrollbar-track { background: transparent; }
.agvg-fp-carousel::-webkit-scrollbar-thumb { background: #c9d6ea; border-radius: 3px; }
.agvg-fp-track { display: flex; gap: 10px; width: max-content; }
.agvg-fp-card { border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); flex: 0 0 250px; }
.agvg-fp-card-rota { background: #fff; border: 1px solid #e2e8f0; display: flex; flex-direction: column; }
.agvg-fp-card-rota-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.agvg-fp-card-rota-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.agvg-fp-card-data { font-size: 10.5px; font-weight: 800; color: #64748b; background: #f1f5f9; padding: 3px 9px; border-radius: 999px; }
.agvg-fp-tag-cupom { background: #fdf3dc; color: #8a5a00; }
.agvg-fp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.agvg-fp-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: #eef3fb; color: #19398A; }
.agvg-fp-tag-alt { background: #fdf3dc; color: #8a5a00; }
.agvg-fp-route { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.agvg-fp-arrow { color: #efc348; font-weight: 900; }
.agvg-fp-cta { align-self: flex-start; background: #19398A; color: #fff !important; font-weight: 800; font-size: 13px; padding: 8px 16px; border-radius: 999px; text-decoration: none !important; }
.agvg-fp-card-blog { background: #fff; border: 1px solid #e2e8f0; display: flex; flex-direction: column; text-decoration: none !important; color: inherit; }
.agvg-fp-card-blog img { width: 100%; height: 100px; object-fit: cover; }
.agvg-fp-card-blog-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.agvg-fp-card-blog-body h4 { margin: 0; font-size: 13px; color: #10264d; }
.agvg-fp-card-blog-body p { margin: 0; font-size: 12px; color: #64748b; }
.agvg-fp-card-blog-cta { font-size: 12px; font-weight: 700; color: #19398A !important; }

.agvg-fp-leadform { background: #fff; border: 1px solid #dbe4f0 !important; border-radius: 14px; padding: 16px 18px; align-self: flex-start; max-width: 78%; width: 340px; }
.agvg-fp-lead-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.agvg-fp-lead-emoji { font-size: 26px; line-height: 1; }
.agvg-fp-lead-title { margin: 0 0 2px; font-size: 14px; font-weight: 800; color: #10264d; }
.agvg-fp-lead-sub { margin: 0; font-size: 12px; color: #64748b; }
.agvg-fp-lead-form { display: flex; flex-direction: column; gap: 8px; }
.agvg-fp-lead-field { display: flex; flex-direction: column; gap: 3px; }
.agvg-fp-lead-form input { border: 1px solid #cbd5e1 !important; border-radius: 8px; padding: 9px 12px; font-size: 13px; font-family: inherit; width: 100%; box-sizing: border-box; }
.agvg-fp-lead-msg-erro { color: #a22635; font-size: 11px; min-height: 13px; }
.agvg-fp-lead-form button[type="submit"] { background: #19398A !important; color: #fff !important; border: none; border-radius: 999px; padding: 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.agvg-fp-lead-form button[type="submit"]:hover { background: #19398A !important; color: #fff !important; filter: brightness(1.1); }
.agvg-fp-lead-skip { background: none !important; border: none; color: #8a94a6 !important; font-size: 12px; cursor: pointer; text-decoration: underline; align-self: center; }
.agvg-fp-lead-skip:hover { background: none !important; color: #5a6472 !important; }

/* ---------- Avaliação após inatividade ---------- */
.agvg-fp-npsbox { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 18px; align-self: center; text-align: center; max-width: 78%; }
.agvg-fp-npsbox p { margin: 0 0 8px; font-size: 13.5px; color: #334155; }
.agvg-fp-stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; }
.agvg-fp-stars button { background: none !important; border: none; cursor: pointer; font-size: 26px; color: #d8dde5 !important; padding: 2px; }
.agvg-fp-stars button:hover, .agvg-fp-stars button:hover ~ button { color: #efc348 !important; }

.agvg-fp-loader { align-self: flex-start; display: flex; align-items: center; gap: 8px; color: #64748b; font-size: 13px; }
.agvg-fp-dots { display: inline-flex; gap: 3px; }
.agvg-fp-dots i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: agvgFpBlink 1.2s infinite ease-in-out; }
.agvg-fp-dots i:nth-child(2) { animation-delay: .2s; }
.agvg-fp-dots i:nth-child(3) { animation-delay: .4s; }

/* ---------- Responsividade ---------- */
@media (max-width: 640px) {
  #agvg-fp-root { padding: 16px 12px; }
  .agvg-fp-hero { min-height: 55vh; gap: 18px; }
  .agvg-fp-msg, .agvg-fp-leadform { max-width: 90%; }
  .agvg-fp-carousel { max-width: 92%; }
  .agvg-fp-card { flex-basis: 210px; }
  .agvg-fp-composer-fixed { width: calc(100% - 20px); padding: 16px 0 12px; }
  .agvg-fp-inputwrap { padding: 6px 6px 6px 14px; }
  .agvg-fp-inputwrap input { font-size: 16px; } /* evita zoom automático no iOS ao focar */
  .agvg-fp-suggestions { gap: 8px; }
  .agvg-fp-sugg { font-size: 12.5px; padding: 8px 14px; }
  .agvg-fp-thread { padding-bottom: 120px; }
}
