/* ==========================================================================
   WPFSC - Floating Social Buttons Frontend CSS (Theme-Isolated with ID Specificity)
   ========================================================================== */

/* Universal Isolation Reset for Widget Container & Children */
#wpfsc-floating-widget-root,
#wpfsc-floating-widget-root * {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    list-style: none !important;
    float: none !important;
    clear: both !important;
    vertical-align: baseline !important;
}

/* Root Floating Container */
#wpfsc-floating-widget-root {
    position: fixed !important;
    z-index: 99999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    pointer-events: auto !important;
}

/* Screen Placements */
#wpfsc-floating-widget-root.wpfsc-pos-bottom-right {
    bottom: 24px !important;
    right: 24px !important;
    top: auto !important;
    left: auto !important;
    align-items: flex-end !important;
}

#wpfsc-floating-widget-root.wpfsc-pos-bottom-left {
    bottom: 24px !important;
    left: 24px !important;
    top: auto !important;
    right: auto !important;
    align-items: flex-start !important;
}

#wpfsc-floating-widget-root.wpfsc-pos-top-right {
    top: 24px !important;
    right: 24px !important;
    bottom: auto !important;
    left: auto !important;
    align-items: flex-end !important;
    flex-direction: column-reverse !important;
}

#wpfsc-floating-widget-root.wpfsc-pos-top-left {
    top: 24px !important;
    left: 24px !important;
    bottom: auto !important;
    right: auto !important;
    align-items: flex-start !important;
    flex-direction: column-reverse !important;
}

/* Button Shapes */
#wpfsc-floating-widget-root.wpfsc-style-circle a.wpfsc-item,
#wpfsc-floating-widget-root.wpfsc-style-circle div.wpfsc-trigger-btn {
    border-radius: 50% !important;
}

#wpfsc-floating-widget-root.wpfsc-style-squircle a.wpfsc-item,
#wpfsc-floating-widget-root.wpfsc-style-squircle div.wpfsc-trigger-btn {
    border-radius: 16px !important;
}

#wpfsc-floating-widget-root.wpfsc-style-square a.wpfsc-item,
#wpfsc-floating-widget-root.wpfsc-style-square div.wpfsc-trigger-btn {
    border-radius: 8px !important;
}

/* Trigger Button */
#wpfsc-floating-widget-root div.wpfsc-trigger-btn {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;
    max-width: 58px !important;
    max-height: 58px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32) !important;
    position: relative !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease !important;
    user-select: none !important;
    flex-shrink: 0 !important;
}

#wpfsc-floating-widget-root div.wpfsc-trigger-btn:hover {
    transform: scale(1.08) !important;
}

#wpfsc-floating-widget-root span.wpfsc-trigger-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
}

#wpfsc-floating-widget-root span.wpfsc-trigger-icon svg {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
}

/* Notification Badge */
#wpfsc-floating-widget-root span.wpfsc-badge {
    position: absolute !important;
    top: -8px !important;
    right: -6px !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 9px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5) !important;
    white-space: nowrap !important;
    animation: wpfsc-badge-pulse 2s infinite !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

@keyframes wpfsc-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Social List Stack */
#wpfsc-floating-widget-root.wpfsc-mode-expandable div.wpfsc-social-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    gap: 10px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#wpfsc-floating-widget-root.wpfsc-pos-top-right.wpfsc-mode-expandable div.wpfsc-social-list,
#wpfsc-floating-widget-root.wpfsc-pos-top-left.wpfsc-mode-expandable div.wpfsc-social-list {
    margin-bottom: 0 !important;
    margin-top: 12px !important;
}

#wpfsc-floating-widget-root div.wpfsc-social-list.wpfsc-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

#wpfsc-floating-widget-root.wpfsc-active div.wpfsc-social-list {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
}

/* Social Button Item */
#wpfsc-floating-widget-root a.wpfsc-item {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24) !important;
    position: relative !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    flex-shrink: 0 !important;
}

#wpfsc-floating-widget-root a.wpfsc-item:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38) !important;
}

#wpfsc-floating-widget-root span.wpfsc-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
}

#wpfsc-floating-widget-root span.wpfsc-icon svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
}

/* Tooltip Labels */
#wpfsc-floating-widget-root span.wpfsc-tooltip {
    position: absolute !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25) !important;
    z-index: 100 !important;
    display: block !important;
}

#wpfsc-floating-widget-root.wpfsc-pos-bottom-right span.wpfsc-tooltip,
#wpfsc-floating-widget-root.wpfsc-pos-top-right span.wpfsc-tooltip {
    right: 62px !important;
    top: 50% !important;
    left: auto !important;
    transform: translateY(-50%) translateX(6px) !important;
}

#wpfsc-floating-widget-root.wpfsc-pos-bottom-left span.wpfsc-tooltip,
#wpfsc-floating-widget-root.wpfsc-pos-top-left span.wpfsc-tooltip {
    left: 62px !important;
    top: 50% !important;
    right: auto !important;
    transform: translateY(-50%) translateX(-6px) !important;
}

#wpfsc-floating-widget-root a.wpfsc-item:hover span.wpfsc-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-50%) translateX(0) !important;
}

/* Persistent Social Bar Mode */
#wpfsc-floating-widget-root.wpfsc-mode-bar div.wpfsc-social-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Animations */
#wpfsc-floating-widget-root .wpfsc-anim-pulse {
    animation: wpfsc-pulse 2s infinite !important;
}

@keyframes wpfsc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

#wpfsc-floating-widget-root .wpfsc-anim-bounce {
    animation: wpfsc-bounce 2.5s infinite !important;
}

@keyframes wpfsc-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

#wpfsc-floating-widget-root .wpfsc-anim-glow {
    animation: wpfsc-glow 2s infinite alternate !important;
}

@keyframes wpfsc-glow {
    from { filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4)); }
    to { filter: drop-shadow(0 0 14px rgba(37, 211, 102, 0.9)); }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    #wpfsc-floating-widget-root.wpfsc-pos-bottom-right {
        bottom: 16px !important;
        right: 16px !important;
    }
    #wpfsc-floating-widget-root.wpfsc-pos-bottom-left {
        bottom: 16px !important;
        left: 16px !important;
    }
    #wpfsc-floating-widget-root div.wpfsc-trigger-btn {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
    }
    #wpfsc-floating-widget-root a.wpfsc-item {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
}
