/* Floating Elements Fix - Prevents Overlaps */

/* Main Content Safe Zones */
body {
    padding-bottom: 8rem !important;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 12rem !important;
    }
}

/* Z-Index Management */
.crisp-client {
    z-index: 100 !important;
}

.crisp-client .crisp-1rjpbb7 {
    bottom: 8rem !important;
}

/* WhatsApp Widget Positioning */
#whatsapp-support {
    bottom: 1rem !important;
    right: 1rem !important;
    z-index: 30 !important;
}

/* Guarantee Badge - Move far left to avoid WhatsApp */
.guarantee-badge,
[class*="guarantee"],
[id*="guarantee"] {
    bottom: 1rem !important;
    left: 1rem !important;
    right: auto !important;
    z-index: 25 !important;
}

/* Social Proof Notifications - Move up to avoid overlap */
#social-proof-container {
    bottom: 6rem !important;
    left: 1rem !important;
    z-index: 20 !important;
}

/* Chat Triggers - Position above WhatsApp */
.chat-trigger-btn {
    bottom: 6rem !important;
    right: 1rem !important;
    z-index: 35 !important;
}

/* Hide Multiple Chat Widgets */
.crisp-client,
#crisp-chatbox {
    display: none !important;
}

/* Exit Intent Modal */
#exit-intent-modal {
    z-index: 9998 !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    #whatsapp-support {
        bottom: 1rem !important;
        right: 1rem !important;
    }
    
    .guarantee-badge,
    [class*="guarantee"],
    [id*="guarantee"] {
        bottom: 1rem !important;
        left: 1rem !important;
        right: auto !important;
    }
    
    .chat-trigger-btn {
        bottom: 6rem !important;
        right: 1rem !important;
    }
    
    #social-proof-container {
        bottom: 6rem !important;
        left: 1rem !important;
        right: auto !important;
        max-width: 250px !important;
    }
    
    .crisp-client .crisp-1rjpbb7 {
        bottom: 12rem !important;
    }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    #whatsapp-support {
        bottom: 1.5rem !important;
        right: 1.5rem !important;
    }
    
    .guarantee-badge,
    [class*="guarantee"] {
        bottom: 1.5rem !important;
        right: 6.5rem !important;
    }
    
    .chat-trigger-btn {
        bottom: 5rem !important;
        right: 7rem !important;
    }
}

/* Prevent Content Overlap */
main,
.main-content,
section:last-child {
    margin-bottom: 8rem !important;
}

@media (max-width: 768px) {
    main,
    .main-content,
    section:last-child {
        margin-bottom: 12rem !important;
    }
}

/* Hide Elements During Modal */
.modal-open .hide-on-modal-open {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.8) !important;
}

/* Smooth Transitions */
#whatsapp-support,
.guarantee-badge,
.chat-trigger-btn,
#social-proof-container > div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Hover Effects - Reduced Scale */
#whatsapp-support:hover,
.guarantee-badge:hover {
    transform: scale(1.02) !important;
}

.chat-trigger-btn:hover {
    transform: scale(1.05) !important;
}

/* Ensure No Overlap with Footer */
footer {
    margin-top: 4rem !important;
}