/*
 * Floating Action Buttons - iPhone Style
 * Custom styles to prevent conflicts
 */

/* Container for all floating buttons */
.floating-buttons-container {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 16px !important;
}

/* Base floating button style - iPhone squircle */
.floating-buttons-container .floating-button {
    width: 68px !important;
    height: 68px !important;
    border-radius: 18px !important;
    background: #25D366 !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    text-decoration: none !important;
    outline: none !important;
}

/* WhatsApp Button - Solid Green */
.floating-buttons-container .floating-button.whatsapp-btn {
    background: #25D366 !important;
}

.floating-buttons-container .floating-button.whatsapp-btn:hover {
    background: #20BA5A !important;
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.45), 0 6px 14px rgba(0, 0, 0, 0.2) !important;
}

/* AI Assistant Button - Solid Gold */
.floating-buttons-container .floating-button.ai-btn {
    background: #D4AF37 !important;
}

.floating-buttons-container .floating-button.ai-btn:hover {
    background: #C19B2A !important;
    box-shadow: 0 12px 32px rgba(212, 175, 55, 0.45), 0 6px 14px rgba(0, 0, 0, 0.2) !important;
}

/* Icon styling - Larger icons without increasing button size */
.floating-buttons-container .floating-button i {
    font-size: 42px !important;
    color: white !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15)) !important;
    line-height: 1 !important;
}

/* Hover effect */
.floating-buttons-container .floating-button:hover {
    transform: translateY(-4px) scale(1.05) !important;
}

/* Active/Click effect */
.floating-buttons-container .floating-button:active {
    transform: translateY(-2px) scale(1.02) !important;
}

/* Notification Badge */
.floating-buttons-container .notification-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: #FF3B30 !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4), 0 0 0 3px white !important;
    border: 2px solid white !important;
    line-height: 1 !important;
}

/* Chat Bubbles - Individual styling */
#whatsappChatBubble,
#aiChatBubble {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

#whatsappChatBubble .chat-bubble,
#aiChatBubble .chat-bubble {
    white-space: nowrap !important;
    display: inline-block !important;
}

#whatsappChatBubble:hover,
#aiChatBubble:hover {
    transform: translateX(-4px);
}

.rotating-bubble {
    animation: none !important;
}

/* Tablet and Mobile - Individual positioning to prevent overlap */
@media (max-width: 768px) {
    .floating-buttons-container {
        right: 16px !important;
        bottom: auto !important;
        gap: 0 !important;
        position: fixed !important;
    }

    /* WhatsApp Button - Lower position */
    .floating-buttons-container .floating-button.whatsapp-btn {
        position: fixed !important;
        bottom: 150px !important;
        right: 16px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 16px !important;
    }

    /* AI Button - Lower position */
    .floating-buttons-container .floating-button.ai-btn {
        position: fixed !important;
        bottom: 50px !important;
        right: 16px !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 16px !important;
    }

    .floating-buttons-container .floating-button i {
        font-size: 36px !important;
    }

    .floating-buttons-container .notification-badge {
        width: 22px !important;
        height: 22px !important;
        font-size: 11px !important;
        top: -3px !important;
        right: -3px !important;
    }

    /* Override desktop positions for mobile - align with fixed button positions */
    #whatsappChatBubble {
        bottom: 150px !important;
        right: 90px !important;
    }

    #aiChatBubble {
        bottom: 50px !important;
        right: 90px !important;
    }

    /* Tap feedback on mobile */
    .floating-buttons-container .floating-button:active {
        transform: scale(0.95) !important;
    }
}

/* Small phones - Individual positioning */
@media (max-width: 480px) {
    .floating-buttons-container {
        bottom: auto !important;
        gap: 0 !important;
    }

    /* WhatsApp Button - Lower position */
    .floating-buttons-container .floating-button.whatsapp-btn {
        position: fixed !important;
        bottom: 150px !important;
        right: 16px !important;
        width: 56px !important;
        height: 56px !important;
        border-radius: 14px !important;
    }

    /* AI Button - Lower position */
    .floating-buttons-container .floating-button.ai-btn {
        position: fixed !important;
        bottom: 50px !important;
        right: 16px !important;
        width: 56px !important;
        height: 56px !important;
        border-radius: 14px !important;
    }

    .floating-buttons-container .floating-button i {
        font-size: 34px !important;
    }

    #whatsappChatBubble {
        bottom: 150px !important;
        right: 85px !important;
    }

    #aiChatBubble {
        bottom: 50px !important;
        right: 85px !important;
    }
}

/* Very small screens */
@media (max-width: 375px) {
    /* WhatsApp Button */
    .floating-buttons-container .floating-button.whatsapp-btn {
        bottom: 150px !important;
    }

    /* AI Button */
    .floating-buttons-container .floating-button.ai-btn {
        bottom: 50px !important;
    }

    #whatsappChatBubble {
        bottom: 150px !important;
        right: 85px !important;
    }

    #aiChatBubble {
        bottom: 50px !important;
        right: 85px !important;
    }
}

/* Mobile bubble text adjustments */
@media (max-width: 768px) {
    #whatsappChatBubble .chat-bubble,
    #aiChatBubble .chat-bubble {
        padding: 0.55rem 0.8rem !important;
    }

    #whatsappChatBubble .chat-bubble p,
    #aiChatBubble .chat-bubble p {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
}
