﻿/* WhatsApp Float Button */
.whatsapp-float-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .whatsapp-float-button:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
    }

    .whatsapp-float-button i {
        color: white;
        font-size: 32px;
    }

    .whatsapp-float-button .notification-badge {
        position: absolute;
        top: 0;
        right: 0;
        background: #ff0000;
        color: white;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
    }

/* WhatsApp Chat Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

    .whatsapp-widget.active {
        display: flex;
    }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whatsapp-header {
    background: #075E54;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.support-name {
    font-weight: 600;
    font-size: 16px;
}

.support-status {
    font-size: 12px;
    opacity: 0.9;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.whatsapp-body {
    flex: 1;
    padding: 20px;
    background: #ECE5DD;
    overflow-y: auto;
    min-height: 250px;
}

.chat-message {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.received p {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 5px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    display: inline-block;
}

.message-time {
    font-size: 11px;
    color: #667781;
    margin-left: 10px;
}

.whatsapp-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9e9e9;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
}

    .whatsapp-button:hover {
        background: #20BA5A;
        color: white;
    }

    .whatsapp-button i {
        font-size: 20px;
    }

/* Mobil Responsive */
@media (max-width: 768px) {
    .whatsapp-widget {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 90px;
    }

    .whatsapp-float-button {
        bottom: 20px;
        right: 20px;
    }
}
