/* ================================
   FLOATING CONTACT BUTTONS
   ================================ */

.floating-contact-buttons {
    position: fixed;
    left: 25px;
    bottom: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: slideInLeft 0.8s ease-out;
}

[dir="rtl"] .floating-contact-buttons {
    left: auto;
    right: 25px;
}

.contact-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.contact-btn:hover::before {
    width: 100px;
    height: 100px;
}

.contact-btn i {
    font-size: 1.8rem;
    z-index: 1;
}

/* Telegram Button */
.contact-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
}

.contact-btn.telegram:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.5);
}

/* WhatsApp Button */
.contact-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.contact-btn.whatsapp:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* Tooltip */
.contact-btn .tooltip {
    position: absolute;
    left: 75px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[dir="rtl"] .contact-btn .tooltip {
    left: auto;
    right: 75px;
}

.contact-btn .tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.9);
}

[dir="rtl"] .contact-btn .tooltip::before {
    right: auto;
    left: 100%;
    border-right-color: transparent;
    border-left-color: rgba(0, 0, 0, 0.9);
}

.contact-btn:hover .tooltip {
    opacity: 1;
    left: 80px;
}

[dir="rtl"] .contact-btn:hover .tooltip {
    left: auto;
    right: 80px;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.contact-btn.whatsapp {
    animation: pulse 2s infinite;
}

.contact-btn.telegram {
    animation: pulse 2s infinite;
    animation-delay: 1s;
}

/* Slide In Animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .floating-contact-buttons {
        left: 15px;
        bottom: 15px;
        gap: 12px;
    }
    
    [dir="rtl"] .floating-contact-buttons {
        left: auto;
        right: 15px;
    }
    
    .contact-btn {
        width: 55px;
        height: 55px;
    }
    
    .contact-btn i {
        font-size: 1.6rem;
    }
    
    .contact-btn .tooltip {
        display: none; /* إخفاء tooltip على الموبايل */
    }
}

@media (max-width: 480px) {
    .floating-contact-buttons {
        left: 10px;
        bottom: 10px;
        gap: 10px;
    }
    
    [dir="rtl"] .floating-contact-buttons {
        left: auto;
        right: 10px;
    }
    
    .contact-btn {
        width: 50px;
        height: 50px;
    }
    
    .contact-btn i {
        font-size: 1.4rem;
    }
}

/* Dark Mode Support */
body.dark-mode .contact-btn .tooltip {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
}

body.dark-mode .contact-btn .tooltip::before {
    border-right-color: rgba(255, 255, 255, 0.95);
}

[dir="rtl"] body.dark-mode .contact-btn .tooltip::before {
    border-right-color: transparent;
    border-left-color: rgba(255, 255, 255, 0.95);
}
