@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400&display=swap');

* {
    font-family: 'Roboto', sans-serif;
}

/** BEGIN MAIN WIDGET **/
#whatsapp-widget {
    font-family: "Roboto";
    position: fixed;
    bottom: 85px;
    right: 18px;
    z-index: 999;
    transition: 0.5s;
}

#whatsapp-widget-target {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #24CD63;
    color: #fff;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, .15);
    animation: scale_full 3s cubic-bezier(0.28, 1.84, 0.55, -0.11) infinite;
    cursor: pointer;
    text-decoration: none;
}

#whatsapp-widget-icon {
    font-size: 35px;
    color: white;
    /* Removed absolute positioning for flexbox centering */
    animation: none;
    /* Icon itself doesn't need pulse, container does */
}

@keyframes scale_full {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/** BEGIN MAIN WIDGET **/

/** BEGIN POPUP WIDGET **/
#whatsapp-widget-chat {
    position: absolute;
    display: flex;
    /* Changed from table */
    visibility: hidden;
    opacity: 0;
    flex-direction: column;
    margin-bottom: 96px;
    width: 320px;
    height: 400px;
    /* Fixed height for chat window feel */
    right: 0px;
    z-index: 999999;
    bottom: 0px;
    /* Adjusted bottom */
    box-shadow: rgba(0, 0, 0, 0.2) 0px 12px 24px 0px;
    transition: opacity 0.3s ease 0s, margin 0.3s ease 0s, visibility 0.3s ease 0s;
    border-radius: 10px;
    background-color: #fff;
    overflow: hidden;
}

@media (min-width: 768px) {
    #whatsapp-widget-chat {
        right: 40px;
        bottom: 80px;
        /* Moved up slightly */
    }
}

#whatsapp-widget-chat-header {
    background: #095E54;
    padding: 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    color: #fff;
    position: relative;
    box-sizing: border-box;
    height: auto;
    min-height: 80px;
    display: flex;
    flex-direction: column;
}

#whatsapp-widget-chat-header .close {
    display: flex;
    color: #fff;
    cursor: pointer;
    top: 10px;
    position: absolute;
    font-size: 18px;
    font-weight: 600;
    right: 15px;
    width: 20px;
    height: 20px;
    justify-content: center;
    align-items: center;
    opacity: 0.8;
}

#whatsapp-widget-chat-header .bot {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

#whatsapp-widget-chat-header .bot-img {
    width: 50px;
    height: 50px;
    display: block;
    position: relative;
    border-radius: 50%;
    background: #ffffff;
    overflow: hidden;
    flex-shrink: 0;
}

#whatsapp-widget-chat-header .bot-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#whatsapp-widget-chat-header .name {
    font-size: 16px;
    font-weight: 700;
    line-height: normal;
    color: #fff;
}

#whatsapp-widget-chat-header .status {
    font-size: 13px;
    margin-top: 2px;
    line-height: normal;
    color: rgba(255, 255, 255, 0.9);
}

/** END POPUP WIDGET **/

/** BEGIN POPUP CHAT WIDGET **/
#whatsapp-widget-chat-chat {
    position: relative;
    background-color: rgb(230, 221, 212);
    width: 100%;
    /* height: 250px; Removed fixed height */
    flex: 1;
    /* Allow to grow */
    overflow-y: auto;
    /* Background pattern */
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-size: cover;
}

#whatsapp-widget-chat-chat .message {
    display: none;
    margin-top: 15px;
    position: relative;
    padding: 8px 12px;
    border-radius: 0px 8px 8px 8px;
    margin-left: 15px;
    margin-right: 15px;
    background-color: #fff;
    max-width: 80%;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

/* Triangle for message */
#whatsapp-widget-chat-chat .message::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 8px solid #fff;
    border-left: 8px solid transparent;
}


#whatsapp-widget-chat-chat .header {
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    color: #e542a3;
    /* WhatsApp name color */
    margin-bottom: 2px;
}

#whatsapp-widget-chat-chat .msg {
    font-size: 14px;
    line-height: 19px;
    color: rgb(17, 17, 17);
}

#whatsapp-widget-chat-chat .date {
    float: right;
    font-size: 11px;
    margin-top: 6px;
    margin-left: 10px;
    color: rgba(0, 0, 0, 0.45);
}

/** END POPUP CHAT WIDGET **/

/** BEGIN POPUP FOOTER WIDGET **/
#whatsapp-widget-chat-footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 10px;
    background: #f0f0f0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

#whatsapp-widget-chat-footer a {
    padding: 10px 20px;
    display: block;
    color: #fff;
    text-decoration: none;
    background: #24CD63;
    text-align: center;
    border-radius: 20px;
    font-weight: 500;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

#whatsapp-widget-chat-footer a:hover {
    background: #1ebc57;
}

/** END POPUP FOOTER WIDGET **/