/* floating_chat.css - Premium Live Chat Widget */
.wa-chat-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    font-family: 'Outfit', 'Inter', sans-serif;
    transition: all 0.4s ease;
}

/* Move UP if profile button exists */
.wa-chat-widget.has-profile-btn {
    bottom: 100px;
}

/* Floating Button - Matching Shortcut Bubble Style */
.wa-chat-btn {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 22px; /* Squircle matching shortcut bubble */
    border: 4px solid #ffffff;
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    position: relative;
    animation: chatBubblePulse 3s infinite;
}

@keyframes chatBubblePulse {
    0% { box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 15px 45px rgba(37, 99, 235, 0.7); transform: scale(1.05); }
    100% { box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4); }
}

.wa-chat-btn:hover {
    transform: rotate(5deg) scale(1.1);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.wa-chat-btn i {
    color: white;
    font-size: 1.8rem;
}

/* Online Indicator - Premium Style */
.wa-chat-btn::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background-color: #ef4444; /* Offline Red */
    border: 3px solid white;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wa-chat-widget.is-online .wa-chat-btn::after {
    background-color: #10b981; /* Online Green */
}

/* Chat Box Popup - Glassmorphism */
.wa-chat-box {
    position: absolute;
    bottom: 85px;
    left: 0;
    width: 340px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

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

/* Header */
.wa-chat-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wa-chat-profile {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wa-chat-profile i {
    color: white;
    font-size: 24px;
}

.wa-chat-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wa-chat-info p {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: 0.8;
    font-weight: 500;
}

/* Body */
.wa-chat-body {
    padding: 20px;
    background: #f8fafc;
    height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message Bubbles */
.wa-message-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
}

.wa-message {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 85%;
    position: relative;
    word-wrap: break-word;
    color: #1e293b; /* Explicit black color for messages */
}

.wa-msg-visitor {
    align-self: flex-end;
    background: #3b82f6;
    color: white;
    border-radius: 18px 18px 4px 18px;
}

.wa-msg-admin {
    align-self: flex-start;
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 18px 18px 18px 4px;
}

.wa-time {
    display: block;
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
}

.wa-msg-visitor .wa-time { color: white; text-align: right; }

/* Input Area */
.wa-chat-footer {
    padding: 15px 20px;
    background: white;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid #f1f5f9;
}

.wa-chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    outline: none;
    background: #f8fafc;
    color: #1e293b !important; /* Force black color to avoid global conflict */
    transition: all 0.3s;
}

.wa-chat-input:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.wa-chat-submit {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.wa-chat-submit:hover {
    transform: scale(1.05);
    background: #2563eb;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

/* Close Button */
.wa-chat-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.wa-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .wa-chat-widget {
        bottom: 20px;
        left: 20px;
    }
    .wa-chat-btn {
        width: 56px;
        height: 56px;
    }
    .wa-chat-box {
        width: calc(100vw - 40px); /* Full width minus margin */
        max-width: 350px;
        bottom: 75px;
        left: 0;
        max-height: 70vh;
    }
    .wa-chat-header {
        padding: 15px 20px;
    }
    .wa-chat-body {
        height: 320px;
        padding: 15px;
    }
    .wa-chat-footer {
        padding: 12px 15px;
        gap: 8px;
    }
    .wa-chat-input {
        padding: 10px 14px;
        font-size: 13px;
    }
    .wa-chat-submit {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
    }
}
