:root{
  --dw-primary: #25D366;
}
.dw-whatsapp-root{}
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100000;
}
.whatsapp-widget.left { right: auto; left: 20px; }

.whatsapp-button {
    width: 60px;
    height: 60px;
    background: var(--dw-primary, #25D366);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: dw-pulse 2s infinite;
}
.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}
.whatsapp-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}
@keyframes dw-pulse {
    0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8); }
    100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
}

/* Popup */
.chat-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.25s ease;
    transform-origin: bottom right;
}
.whatsapp-widget.left .chat-popup{ right:auto; left:0; transform-origin: bottom left; }
.chat-popup.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.chat-header {
    background: #128C7E;
    color: white;
    padding: 16px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}
.chat-header h3 { margin: 0 0 4px 0; font-size: 1.05rem; }
.chat-header p { margin: 0; opacity: 0.9; font-size: 0.9rem; }

.agents-list { padding: 14px; max-height: 380px; overflow-y: auto; }
.agent {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.agent:hover { background: #f0f9f0; border-color: #25D366; }
.agent.offline { opacity: 0.65; }

.agent-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    margin-right: 12px;
    position: relative;
}
.status-indicator {
    position: absolute; bottom: 2px; right: 2px;
    width: 12px; height: 12px; border-radius: 50%; border: 2px solid white;
}
.status-indicator.online { background: #4CAF50; }
.status-indicator.offline { background: #f44336; }

.agent-info { flex: 1; }
.agent-name { font-weight: 700; color: #333; margin: 0 0 3px 0; }
.agent-role { color: #666; font-size: 0.9rem; margin: 0 0 5px 0; }
.agent-status { font-size: 0.8rem; color: #25D366; }
.agent-status.offline-text { color: #f44336; }

.close-chat {
    position: absolute; top: 10px; right: 12px; background: none; border: none; color: white;
    font-size: 1.3rem; cursor: pointer; opacity: 0.8;
}
.close-chat:hover { opacity: 1; }

@media (max-width: 480px) {
  .chat-popup { width: 300px; right: -10px; }
  .whatsapp-widget.left .chat-popup{ left: -10px; }
}


/* Posições laterais no meio da tela */
.whatsapp-widget.mid-right { right: 20px; left: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
.whatsapp-widget.mid-left  { left: 20px; right: auto; top: 50%; bottom: auto; transform: translateY(-50%); }

/* Slide-in */
.chat-popup { will-change: transform, opacity; }
.chat-popup.slide-enter { transform: translateY(10px) scale(0.98); opacity: 0; }
.chat-popup.active.slide-enter { transform: translateY(0) scale(1); opacity: 1; }

/* Mini chat (mensagens iniciais) */
.mini-messages{padding:12px 14px;border-top:1px solid #eee}
.mini-msg{background:#f2fbf5;border:1px solid #d6f5df;border-radius:12px;padding:10px 12px;margin:6px 0;font-size:.95rem;line-height:1.4}
.mini-cta{display:inline-block;margin-top:8px;padding:8px 12px;border-radius:8px;border:1px solid var(--dw-primary);cursor:pointer}
.mini-loading{opacity:.7;font-style:italic}

/* Mini chat input */
.mini-messages{padding:12px 14px;border-top:1px solid #eee}
.mini-msg{background:#f2fbf5;border:1px solid #d6f5df;border-radius:12px;padding:10px 12px;margin:8px 0;font-size:.95rem;line-height:1.45}
.mini-row{display:flex;gap:8px;margin-top:8px}
.mini-input{flex:1;border:1px solid #e0e0e0;border-radius:10px;padding:10px 12px;font-size:.95rem}
.mini-send{border:0;border-radius:10px;padding:10px 14px;cursor:pointer;background:var(--dw-primary);color:#fff}
.mini-loading{opacity:.7;font-style:italic}
/* WhatsApp direct button inside popup */
.popup-wa-direct{position: absolute; right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius:50%; display:flex;align-items:center;justify-content:center; background: #25D366; box-shadow: 0 6px 18px rgba(37,211,102,.45); cursor:pointer}
.popup-wa-direct svg{width:22px;height:22px;fill:#fff}


/* === Core embedded styles (typography isolation & sizes) v1.3.5 === */
html body div.whatsapp-widget .chat-popup, html body div.whatsapp-widget .chat-popup * { box-sizing: border-box; }
html body div.whatsapp-widget .chat-header h3,
html body div.whatsapp-widget h1, html body div.whatsapp-widget h2, html body div.whatsapp-widget h3,
html body div.whatsapp-widget h4, html body div.whatsapp-widget h5, html body div.whatsapp-widget h6 {
  font-size: 16px !important; font-weight: 700 !important; line-height: 1.2 !important;
  margin: 0 0 6px 0 !important; color: #fff !important;
}
html body div.whatsapp-widget .chat-header p {
  font-size: 12px !important; line-height: 1.35 !important; margin: 0 !important; color: #e7f6ef !important;
}
html body div.whatsapp-widget .mini-messages .mini-msg { font-size: 14px !important; line-height: 1.45 !important; }
html body div.whatsapp-widget input.mini-input { font-size: 14px !important; padding: 10px 12px !important; }
html body div.whatsapp-widget button.mini-send { font-size: 14px !important; padding: 10px 14px !important;
  background:#25D366 !important; color:#fff !important; border:0 !important; border-radius:12px !important; }
html body div.whatsapp-widget .agent-name  { font-size: 15px !important; font-weight: 700 !important; }
html body div.whatsapp-widget .agent-role, html body div.whatsapp-widget .agent-status { font-size: 12px !important; }
html body div.whatsapp-widget .close-chat { width: 28px !important; height: 28px !important; padding: 0 !important;
  border-radius:50% !important; background: rgba(255,255,255,.15) !important;
  color:#fff !important; font-size: 18px !important; line-height: 28px !important;
  display:flex !important; align-items:center !important; justify-content:center !important; }
html body div.whatsapp-widget .chat-popup { width: min(92vw, 360px) !important; }
#dwPopupWADirect { display:none !important; }
@media (max-width: 360px){
  html body div.whatsapp-widget .mini-messages .mini-msg, html body div.whatsapp-widget input.mini-input { font-size: 13px !important; }
}


.dw-credit{font-size:11px;opacity:.7;text-align:center;padding:8px 10px;border-top:1px solid rgba(0,0,0,.06)}
.dw-credit a{text-decoration:none}


/* --- Mini waitlist CTA --- */
.mini-waitlist{
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.75);
}
.mini-waitlist-title{
  font-weight: 600;
  margin-bottom: 8px;
}
.mini-waitlist-email{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  outline: none;
  margin-bottom: 8px;
}
.mini-waitlist-btn{
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  background: var(--dw-primary, #25d366);
  color: #fff;
}
.mini-waitlist-link{
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
}


/* Link clicável nas respostas do Mini Chat */
.dw-wa-link{color: inherit;text-decoration: underline;font-weight: 600;word-break: break-word;}
