/* ============================================================
   LETÍCIA — Agente de Vendas + Botão WhatsApp Flutuante
   ============================================================ */

/* ── BOTÃO WHATSAPP FLUTUANTE (esquerda) ── */
#btn-whatsapp-float {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 9000;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(37,211,102,.45);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
#btn-whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 26px rgba(37,211,102,.6);
}
#btn-whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }
#btn-whatsapp-float .wa-pulse {
  position: absolute;
  top: -3px; right: -3px;
  width: 16px; height: 16px;
  background: #ff3b30;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: waPulse 1.8s infinite;
}
@keyframes waPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: .7; }
}
#wa-tooltip {
  position: fixed;
  bottom: 96px;
  left: 28px;
  background: #075e54;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', Arial, sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}
#wa-tooltip.show { opacity: 1; transform: translateY(0); }
#wa-tooltip::after {
  content: '';
  position: absolute;
  bottom: -7px; left: 18px;
  border: 7px solid transparent;
  border-top-color: #075e54;
  border-bottom: none;
}

/* ── LETÍCIA WIDGET (direita) ── */
#leticia-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  font-family: 'Inter', Arial, sans-serif;
}

/* Bubble */
#leticia-bubble {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cc0000, #ff4444);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(204,0,0,.4), 0 0 0 3px #fff, 0 0 0 5px #cc0000;
  overflow: hidden;
  position: relative;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#leticia-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(204,0,0,.5), 0 0 0 3px #fff, 0 0 0 5px #ff4444;
}
#leticia-bubble.hidden { display: none; }
#leticia-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
#leticia-bubble .lb-fallback {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  display: none;
}
#leticia-notif {
  position: absolute;
  top: -2px; right: -2px;
  background: #ff9500;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  animation: waPulse 1.5s infinite;
}

/* Chat panel */
#leticia-chat {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 340px;
  max-height: 540px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(.85) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s;
  z-index: 9000;
}
#leticia-chat.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
#leticia-header {
  background: linear-gradient(135deg, #cc0000 0%, #8b0000 100%);
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
#leticia-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.35);
  flex-shrink: 0;
  background: rgba(255,255,255,.15);
}
#leticia-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
#leticia-info strong { display: block; color: #fff; font-size: 14px; font-weight: 700; }
#leticia-info span {
  font-size: 11px; color: rgba(255,255,255,.7);
  display: flex; align-items: center; gap: 5px;
}
#leticia-info span::before {
  content: ''; width: 7px; height: 7px;
  background: #4ade80; border-radius: 50%; display: inline-block;
}
#leticia-close {
  margin-left: auto;
  background: rgba(255,255,255,.15);
  border: none; color: rgba(255,255,255,.8);
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: .15s; flex-shrink: 0;
}
#leticia-close:hover { background: rgba(255,255,255,.28); color: #fff; }

/* Messages */
#leticia-messages {
  flex: 1; overflow-y: auto;
  padding: 14px; display: flex;
  flex-direction: column; gap: 9px;
  background: #fafafa;
  scroll-behavior: smooth;
}
#leticia-messages::-webkit-scrollbar { width: 3px; }
#leticia-messages::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

.let-msg {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  animation: fadeInMsg .22s ease;
}
@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.let-msg-leticia {
  background: #fff;
  color: #1a1a2e;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.let-msg-user {
  background: #cc0000;
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

/* Sugestões */
#leticia-suggs {
  padding: 7px 11px 4px;
  display: flex; flex-wrap: wrap; gap: 5px;
  background: #fafafa;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.let-sugg {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #cc0000;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: .15s;
}
.let-sugg:hover { background: #cc0000; color: #fff; border-color: #cc0000; }

/* Input */
#leticia-input-row {
  display: flex; gap: 7px;
  padding: 9px 11px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}
#leticia-input {
  flex: 1; padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  font-size: 13px; font-family: inherit;
  outline: none; transition: .15s; color: #1a1a2e;
}
#leticia-input:focus { border-color: #cc0000; }
#leticia-send {
  width: 34px; height: 34px;
  background: #cc0000; color: #fff;
  border: none; border-radius: 50%;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: .15s; flex-shrink: 0;
}
#leticia-send:hover { background: #a80000; }

/* Tooltip */
#leticia-tooltip {
  position: fixed;
  bottom: 100px; right: 28px;
  background: #cc0000;
  color: #fff;
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 13px; font-weight: 600;
  font-family: 'Inter', Arial, sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(204,0,0,.3);
  pointer-events: none;
  z-index: 8999;
  animation: fadeInMsg .3s ease;
}
#leticia-tooltip::after {
  content: '';
  position: absolute;
  bottom: -7px; right: 20px;
  border: 7px solid transparent;
  border-top-color: #cc0000;
  border-bottom: none;
}

/* Mobile */
@media(max-width:480px) {
  #leticia-chat { width: calc(100vw - 20px); right: 10px; bottom: 10px; max-height: 72vh; }
  #leticia-widget { bottom: 10px; right: 10px; }
  #btn-whatsapp-float { bottom: 10px; left: 10px; }
  #wa-tooltip { bottom: 78px; }
}
