/* ============================================================
   WhatsApp Chat Widget Styles
   A floating WhatsApp button + popup chat panel
   ============================================================ */

/* ---------- Floating WhatsApp Icon Button ---------- */
.wa-widget-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #075e54;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wa-widget-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.wa-widget-btn svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

/* Pulse ring animation on the button */
.wa-widget-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #075e54;
    opacity: 0;
    animation: waPulse 2s ease-out infinite;
}

@keyframes waPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ---------- Chat Popup Panel ---------- */
.wa-chat-popup {
    position: fixed;
    bottom: 100px;
    right: 28px;
    z-index: 99998;
    width: 340px;
    max-width: calc(100vw - 40px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

.wa-chat-popup.wa-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ---------- Popup Header ---------- */
.wa-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background-color: #ff6900;
    color: #ffffff;
}

.wa-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.wa-chat-header-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.wa-chat-header-info p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

.wa-chat-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.wa-chat-close:hover {
    opacity: 1;
}

/* ---------- Chat Body ---------- */
.wa-chat-body {
    background-color: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4cdc4' fill-opacity='0.25'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0l26-26v2L54 40h-2zm4 0l22-22v2L58 40h-2zm4 0l18-18v2L62 40h-2zm4 0l14-14v2L66 40h-2zm4 0l10-10v2L70 40h-2zm4 0l6-6v2l-4 4h-2zm4 0l2-2v2h-2z'/%3E%3C/g%3E%3C/svg%3E");
    padding: 20px 16px;
    min-height: 120px;
}

/* Green chat bubble (incoming message) */
.wa-chat-bubble {
    position: relative;
    background-color: #ffffff;
    border-radius: 0 8px 8px 8px;
    padding: 10px 14px;
    max-width: 85%;
    font-size: 13.5px;
    line-height: 1.5;
    color: #303030;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 6px;
}

/* Little triangle notch on the bubble */
.wa-chat-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 0 solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #ffffff;
}

/* Light green user suggestion bubble */
.wa-chat-user-msg {
    background-color: #f0f7e8;
    border-radius: 8px 8px 8px 0;
    padding: 10px 14px;
    max-width: 85%;
    margin-left: auto;
    font-size: 13px;
    line-height: 1.5;
    color: #555555;
    font-style: italic;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    position: relative;
}

.wa-chat-user-msg::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 0 solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #f0f7e8;
}

/* ---------- Start Chat Button ---------- */
.wa-chat-footer {
    background-color: #f5f5f5;
    padding: 12px 16px;
}

.wa-start-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background-color: #ff6900;
    color: #ffffff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.wa-start-chat-btn:hover {
    background-color: #ff5722;
    color: #ffffff;
    transform: translateY(0px) scale(0.95);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    text-decoration: none;
}

.wa-start-chat-btn:active {
    transform: translateY(0);
}

.wa-start-chat-btn svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    flex-shrink: 0;
}

/* ---------- Toggle button arrow state (open) ---------- */
.wa-widget-btn.wa-btn-open svg.wa-icon-whatsapp {
    display: none;
}

.wa-widget-btn svg.wa-icon-close {
    display: none;
}

.wa-widget-btn.wa-btn-open svg.wa-icon-close {
    display: block;
}

.wa-widget-btn.wa-btn-open::before {
    animation: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .wa-widget-btn {
        width: 54px;
        height: 54px;
        bottom: 18px;
        right: 18px;
    }

    .wa-widget-btn svg {
        width: 28px;
        height: 28px;
    }

    .wa-chat-popup {
        right: 12px;
        bottom: 84px;
        width: calc(100vw - 24px);
        border-radius: 14px;
    }

    .wa-chat-header {
        padding: 12px 14px;
    }

    .wa-chat-avatar {
        width: 38px;
        background-color: white;
        height: 38px;
    }
}



.widget-online-dot {
    position: relative;
    bottom: 0;
    right: 35px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: #4ade80;
    border: 2px solid #fff;
    border-radius: 50%;
}