/* =========================================================
   RESET DE HERANÇA (Elementor, temas e outros plugins costumam
   estilizar globalmente <button> e <a>. Este bloco neutraliza
   isso dentro do widget antes de aplicar o design configurado)
   ========================================================= */
.wpw-container,
.wpw-container *,
.wpw-container *::before,
.wpw-container *::after {
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: normal !important;
}

.wpw-container button,
.wpw-container a,
.wpw-container a:link,
.wpw-container a:visited {
    all: unset !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.wpw-container {
    position: fixed !important;
    bottom: var(--wpw-distancia-fundo, 20px) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.wpw-container[data-posicao="left"] {
    align-items: flex-start !important;
}

/* Bolinha */
.wpw-bolinha {
    width: var(--wpw-tamanho-bolinha, 60px) !important;
    height: var(--wpw-tamanho-bolinha, 60px) !important;
    min-width: var(--wpw-tamanho-bolinha, 60px) !important;
    min-height: var(--wpw-tamanho-bolinha, 60px) !important;
    border-radius: 50% !important;
    background: var(--wpw-cor-bolinha, #25D366) !important;
    color: var(--wpw-cor-icone, #fff) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
    transition: transform 0.2s ease !important;
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
    position: relative !important;
}

.wpw-bolinha.wpw-visivel {
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
}

.wpw-bolinha:hover {
    transform: scale(1.08) !important;
}

.wpw-bolinha.wpw-pulso::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--wpw-cor-bolinha, #25D366);
    opacity: 0.6;
    animation: wpw-pulse 2s infinite;
}

@keyframes wpw-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Balão de saudação */
.wpw-saudacao {
    position: relative !important;
    background: #fff !important;
    color: #1f1f1f !important;
    padding: 12px 32px 12px 16px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
    margin-bottom: 12px !important;
    max-width: 240px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    pointer-events: none;
    display: block !important;
}

.wpw-saudacao.wpw-visivel {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.wpw-saudacao-fechar {
    position: absolute !important;
    top: 6px !important;
    right: 10px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    color: #999 !important;
}

/* Popup de perguntas */
.wpw-popup {
    position: absolute !important;
    bottom: calc(var(--wpw-tamanho-bolinha, 60px) + 16px) !important;
    width: 300px !important;
    max-width: 88vw !important;
    background: var(--wpw-cor-popup-bg, #fff) !important;
    border-radius: var(--wpw-raio-borda, 16px) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25) !important;
    padding: 18px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s !important;
    z-index: 1 !important;
    display: block !important;
}

.wpw-popup.wpw-aberto {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

.wpw-popup-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    color: var(--wpw-cor-popup-titulo, #25D366) !important;
    font-size: 16px !important;
    margin-bottom: 4px !important;
}

.wpw-popup-fechar {
    cursor: pointer !important;
    font-size: 20px !important;
    color: #999 !important;
    line-height: 1 !important;
}

.wpw-popup-subtitulo {
    color: var(--wpw-cor-popup-texto, #1f1f1f) !important;
    font-size: 13px !important;
    margin: 0 0 14px 0 !important;
    opacity: 0.85 !important;
    display: block !important;
}

.wpw-popup-opcoes {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.wpw-opcao {
    display: block !important;
    background: var(--wpw-cor-opcao-bg, #f5f5f5) !important;
    color: var(--wpw-cor-popup-texto, #1f1f1f) !important;
    text-decoration: none !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    transition: background 0.2s ease !important;
    width: auto !important;
    height: auto !important;
    text-align: left !important;
    font-weight: normal !important;
}

.wpw-opcao:hover,
.wpw-opcao:focus,
.wpw-opcao:active,
.wpw-opcao:visited {
    background: var(--wpw-cor-opcao-hover, #e8f8ee) !important;
    color: var(--wpw-cor-popup-texto, #1f1f1f) !important;
    text-decoration: none !important;
}

@media (max-width: 480px) {
    .wpw-popup {
        width: 260px !important;
    }
}
