/* ============================================ */
/* WHATSAPP CHAT BOT - Wider Version with Pulse */
/* ============================================ */

@keyframes typing {
    0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pulse animation for chat button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        transform: scale(1);
    }
}

/* Bounce animation for badge */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#whatsapp-chat-container {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 99999;
}

#whatsapp-chat-btn {
    position: relative;
    cursor: grab;
    user-select: none;
}

#whatsapp-chat-btn div {
    background: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse 2s infinite;
}

/* Red badge/bubble with emoji */
#whatsapp-chat-btn::after {
    content: "💬";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 50%;
    animation: bounce 1s infinite;
    z-index: 100001;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-weight: bold;
}

/* Hover effects - stop animation on hover for better UX */
#whatsapp-chat-btn:hover div {
    animation: none;
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

#whatsapp-chat-btn:hover::after {
    animation: none;
    transform: scale(1.1);
}

/* The rest of your CSS remains the same */
#whatsapp-chat-window {
    position: fixed;
    width: 450px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: 75vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 100001;
    display: none;
    flex-direction: column;
}

#whatsapp-chat-header {
    background: #075E54;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: grab;
}

#whatsapp-chat-header > div:first-of-type {
    flex: 1;
}

#whatsapp-chat-header > div:first-of-type div:first-child {
    font-weight: 600;
    font-size: 16px;
}

#whatsapp-chat-header > div:first-of-type div:last-child {
    font-size: 11px;
    opacity: 0.9;
}

#whatsapp-chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
}

#whatsapp-chat-header button:first-of-type {
    font-size: 14px;
}

#whatsapp-chat-header button:last-of-type {
    font-size: 20px;
}

#account-status-bar {
    background: #f5f5f5;
    padding: 8px 16px;
    font-size: 12px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#account-action-link {
    color: #25D366;
    text-decoration: none;
    font-weight: 600;
}

#whatsapp-messages {
    padding: 20px;
    background: #ECE5DD;
    flex: 1;
    overflow-y: auto;
    height: 100%;
}

.message {
    animation: fadeIn 0.3s ease;
}

/* Quick Reply Rows */
.quick-reply-row {
    padding: 10px 12px;
    background: #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #ddd;
}

.quick-reply-row:last-of-type {
    padding: 8px 12px;
    background: #fafafa;
    gap: 6px;
}

/* Quick Reply Buttons */
.whatsapp-quick-reply {
    background: #25D366;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.quick-reply-row:first-of-type .whatsapp-quick-reply {
    padding: 7px 12px;
    font-size: 12px;
}

.quick-reply-row:last-of-type .whatsapp-quick-reply {
    padding: 5px 8px;
    font-size: 10px;
}

/* Special colors for different button types */
.whatsapp-quick-reply[data-msg*="technical"],
.whatsapp-quick-reply[data-msg*="admin"] {
    background: #ff6b35;
}

.whatsapp-quick-reply[data-msg*="paid"],
.whatsapp-quick-reply[data-msg*="activate"] {
    background: #ff9800;
}

.whatsapp-quick-reply[data-msg*="Create Account"],
.whatsapp-quick-reply[data-msg*="register"] {
    background: #2196F3;
}

.whatsapp-quick-reply[data-msg*="Status"] {
    background: #4CAF50;
}

.whatsapp-quick-reply:hover {
    opacity: 0.85;
    transform: scale(0.96);
}

.input-area {
    padding: 12px;
    background: white;
    display: flex;
    gap: 8px;
    border-top: 1px solid #eee;
}

#whatsapp-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 13px;
}

#whatsapp-input:focus {
    border-color: #25D366;
}

#whatsapp-send {
    background: #25D366;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#whatsapp-send:hover {
    transform: scale(1.05);
}

.chat-footer {
    text-align: center;
    padding: 8px;
    font-size: 10px;
    color: #999;
    background: white;
}

.dragging {
    opacity: 0.8;
    cursor: grabbing !important;
}

#whatsapp-messages::-webkit-scrollbar {
    width: 6px;
}

#whatsapp-messages::-webkit-scrollbar-track {
    background: #ddd;
    border-radius: 3px;
}

#whatsapp-messages::-webkit-scrollbar-thumb {
    background: #075E54;
    border-radius: 3px;
}

@media (max-width: 550px) {
    #whatsapp-chat-window {
        width: calc(100vw - 40px);
        height: 480px;
    }
    
    .whatsapp-quick-reply {
        white-space: normal;
        font-size: 10px !important;
    }
}