/**
 * style-whatsapp.css — WhatsApp Widget
 * Eternity Residence Alphaville
 */

/* ----------------------------------------------------------------
   BOTÃO FLUTUANTE
   ---------------------------------------------------------------- */
.wpp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: #25d366 !important;
    border: none;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(37,211,102,0.4);
    z-index: 99998;
    transition: background 0.3s ease, transform 0.3s ease;
    padding: 0 !important;
    overflow: hidden;
}

.wpp-btn:hover {
    background: #128c7e;
    transform: scale(1.08);
}

.wpp-btn__icon--close {
    display: none;
}

.wpp-btn--aberto .wpp-btn__icon--wpp {
    display: none;
}

.wpp-btn--aberto .wpp-btn__icon--close {
    display: block;
}

/* Ícone dentro do botão */
.wpp-btn svg,
.wpp-btn img {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0;
}

.wpp-btn__icon--wpp svg,
.wpp-btn__icon--wpp img {
    width: 28px !important;
    height: 28px !important;
}

/* Pulse animation */
.wpp-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: wpp-pulse 2s ease-out infinite;
    pointer-events: none;
}

.wpp-btn--aberto::after {
    display: none;
}

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


/* ----------------------------------------------------------------
   TICKER (mensagem rotativa ao lado do botão)
   ---------------------------------------------------------------- */
.wpp-ticker {
    position: fixed;
    bottom: 36px;
    right: 96px;
    background: #fff;
    border-radius: 8px;
    padding: 8px 32px 8px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 99997;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: 260px;
}

.wpp-ticker--visivel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.wpp-ticker__texto {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    color: #333;
    line-height: 1.4;
}

.wpp-ticker__close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
}

.wpp-ticker__close:hover {
    color: #333;
}


/* ----------------------------------------------------------------
   CAIXA DE CHAT
   ---------------------------------------------------------------- */
.wpp-chat {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    z-index: 99999;
    overflow: hidden;
    animation: wpp-slideUp 0.35s ease;
}

.wpp-chat[hidden] {
    display: none;
}

@keyframes wpp-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.wpp-chat__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #075e54;
    color: #fff;
}

.wpp-chat__avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    flex-shrink: 0;
}

.wpp-chat__info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wpp-chat__nome {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
}

.wpp-chat__cargo {
    font-size: 0.75rem;
    opacity: 0.8;
}

.wpp-chat__close {
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    line-height: 1 !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wpp-chat__close:hover {
    opacity: 1;
}

/* Body */
.wpp-chat__body {
    padding: 20px 16px;
    background: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4cfc6' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 80px;
}

.wpp-chat__bubble {
    background: #fff;
    border-radius: 0 12px 12px 12px;
    padding: 12px 16px;
    max-width: 85%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    position: relative;
}

.wpp-chat__bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid #fff;
    border-left: 8px solid transparent;
}

/* Typing indicator */
.wpp-chat__typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.wpp-chat__typing[hidden] {
    display: none;
}

.wpp-chat__typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #90a4ae;
    animation: wpp-typing 1.4s infinite both;
}

.wpp-chat__typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.wpp-chat__typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wpp-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.wpp-chat__mensagem {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: #333;
    line-height: 1.5;
}

.wpp-chat__mensagem[hidden] {
    display: none;
}

/* CTA button */
.wpp-chat__cta {
    display: block !important;
    text-align: center !important;
    padding: 14px 16px !important;
    background: #25d366 !important;
    color: #fff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: background 0.3s ease;
    border: none !important;
    border-radius: 0 0 16px 16px !important;
    cursor: pointer !important;
}

.wpp-chat__cta:hover {
    background: #128c7e !important;
    color: #fff !important;
}


/* ----------------------------------------------------------------
   RESPONSIVO
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .wpp-btn {
        width: 52px !important;
        height: 52px !important;
        bottom: 16px;
        right: 16px;
        border-radius: 50% !important;
    }

    .wpp-chat {
        bottom: 80px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
    }

    .wpp-ticker {
        bottom: 28px;
        right: 80px;
        max-width: 200px;
    }
}
