
#whatsapp-popup-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Float Button */
.whatsapp-float-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float-btn i {
    font-size: 32px;
    color: white;
}

/* Badge */
.whatsapp-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    animation: whatsappBadgePulse 1.5s infinite;
}

/* Popup Card */
.whatsapp-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.whatsapp-popup.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* Header */
.whatsapp-popup-header {
    background: linear-gradient(135deg, #25D366, #128C7E);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.whatsapp-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    background: white;
    padding: 2px;
}

.whatsapp-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.whatsapp-status {
    margin: 0;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: statusBlink 2s infinite;
}

.whatsapp-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.whatsapp-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Body */
.whatsapp-popup-body {
    padding: 20px;
    background: #ece5dd;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255,255,255,.03) 10px,
            rgba(255,255,255,.03) 20px
        );
}

.whatsapp-message {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
    animation: messageSlideIn 0.3s ease-out;
}

.whatsapp-message-bubble {
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    max-width: 80%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.whatsapp-message-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.whatsapp-message-bubble p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.whatsapp-message-bubble p:last-of-type {
    margin-bottom: 8px;
}

.whatsapp-time {
    font-size: 11px;
    color: #999;
    float: right;
    margin-top: 5px;
}

/* Footer */
.whatsapp-popup-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
}

.whatsapp-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.whatsapp-input:focus {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.whatsapp-send-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.whatsapp-send-btn:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-send-btn i {
    font-size: 18px;
}

/* Animations */
@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

@keyframes whatsappBadgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes statusBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .whatsapp-popup {
        width: calc(100vw - 40px);
        right: 20px;
    }
    
    .whatsapp-float-btn {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float-btn i {
        font-size: 28px;
    }
    
    #whatsapp-popup-container {
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 360px) {
    .whatsapp-popup {
        width: calc(100vw - 30px);
        bottom: 70px;
    }
    
    .whatsapp-send-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}
