/*
═══════════════════════════════════════════════════════════════
    WhatsApp Floating Button - زر واتساب عائم احترافي
═══════════════════════════════════════════════════════════════
*/

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    transition: all 0.3s ease;
}

.whatsapp-button {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    animation: pulse 2s infinite;
}

.whatsapp-button:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.7);
}

.whatsapp-button i {
    font-size: 32px;
    color: white;
}

/* تأثير النبض */
@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5), 0 0 0 15px rgba(37, 211, 102, 0.2);
    }
    100% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    }
}

/* رسالة الترحيب */
.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: white;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 85px;
}

.whatsapp-tooltip strong {
    display: block;
    color: #25D366;
    font-size: 14px;
    margin-bottom: 3px;
}

.whatsapp-tooltip span {
    color: #666;
    font-size: 13px;
}

/* استجابة للموبايل */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
    }
    
    .whatsapp-button {
        width: 60px;
        height: 60px;
    }
    
    .whatsapp-button i {
        font-size: 28px;
    }
    
    /* إخفاء الرسالة في الموبايل */
    .whatsapp-tooltip {
        display: none;
    }
}

/* الوضع الليلي */
body.dark-mode .whatsapp-tooltip {
    background: #1f2937;
    color: #e5e7eb;
}

body.dark-mode .whatsapp-tooltip::after {
    border-left-color: #1f2937;
}

body.dark-mode .whatsapp-tooltip strong {
    color: #25D366;
}

body.dark-mode .whatsapp-tooltip span {
    color: #9ca3af;
}

/* تأثير الدخول */
.whatsapp-float {
    animation: slideInUp 0.5s ease-out;
}

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

/* Badge للإشعارات (اختياري) */
.whatsapp-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 3px solid white;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}
