/* Lene Chat Widget - Stylesheet (visual "assistente virtual") */

:root {
  --lene-header: #2b4736;      /* verde escuro do cabeçalho */
  --lene-accent: #2d6a4f;      /* verde de apoio */
  --lene-gold: #c99a3c;        /* dourado do avatar */
  --lene-msg-bg: #e9e4db;      /* bege da área de mensagens */
  --lene-user: #d8f0c4;        /* balão do usuário (verde claro) */
  --lene-text: #2a2a2a;        /* texto */
  --lene-time: #9aa2a0;        /* horário */
  --lene-border: #e2ddd2;
}

/* ---------- Janela do chat ---------- */
#lene-container {
  position: fixed;
  bottom: 24px;
  right: 22px;
  width: 380px;
  max-height: min(620px, calc(100vh - 60px));
  display: flex;
  flex-direction: column;
  background: var(--lene-msg-bg);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  z-index: 998;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

#lene-container.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#lene-container.hidden {
  display: none;
}

/* ---------- Cabeçalho ---------- */
.lene-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--lene-header);
  color: #fff;
}

.lene-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lene-avatar {
  width: 46px;
  height: 46px;
  background: var(--lene-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.lene-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.lene-name {
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.1;
}

.lene-status {
  font-size: 0.78rem;
  color: #cdd8cf;
  margin-top: 2px;
}

.lene-status span {
  color: #8fe0a6;
  font-weight: 600;
}

.lene-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.lene-close:hover {
  opacity: 1;
}

/* ---------- Área de mensagens ---------- */
.lene-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--lene-msg-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lene-messages::-webkit-scrollbar {
  width: 7px;
}

.lene-messages::-webkit-scrollbar-track {
  background: transparent;
}

.lene-messages::-webkit-scrollbar-thumb {
  background: #b7b0a2;
  border-radius: 4px;
}

.lene-message {
  display: flex;
  animation: leneSlideIn 0.3s ease;
}

@keyframes leneSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lene-message.user {
  justify-content: flex-end;
}

.lene-message.assistant {
  justify-content: flex-start;
}

.lene-bubble {
  max-width: 82%;
  padding: 10px 14px 6px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--lene-text);
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.lene-message.assistant .lene-bubble {
  background: #fff;
  border-radius: 4px 16px 16px 16px;
}

.lene-message.user .lene-bubble {
  background: var(--lene-user);
  border-radius: 16px 4px 16px 16px;
}

.lene-bubble a {
  color: var(--lene-accent);
  text-decoration: underline;
  word-break: break-all;
}

/* Horário dentro do balão */
.lene-time {
  display: block;
  text-align: right;
  font-size: 0.68rem;
  color: var(--lene-time);
  margin-top: 4px;
}

/* Botão do WhatsApp comercial */
.lene-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 16px;
  background: #25D366;
  color: #fff !important;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}

.lene-wa-btn:hover {
  background: #1ebe5b;
}

.lene-wa-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Botões das redes sociais (mesmo formato do WhatsApp, cores de cada rede) */
.lene-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  margin-right: 8px;
  padding: 9px 16px;
  color: #fff !important;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: filter 0.2s;
}

.lene-social-btn:hover {
  filter: brightness(1.1);
}

.lene-social-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.lene-ig-btn {
  background: linear-gradient(45deg, #f09433, #dc2743 45%, #bc1888);
}

.lene-yt-btn {
  background: #ff0000;
}

/* O logo do YouTube é largo e baixo. Aumentando o quadro, a altura da arte
   fica igual à do ícone do Instagram e os dois parecem do mesmo tamanho. */
.lene-yt-btn svg {
  width: 21px;
  height: 21px;
}

/* ---------- Caixa de digitação ---------- */
.lene-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--lene-msg-bg);
}

#lene-input {
  flex: 1;
  border: 1px solid var(--lene-border);
  border-radius: 22px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--lene-text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

#lene-input:focus {
  border-color: var(--lene-accent);
}

#lene-input::placeholder {
  color: #9a948b;
}

.lene-send {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--lene-header);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}

.lene-send:hover {
  background: var(--lene-accent);
  transform: scale(1.05);
}

.lene-send svg {
  width: 20px;
  height: 20px;
}

/* ---------- Botão flutuante (fechado) ---------- */
#lene-toggle {
  position: fixed;
  bottom: 84px;          /* logo acima do botão compartilhar (bottom:22px), bem pertinho */
  right: 22px;
  z-index: 997;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--lene-header);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#lene-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

/* Esconde a mãozinha enquanto o chat está aberto (evita sobrepor o compartilhar) */
#lene-toggle.lene-hidden {
  display: none;
}

.lene-wave {
  font-size: 28px;
  line-height: 1;
  transform-origin: 70% 70%;
  animation: leneWave 2.2s ease-in-out infinite;
}

@keyframes leneWave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

/* ---------- Responsivo ---------- */
@media (max-width: 480px) {
  #lene-container {
    width: calc(100% - 24px);
    max-height: calc(100vh - 40px);
    bottom: 16px;
    right: 12px;
  }

  #lene-toggle {
    bottom: 74px;
    right: 16px;
    width: 52px;
    height: 52px;
  }

  .lene-bubble {
    max-width: 88%;
  }
}

@media print {
  #lene-container,
  #lene-toggle {
    display: none !important;
  }
}
