/* Floating Button Style - Scoped & Protected */

/* 
 * Protection Strategy:
 * 1. Usage of ID Selector (#mfsb-floating-bar-container) for high specificity.
 * 2. 'all: initial' to strip theme styles (reset).
 * 3. Unique Class Names (mfsb-*) to avoid conflicts.
 */

#mfsb-floating-bar-container {
    /* Reset Inherited Styles */
    all: initial;
    box-sizing: border-box;
    
    /* Layout & Position */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999; /* Increased z-index */
    
    /* Flexbox Container */
    display: flex;
    align-items: center;
    gap: 18px;
    
    /* Visuals */
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 16px 32px;
    border-radius: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    
    /* Animation */
    animation: esbSlideUp 0.7s ease-out;
    
    /* Font Reset */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: normal;
}

#mfsb-floating-bar-container * {
    box-sizing: border-box;
}

@keyframes esbSlideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }
    to {
        bottom: 20px;
        opacity: 1;
    }
}

/* Button Styles */
#mfsb-floating-bar-container .mfsb-float-btn {
    /* Reset Link Styles */
    text-decoration: none;
    border: none;
    outline: none;
    background: none;
    padding: 0;
    margin: 0;
    
    /* Dimensions & Layout */
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Typography */
    font-size: 1.7rem;
    color: white;
    
    /* Effects */
    transition: all 0.35s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    
    -webkit-tap-highlight-color: transparent;
}

/* Hover Effects */
#mfsb-floating-bar-container .mfsb-float-btn:hover {
    transform: translateY(-6px) scale(1.12);
    color: white !important; /* Force white on hover */
    filter: brightness(1.1);
}

/* Icon Styles Reset */
#mfsb-floating-bar-container .mfsb-float-btn i {
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    color: white; /* Ensure icons are white */
}

/* Specific Colors (Scoped) */
#mfsb-floating-bar-container .whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

#mfsb-floating-bar-container .phone {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

#mfsb-floating-bar-container .location {
    background: linear-gradient(135deg, #f50057, #c51162);
}

#mfsb-floating-bar-container .instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

#mfsb-floating-bar-container .youtube {
    background: linear-gradient(135deg, #ff0000, #c4302b);
}

#mfsb-floating-bar-container .linkedin {
    background: linear-gradient(135deg, #0077b5, #005582);
}

#mfsb-floating-bar-container .email {
    background: linear-gradient(135deg, #dd4b39, #c23321);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    #mfsb-floating-bar-container {
        bottom: 12px;
        padding: 10px 20px;
        gap: 12px;
        border-radius: 50px;
        /* Ensure width constraint on mobile if needed */
        max-width: 95vw;
    }

    #mfsb-floating-bar-container .mfsb-float-btn {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }
}

@media (max-width: 360px) {
    #mfsb-floating-bar-container {
        padding: 8px 16px;
        gap: 10px;
    }

    #mfsb-floating-bar-container .mfsb-float-btn {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
}

/* Vertical Layout Override */
#mfsb-floating-bar-container.is-vertical {
    left: auto;
    right: 20px;
    transform: none; /* Override translate center */
    flex-direction: column;
    gap: 0;
    padding: 12px 12px;
    border-radius: 30px;
}

#mfsb-floating-bar-container.is-vertical .mfsb-float-btn {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    margin-top: 15px;
}

#mfsb-floating-bar-container.is-vertical .mfsb-float-btn:first-child {
    margin-top: 0;
}