/* Floating Contact Buttons */
.b2b-floating-contact {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Position variants */
.b2b-floating-contact.bottom-right {
    bottom: 30px;
    right: 30px;
}

.b2b-floating-contact.bottom-left {
    bottom: 30px;
    left: 30px;
}

.b2b-floating-contact.top-right {
    top: 100px;
    right: 30px;
}

.b2b-floating-contact.top-left {
    top: 100px;
    left: 30px;
}

/* Main contact button */
.floating-main-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--b2b-primary-color, #007cba), var(--b2b-primary-hover, #005a87));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--b2b-primary-shadow, rgba(0, 124, 186, 0.3));
    transition: all 0.3s ease;
    color: white;
    position: relative;
    overflow: hidden;
}

.floating-main-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px var(--b2b-primary-shadow-hover, rgba(0, 124, 186, 0.4));
}

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

.floating-main-btn:hover:before {
    width: 100%;
    height: 100%;
}

/* Contact options container */
.floating-contact-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.b2b-floating-contact.active .floating-contact-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

/* Individual contact option */
.contact-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contact buttons */
.contact-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

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

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

.contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Specific button colors */
.email-btn {
    background: linear-gradient(135deg, #ea4335, #d33b2c);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #1ebe57);
}

.wechat-btn {
    background: linear-gradient(135deg, #1aad19, #0d8b0d);
}

.phone-btn {
    background: linear-gradient(135deg, #4285f4, #3367d6);
}

.top-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

/* Tooltips */
.contact-tooltip {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--b2b-tooltip-bg, rgba(0, 0, 0, 0.8));
    color: var(--b2b-tooltip-color, white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10000;
}

.contact-tooltip:after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--b2b-tooltip-bg, rgba(0, 0, 0, 0.8));
}

.contact-option:hover .contact-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Left position tooltips */
.b2b-floating-contact.bottom-left .contact-tooltip,
.b2b-floating-contact.top-left .contact-tooltip {
    right: auto;
    left: 60px;
}

.b2b-floating-contact.bottom-left .contact-tooltip:after,
.b2b-floating-contact.top-left .contact-tooltip:after {
    left: auto;
    right: 100%;
    border-left-color: transparent;
    border-right-color: var(--b2b-tooltip-bg, rgba(0, 0, 0, 0.8));
}

/* WeChat QR tooltip */
.wechat-tooltip {
    width: auto;
    min-width: 150px;
    padding: 15px;
    text-align: center;
}

.wechat-qr img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    display: block;
}

.wechat-qr span {
    display: block;
    font-size: 12px;
    color: #ccc;
}

/* Animation delays for staggered effect */
.contact-option:nth-child(1) {
    transition-delay: 0.1s;
}

.contact-option:nth-child(2) {
    transition-delay: 0.15s;
}

.contact-option:nth-child(3) {
    transition-delay: 0.2s;
}

.contact-option:nth-child(4) {
    transition-delay: 0.25s;
}

.contact-option:nth-child(5) {
    transition-delay: 0.3s;
}

/* Pulse animation for main button */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px var(--b2b-primary-shadow, rgba(0, 124, 186, 0.3));
    }
    50% {
        box-shadow: 0 4px 20px var(--b2b-primary-shadow-pulse, rgba(0, 124, 186, 0.6));
    }
    100% {
        box-shadow: 0 4px 20px var(--b2b-primary-shadow, rgba(0, 124, 186, 0.3));}
    }
}

.floating-main-btn.pulse {
    animation: pulse 2s infinite;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .b2b-floating-contact {
        bottom: 20px;
        right: 20px;
    }
    
    .b2b-floating-contact.bottom-left {
        left: 20px;
    }
    
    .floating-main-btn {
        width: 55px;
        height: 55px;
    }
    
    .contact-btn {
        width: 45px;
        height: 45px;
    }
    
    .contact-tooltip {
        font-size: 12px;
        padding: 6px 10px;
        right: 55px;
    }
    
    .b2b-floating-contact.bottom-left .contact-tooltip,
    .b2b-floating-contact.top-left .contact-tooltip {
        left: 55px;
    }
    
    .wechat-qr img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .floating-main-btn {
        width: 50px;
        height: 50px;
    }
    
    .contact-btn {
        width: 40px;
        height: 40px;
    }
    
    .contact-tooltip {
        right: 50px;
    }
    
    .b2b-floating-contact.bottom-left .contact-tooltip,
    .b2b-floating-contact.top-left .contact-tooltip {
        left: 50px;
    }
    

}

/* Hide on very small screens */
@media (max-width: 360px) {
    .b2b-floating-contact {
        display: none;
    }
}

/* Print styles */
@media print {
    .b2b-floating-contact {
        display: none !important;
    }
}