/* ============================================================
   EVE Chatbot Widget — SeguroDeEventos.com
   ============================================================ */

:root {
  --eve-primary:       #1e40af;
  --eve-primary-dark:  #1e3a8a;
  --eve-primary-light: #3b82f6;
  --eve-bg:            #f1f5f9;
  --eve-panel-width:   400px;
  --eve-radius:        18px;
  --eve-transition:    0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --eve-shadow:        0 8px 40px rgba(30, 64, 175, 0.18);
}

/* ── Overlay ─────────────────────────────────────────────── */
.eve-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 9998; opacity: 0; pointer-events: none;
  transition: opacity var(--eve-transition);
}
.eve-overlay.eve-visible { opacity: 1; pointer-events: auto; }

/* ── Painel ──────────────────────────────────────────────── */
.eve-panel {
  position: fixed; top: 0; right: 0;
  width: var(--eve-panel-width); height: 100dvh;
  background: #fff; z-index: 9999;
  display: flex; flex-direction: column;
  box-shadow: -6px 0 50px rgba(15, 23, 42, 0.16);
  transform: translateX(100%);
  transition: transform var(--eve-transition);
  border-radius: var(--eve-radius) 0 0 var(--eve-radius);
  overflow: hidden;
}
.eve-panel.eve-open { transform: translateX(0); }

/* ── Cabeçalho ───────────────────────────────────────────── */
.eve-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--eve-primary-dark) 0%, var(--eve-primary-light) 100%);
  padding: 20px 18px 18px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff;
}
.eve-header-info { display: flex; align-items: center; gap: 14px; }
.eve-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.eve-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.eve-header-name { font-size: 19px; font-weight: 700; margin-bottom: 2px; }
.eve-header-sub {
  font-size: 11.5px; opacity: .88;
  display: flex; align-items: center; gap: 5px;
}
.eve-header-sub::before {
  content: ''; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 5px #4ade80;
}
.eve-close-btn {
  background: rgba(255,255,255,.18); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font-size: 17px; display: flex; align-items: center; justify-content: center;
  transition: background .2s; flex-shrink: 0;
}
.eve-close-btn:hover { background: rgba(255,255,255,.32); }
.eve-restart-btn {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .3s; flex-shrink: 0;
  margin-right: 4px;
}
.eve-restart-btn:hover { background: rgba(255,255,255,.28); transform: rotate(-180deg); }

/* ── Área de mensagens ───────────────────────────────────── */
.eve-messages {
  flex: 1; overflow-y: auto; padding: 20px 16px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--eve-bg); scroll-behavior: smooth;
}
.eve-messages { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.eve-messages::-webkit-scrollbar { width: 5px; }
.eve-messages::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.eve-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1; border-radius: 99px;
  border: 1px solid var(--eve-bg);
}
.eve-messages::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Balões ──────────────────────────────────────────────── */
.eve-msg {
  display: flex; flex-direction: column; max-width: 87%;
  animation: eveFadeUp .25s ease both;
}
@keyframes eveFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eve-msg.eve-user  { align-self: flex-end;  align-items: flex-end; }
.eve-msg.eve-bot   { align-self: flex-start; align-items: flex-start; }

.eve-bubble {
  padding: 12px 16px; border-radius: var(--eve-radius);
  font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.eve-msg.eve-user .eve-bubble {
  background: var(--eve-primary); color: #fff;
  border-bottom-right-radius: 5px;
}
.eve-msg.eve-bot .eve-bubble {
  background: #fff; color: #1e293b;
  border-bottom-left-radius: 5px;
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}
.eve-time { font-size: 10.5px; color: #94a3b8; margin-top: 4px; padding: 0 4px; }

/* ── Indicador de digitação ──────────────────────────────── */
.eve-typing-wrap { align-self: flex-start; animation: eveFadeUp .25s ease both; }
.eve-typing {
  display: flex; align-items: center; gap: 5px;
  padding: 13px 18px; background: #fff;
  border-radius: var(--eve-radius); border-bottom-left-radius: 5px;
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}
.eve-typing span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #94a3b8; animation: eveDot 1.4s infinite ease-in-out;
}
.eve-typing span:nth-child(2) { animation-delay: .2s; }
.eve-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes eveDot {
  0%, 60%, 100% { transform: translateY(0);   opacity: .5; }
  30%           { transform: translateY(-7px); opacity: 1; }
}

/* ── Botões de opção (fluxo guiado) ──────────────────────── */
.eve-options {
  display: flex; flex-direction: column; gap: 8px;
  padding: 0 4px;
  animation: eveFadeUp .3s ease both;
}
.eve-option-btn {
  background: #fff;
  border: 2px solid var(--eve-primary);
  color: var(--eve-primary);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: background .18s, color .18s, transform .15s;
  font-family: inherit;
}
.eve-option-btn:hover:not(:disabled) {
  background: var(--eve-primary); color: #fff;
  transform: translateX(3px);
}
.eve-option-btn.selected {
  background: var(--eve-primary); color: #fff;
  opacity: .7; cursor: default;
}
.eve-option-btn:disabled { cursor: not-allowed; opacity: .5; }

/* ── Card de resumo ──────────────────────────────────────── */
.eve-summary {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--eve-primary);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  animation: eveFadeUp .3s ease both;
}
.eve-summary__title {
  font-weight: 700; color: var(--eve-primary);
  margin-bottom: 10px; font-size: 13px;
}
.eve-summary__row {
  display: flex; justify-content: space-between;
  gap: 8px; padding: 3px 0;
  border-bottom: 1px solid #f1f5f9;
}
.eve-summary__row:last-child { border-bottom: none; }
.eve-summary__row span { color: #64748b; }
.eve-summary__row strong { color: #0f172a; text-align: right; }

/* ── Área de input ───────────────────────────────────────── */
.eve-input-area {
  flex-shrink: 0; padding: 14px 16px;
  background: #fff; border-top: 1px solid #e2e8f0;
  display: flex; align-items: center; gap: 10px;
}

/* Botão de reinício na barra inferior */
.eve-restart-bottom-btn {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--eve-bg); border: 1.5px solid #e2e8f0;
  color: #94a3b8; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, color .18s, border-color .18s;
}
.eve-restart-bottom-btn:hover {
  background: #fee2e2; color: #dc2626; border-color: #fca5a5;
}
.eve-input {
  flex: 1; padding: 12px 18px;
  border: 1.5px solid #e2e8f0; border-radius: 24px;
  font-size: 14px; font-family: inherit; outline: none;
  color: #1e293b; background: var(--eve-bg);
  transition: border-color .2s, background .2s;
}
.eve-input:focus { border-color: var(--eve-primary-light); background: #fff; }
.eve-input::placeholder { color: #94a3b8; }
.eve-input:disabled { opacity: .6; cursor: not-allowed; }

.eve-send-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--eve-primary) 0%, var(--eve-primary-light) 100%);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 2px 10px rgba(30,64,175,.35);
}
.eve-send-btn:hover:not(:disabled) { transform: scale(1.07); box-shadow: 0 4px 16px rgba(30,64,175,.45); }
.eve-send-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.eve-send-btn svg { width: 20px; height: 20px; fill: #fff; }

/* ── Botão flutuante ─────────────────────────────────────── */
.eve-toggle-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 9997;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; padding: 0; cursor: pointer;
}
.eve-toggle-icon {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--eve-primary-dark) 0%, var(--eve-primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--eve-shadow); transition: transform .22s, box-shadow .22s;
}
.eve-toggle-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.eve-toggle-btn:hover .eve-toggle-icon {
  transform: scale(1.1); box-shadow: 0 10px 35px rgba(30,64,175,.5);
}
.eve-toggle-label {
  background: var(--eve-primary-dark); color: #fff;
  padding: 3px 14px; border-radius: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .4px;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(30,64,175,.3);
}
.eve-badge {
  position: absolute; top: 2px; right: 2px;
  width: 14px; height: 14px;
  background: #22c55e; border: 2.5px solid #fff; border-radius: 50%;
  z-index: 10;
  animation: evePulse 2s infinite;
}
@keyframes evePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

/* ── Certificado de Solicitação de Seguro ────────────────── */
.eve-certificate {
  background: #fff;
  border: 2px solid #1e40af;
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0;
  font-size: 13px;
}
.eve-cert-header {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.eve-cert-icon {
  font-size: 28px;
  color: #93c5fd;
  flex-shrink: 0;
  margin-top: 2px;
}
.eve-cert-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  line-height: 1.3;
}
.eve-cert-no {
  font-family: monospace;
  font-size: 12px;
  color: #bfdbfe;
  margin-top: 5px;
  letter-spacing: 0.5px;
}
.eve-cert-date {
  font-size: 11px;
  color: #93c5fd;
  margin-top: 3px;
}
.eve-cert-section {
  background: #eff6ff;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-top: 1px solid #dbeafe;
  border-bottom: 1px solid #dbeafe;
}
.eve-certificate .eve-summary__row { padding: 6px 16px; font-size: 13px; }
.eve-certificate .eve-summary__row:nth-child(even) { background: #f9fafb; }
.eve-cert-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #eff6ff;
  border-top: 2px solid #bfdbfe;
}
.eve-cert-price span { font-size: 13px; color: #6b7280; font-weight: 500; }
.eve-cert-price strong { font-size: 20px; font-weight: 800; color: #1e40af; }
.eve-cert-disclaimer {
  padding: 12px 16px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.6;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.eve-cert-disclaimer strong { color: #374151; }

/* ── Responsivo ──────────────────────────────────────────── */
@media (max-width: 440px) {
  .eve-panel { width: 100%; border-radius: 0; }
  .eve-toggle-btn { bottom: 20px; right: 20px; }
}
