/* Floating Action Button (FAB) */

.floating-order-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    animation: fadeInUp 0.5s ease, float 3s ease-in-out infinite;
}

.floating-order-btn a {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.125rem;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-order-btn a:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.6);
}

.floating-order-btn .pulse-ring {
    position: absolute;
    inset: -8px;
    border: 3px solid #4F46E5;
    border-radius: 50px;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    opacity: 0;
}

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

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

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Responsive for mobile - smaller buttons */
@media (max-width: 640px) {
    .floating-order-btn {
        bottom: 12px;
        right: 12px;
    }
    
    .floating-order-btn a {
        width: 52px;
        height: 52px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .floating-order-btn .btn-text {
        display: none;
    }
    
    .floating-order-btn .material-symbols-outlined {
        font-size: 24px;
    }
    
    .floating-order-btn .notification-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        border-width: 2px;
        top: -3px;
        right: -3px;
    }
}

/* Dark mode adjustments */
.dark .floating-order-btn a {
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.dark .floating-order-btn a:hover {
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
}

/* Hide when scrolled to bottom (optional) */
.floating-order-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100px);
}

/* Notification Badge */
.floating-order-btn .notification-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: 12px;
    font-weight: bold;
    border: 3px solid white;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.dark .floating-order-btn .notification-badge {
    border-color: #1e293b;
}

/* Tooltip on hover (desktop only) */
@media (min-width: 1024px) {
    .floating-order-btn::before {
        content: 'اضغط للطلب السريع ⚡';
        position: absolute;
        bottom: calc(100% + 15px);
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 0.875rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    
    .floating-order-btn:hover::before {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    
    .dark .floating-order-btn::before {
        background: rgba(255, 255, 255, 0.9);
        color: #1e293b;
    }
}

/* Additional adjustments for floating call & WhatsApp buttons on mobile */
@media (max-width: 640px) {
    .call-float,
    .whatsapp-float {
        width: 52px;
        height: 52px;
    }
    
    .call-float .material-symbols-outlined {
        font-size: 22px !important;
    }
    
    .whatsapp-float svg {
        width: 22px !important;
        height: 22px !important;
    }
}
