/* assets/css/chat-widget.css */

/* Floating Button */
.wa-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 100;
    /* Reduced to 100 (Safe low value above navbar 90 but below modal 1050) */
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: waPulse 2s infinite;
}

.wa-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.wa-chat-btn i {
    margin-top: 2px;
    /* Visual adjustment */
}

/* Pulse Animation */
@keyframes waPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Chat Box Popup */
.wa-chat-box {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 320px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 100;
    /* Reduced to 100 */
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid #f0f0f0;
}

.wa-chat-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.wa-chat-header {
    background: #075E54;
    color: white;
    padding: 20px;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.wa-chat-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.wa-chat-close:hover {
    color: white;
}

.wa-profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-avatar {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    padding: 2px;
}

.wa-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.wa-status h6 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.wa-status span {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Body */
.wa-chat-body {
    padding: 20px;
    background: #e5ddd5;
    /* WhatsApp default bg color */
    background-image: url("https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png");
    /* Subtle pattern */
    background-size: 300px;
}

.wa-message-bubble {
    background: white;
    padding: 12px 15px;
    border-radius: 0 15px 15px 15px;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
}

.wa-message-time {
    display: block;
    text-align: right;
    font-size: 0.65rem;
    color: #999;
    margin-top: 5px;
}

/* Footer / Input Area */
.wa-chat-footer {
    padding: 15px;
    background: white;
    text-align: center;
}

.btn-wa-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: white;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    width: 100%;
    transition: background 0.2s;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-wa-start:hover {
    background: #20bd5a;
    color: white;
    transform: translateY(-2px);
}