/* WhatsApp Bubble Component Styles */

.whatsapp-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Bubble Button */
.whatsapp-bubble-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.whatsapp-bubble-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.whatsapp-bubble-btn:active {
    transform: scale(0.95);
}

/* Pulse Animation */
.whatsapp-bubble-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.8);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Chat Container */
.whatsapp-chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.whatsapp-chat-header {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    padding: 16px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.whatsapp-chat-header button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.whatsapp-chat-header button:hover {
    opacity: 0.8;
}

/* Messages Container */
.whatsapp-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message Styles */
.whatsapp-message {
    display: flex;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whatsapp-message.bot {
    justify-content: flex-start;
}

.whatsapp-message.bot p {
    background: white;
    padding: 10px 14px;
    border-radius: 8px;
    border-bottom-left-radius: 2px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.whatsapp-message.user {
    justify-content: flex-end;
}

.whatsapp-message.user p {
    background: #dcf8c6;
    padding: 10px 14px;
    border-radius: 8px;
    border-bottom-right-radius: 2px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    max-width: 70%;
    word-wrap: break-word;
}

/* Input Area */
.whatsapp-input-area {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.whatsapp-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-send-btn:active {
    transform: translateY(0);
}

/* Hidden State */
.whatsapp-chat-container.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 480px) {
    .whatsapp-bubble {
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-chat-container {
        width: calc(100vw - 32px);
        height: 60vh;
        max-height: 500px;
    }

    .whatsapp-bubble-btn {
        width: 56px;
        height: 56px;
    }
}

/* Scrollbar Styling */
.whatsapp-messages::-webkit-scrollbar {
    width: 6px;
}

.whatsapp-messages::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.whatsapp-messages::-webkit-scrollbar-thumb {
    background: #25d366;
    border-radius: 3px;
}

.whatsapp-messages::-webkit-scrollbar-thumb:hover {
    background: #128c7e;
}
