/* =========================
   WP Chatflow - Clean Neo Style
   Author: MBOLIVEIRAZ MEDIA & TECH
   ========================= */

.wpcf-chat{
  background:#f8f9fb;
  max-width:560px;
  margin:20px auto;
  border-radius:20px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  display:flex;flex-direction:column;overflow:hidden;
  font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
}
.wpcf-header{display:flex;align-items:center;gap:10px;padding:14px 16px;background:#fff;border-bottom:1px solid #eee}
.wpcf-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover}
.wpcf-name{font-weight:600}
.wpcf-status{margin-left:auto;color:#2aa866;font-size:13px}

.wpcf-body{padding:20px;min-height:260px;background:#f9fafc;display:flex;flex-direction:column;gap:10px}

.wpcf-bot .wpcf-bubble,.wpcf-user .wpcf-bubble{padding:12px 16px;border-radius:18px;max-width:85%;font-size:15px;line-height:1.45;animation:fadeIn .25s ease}
.wpcf-bot .wpcf-bubble{
  background:linear-gradient(135deg,#6c63ff,#8e7dff);
  color:#fff;align-self:flex-start;border-bottom-left-radius:6px;
  box-shadow:0 4px 14px rgba(108,99,255,.25);
}
.wpcf-user .wpcf-bubble{
  background:rgba(255,255,255,.75);backdrop-filter:blur(8px);
  color:#222;align-self:flex-end;border-bottom-right-radius:6px;
  box-shadow:0 4px 14px rgba(0,0,0,.06);
}

.wpcf-buttons{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.wpcf-btn{
  display:inline-block;padding:12px 16px;font-size:15px;border:none;border-radius:12px;
  background:#fff;color:#6c63ff;cursor:pointer;text-align:center;
  transition:all .18s ease;box-shadow:0 2px 6px rgba(108,99,255,.15);
}
.wpcf-btn:hover{background:#6c63ff;color:#fff;transform:translateY(-1px)}

.wpcf-actions{display:flex;gap:8px;padding:10px 16px;background:#fff;border-top:1px solid #eee}
.wpcf-actions button{flex:1;padding:8px 12px;border-radius:10px;border:none;background:#eee;cursor:pointer;font-size:14px}
.wpcf-actions button:hover{background:#e0e0e0}

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

/* === Fullscreen (chatflow-full.php) === */
html, body.wpcf-full { height: 100%; }

.wpcf-full .wpcf-fullpage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 24px);
  background: #f3f4f6;
}

.wpcf-full .wpcf-chat {
  max-width: 980px;   /* antes 560px */
  width: 100%;
  height: 92vh;       /* ocupa quase tudo */
  border-radius: 20px;
}

.wpcf-full .wpcf-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.wpcf-full .wpcf-actions {
  position: sticky;
  bottom: 0;
}

@media (max-width: 600px) {
  .wpcf-full .wpcf-chat {
    height: 100dvh;   /* 100% da viewport útil no mobile */
    border-radius: 0;
    box-shadow: none;
  }
}

/* garante o mesmo visual para <a class="wpcf-btn"> */
.wpcf-btn{
  text-decoration: none;
  display: block;
  color: #6c63ff;
}
.wpcf-btn:hover{
  color: #fff;
}
.wpcf-buttons .wpcf-btn:focus-visible{
  outline: 2px solid #6c63ff;
  outline-offset: 2px;
}

.wpcf-ts{
  display:block;
  font-size:11px;
  color:#8f8f8f;
  margin-top:4px;
  padding:0 6px;
}
.wpcf-bot  .wpcf-ts{ text-align:left;  }
.wpcf-user .wpcf-ts{ text-align:right; }

.wpcf-bubble p{ margin:0 0 8px; }
.wpcf-bubble p:last-child{ margin-bottom:0; }

/* indicador "digitando..." já existente */
.wpcf-typing{
  align-self: flex-start;
  display:inline-flex;
  gap:6px;
  padding:10px 14px;
  border-radius:18px;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  margin-bottom:8px;
}
.wpcf-typing-dot{
  width:6px; height:6px; border-radius:50%;
  background:#bfbfbf; opacity:.6; animation:wpcf-bounce 1s infinite ease-in-out;
}
.wpcf-typing-dot:nth-child(2){ animation-delay:.15s; }
.wpcf-typing-dot:nth-child(3){ animation-delay:.3s; }
@keyframes wpcf-bounce{
  0%,80%,100%{ transform:translateY(0); opacity:.6; }
  40%{ transform:translateY(-4px); opacity:1; }
}

/* Contêiner do anúncio fora da bolha */
.wpcf-ad-wrap{
  margin: 12px 0 16px;
  padding: 0;
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
}

.wpcf-ad-wrap .code-block,
.wpcf-ad-wrap [class*="code-block"]{
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

.wpcf-ad-wrap ins.adsbygoogle{
  display:block!important;
  margin:0 auto!important;
}

.wpcf-ad-wrap [id^="div-gpt-ad-"]{
  width:100%;
}

/* O CHAT passa a ser o scroller */
.wpcf-body{
  max-height: 70dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding-bottom: max(20px, env(safe-area-inset-bottom), var(--bottom-offset, 100px));
  scroll-padding-bottom: max(20px, env(safe-area-inset-bottom), var(--bottom-offset, 100px));
}

/* anúncio nunca é “cortado” pelo container */
.wpcf-ad-wrap{ overflow: visible !important; }

/* Rodapé legal */
.wpcf-legal {
  position: absolute; /* Fixa o rodapé fora do wrapper do chat */
  bottom: 0;
  width: 100%;
  background: transparent; /* Torna o fundo transparente */
  padding: 12px 10px;
  text-align: center;
  font-size: 8px;
  line-height: 1.5;
  color: #666;
  opacity: 0.9;
}

.wpcf-legal a {
  color: inherit;
  text-decoration: underline;
}

.wpcf-legal a:hover {
  text-decoration: none;
}