/* =========================================
   BOTÃO FLUTUANTE
========================================= */

.whatsapp-widget {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 99999;
    font-family: Arial, sans-serif;
}

.whatsapp-button {
    border: none;
    outline: none;
    background: #25D366;
    color: #fff;

    height: 52px;
    padding: 0 24px;

    border-radius: 30px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    font-size: 15px;
    font-weight: 500;

    cursor: pointer;

    box-shadow: 0 5px 20px rgba(0,0,0,0.20);

    transition: all 0.25s ease;
}

.whatsapp-button i {
    font-size: 22px;
}

.whatsapp-button:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}


/* =========================================
   JANELA
========================================= */

.whatsapp-chat {
    position: absolute;

    right: 0;
    bottom: 65px;

    width: 280px;
    height: 380px;

    background: #fff;

    border-radius: 14px;

    overflow: hidden;

    box-shadow: 0 10px 40px rgba(0,0,0,0.25);

    display: none;

    flex-direction: column;

    animation: whatsappOpen 0.25s ease;
}

.whatsapp-chat.active {
    display: flex;
}


/* =========================================
   ANIMAÇÃO
========================================= */

@keyframes whatsappOpen {

    from {
        opacity: 0;
        transform: translateY(15px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* =========================================
   CABEÇALHO
========================================= */

.whatsapp-header {
    height: 65px;

    background: #075E54;

    color: white;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 15px;
}

.whatsapp-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-icon {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: #25D366;

    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-icon i {
    font-size: 22px;
}

.whatsapp-header strong {
    display: block;
    font-size: 15px;
}

.whatsapp-header small {
    display: block;
    font-size: 12px;
    opacity: .85;
    margin-top: 3px;
}

.whatsapp-close {
    background: transparent;
    border: none;
    color: white;

    font-size: 27px;

    cursor: pointer;

    line-height: 1;
}


/* =========================================
   CORPO
========================================= */

.whatsapp-body {

    flex: 1;

    padding: 20px 15px;

    background:
        #efe7de;

    position: relative;

    overflow-y: auto;
}


/* mensagem */

.whatsapp-message {

    background: #fff;

    width: fit-content;
    max-width: 85%;

    padding: 10px 12px;

    border-radius: 0 10px 10px 10px;

    box-shadow: 0 1px 2px rgba(0,0,0,.12);

    font-size: 14px;

    color: #333;
}

.message-name {

    color: #075E54;

    font-weight: bold;

    font-size: 12px;

    margin-bottom: 5px;
}

.message-text {
    line-height: 1.5;
}

.message-time {

    text-align: right;

    font-size: 10px;

    color: #999;

    margin-top: 5px;
}


/* =========================================
   CAMPO DE MENSAGEM
========================================= */

.whatsapp-footer {

    height: 65px;

    background: #f0f0f0;

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 8px 10px;
}

.whatsapp-footer input {

    flex: 1;

    height: 45px;

    border: none;

    outline: none;

    background: #fff;

    border-radius: 25px;

    padding: 0 16px;

    font-size: 14px;

    box-sizing: border-box;
}

.whatsapp-footer button {

    width: 45px;
    height: 45px;

    border: none;

    border-radius: 50%;

    background: #25D366;

    color: white;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 17px;

    transition: .2s;
}

.whatsapp-footer button:hover {
    background: #20bd5a;
}


/* =========================================
   CELULAR
========================================= */

@media (max-width: 600px) {

    .whatsapp-widget {

        right: 15px;
        bottom: 10px;

    }

    .whatsapp-button {

        height: 50px;

        padding: 0 20px;

        font-size: 14px;

    }

    .whatsapp-chat {

        width: calc(100vw - 30px);

        height: 70vh;

        max-height: 380px;

        right: 0;

        bottom: 62px;

    }

}