/**
 * Modern 3D CSS for Smart Floating Share Buttons
 * Professional, Premium, and Elegant Design
 */

:root {
    --wpfss-transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --wpfss-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
    --wpfss-shadow-md: 0 8px 16px rgba(0, 0, 0, 0.15);
    --wpfss-shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.2);
    --wpfss-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.wpfss-floating-bar {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--wpfss-transition);
    padding: 12px;
    backdrop-filter: blur(10px);
}

/* Floating Bar Positions */
.wpfss-pos-left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding-left: 8px;
}

.wpfss-pos-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding-right: 8px;
}

.wpfss-pos-bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 10px 15px;
    box-shadow: var(--wpfss-shadow-xl);
}

/* Modern 3D Button Styles */
.wpfss-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    transition: var(--wpfss-transition);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    
    /* 3D Effect */
    transform-style: preserve-3d;
    perspective: 1000px;
    
    /* Gradient and Shadow */
    background: linear-gradient(135deg, var(--btn-color-light), var(--btn-color-dark));
    box-shadow: 
        var(--wpfss-shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.wpfss-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.wpfss-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

/* Hover Effects */
.wpfss-btn:hover {
    transform: translateY(-4px);
    box-shadow: 
        var(--wpfss-shadow-xl),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

.wpfss-btn:hover::before {
    opacity: 1;
}

.wpfss-btn:active {
    transform: translateY(-2px);
    box-shadow: 
        var(--wpfss-shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* Ripple Effect on Click */
.wpfss-btn:active::after {
    width: 300px;
    height: 300px;
    transition: width 0.6s, height 0.6s;
}

/* Button Shapes */
.wpfss-shape-square .wpfss-btn {
    border-radius: 4px;
}

.wpfss-shape-rounded .wpfss-btn {
    border-radius: 12px;
}

.wpfss-shape-circular .wpfss-btn {
    border-radius: 50%;
}

.wpfss-shape-pill .wpfss-btn {
    border-radius: 50px;
}

.wpfss-shape-custom .wpfss-btn {
    border-radius: 8px;
}

/* Button Sizes */
.wpfss-size-small .wpfss-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.wpfss-size-medium .wpfss-btn {
    width: 50px;
    height: 50px;
    font-size: 22px;
}

.wpfss-size-large .wpfss-btn {
    width: 60px;
    height: 60px;
    font-size: 26px;
}

/* Icon Styling */
.wpfss-btn .wpfss-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.wpfss-btn .wpfss-icon svg {
    width: 65%;
    height: 65%;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: var(--wpfss-transition);
}

.wpfss-btn:hover .wpfss-icon svg {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Premium Animations */
.wpfss-anim-fade {
    animation: wpfssFadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.wpfss-anim-slide {
    animation: wpfssSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.wpfss-anim-bounce {
    animation: wpfssBounce 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.wpfss-anim-scale {
    animation: wpfssScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes wpfssFadeIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes wpfssSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px) translateY(-50%);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(-50%);
    }
}

.wpfss-pos-right.wpfss-anim-slide {
    animation-name: wpfssSlideInRight;
}

@keyframes wpfssSlideInRight {
    from {
        opacity: 0;
        transform: translateX(30px) translateY(-50%);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(-50%);
    }
}

@keyframes wpfssBounce {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
    }
    70% {
        transform: translateY(-50%) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

@keyframes wpfssScale {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* Mobile Sticky Bar */
@media (max-width: 768px) {
    .wpfss-floating-bar {
        gap: 0;
        padding: 0;
    }

    .wpfss-mobile-sticky {
        position: fixed;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        transform: none !important;
        flex-direction: row !important;
        width: 100% !important;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95)) !important;
        backdrop-filter: blur(20px) !important;
        padding: 8px 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
        justify-content: space-around !important;
        gap: 0 !important;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .wpfss-mobile-sticky .wpfss-btn {
        flex: 1;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        width: 100% !important;
        height: 50px !important;
        background: transparent !important;
        position: relative;
    }

    .wpfss-mobile-sticky .wpfss-btn::before,
    .wpfss-mobile-sticky .wpfss-btn::after {
        display: none;
    }

    .wpfss-mobile-sticky .wpfss-btn:hover {
        background: rgba(0, 0, 0, 0.05) !important;
        transform: none !important;
        box-shadow: none !important;
    }

    .wpfss-mobile-sticky .wpfss-btn .wpfss-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* Inline/Shortcode Container */
.wpfss-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
    align-items: center;
    justify-content: flex-start;
}

.wpfss-context-inline .wpfss-btn {
    width: 44px;
    height: 44px;
}

.wpfss-context-shortcode .wpfss-btn {
    width: 48px;
    height: 48px;
}

/* Shortcode Shape Styles */
.wpfss-context-shortcode.wpfss-shape-square .wpfss-btn {
    border-radius: 4px;
}

.wpfss-context-shortcode.wpfss-shape-rounded .wpfss-btn {
    border-radius: 12px;
}

.wpfss-context-shortcode.wpfss-shape-circular .wpfss-btn {
    border-radius: 50%;
}

.wpfss-context-shortcode.wpfss-shape-pill .wpfss-btn {
    border-radius: 50px;
}

/* Shortcode Size Styles */
.wpfss-context-shortcode.wpfss-size-small .wpfss-btn {
    width: 36px;
    height: 36px;
}

.wpfss-context-shortcode.wpfss-size-medium .wpfss-btn {
    width: 48px;
    height: 48px;
}

.wpfss-context-shortcode.wpfss-size-large .wpfss-btn {
    width: 60px;
    height: 60px;
}

/* Share Counter Badge */
.wpfss-counter {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 9px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B6B, #EE5A6F);
    color: #fff;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    z-index: 2;
    animation: wpfssCounterPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wpfssCounterPop {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Individual Platform Colors with Gradients */
.wpfss-btn-facebook {
    --btn-color-light: #1877F2;
    --btn-color-dark: #0A66C2;
}

.wpfss-btn-twitter {
    --btn-color-light: #000000;
    --btn-color-dark: #1a1a1a;
}

.wpfss-btn-whatsapp {
    --btn-color-light: #25D366;
    --btn-color-dark: #1BA854;
}

.wpfss-btn-linkedin {
    --btn-color-light: #0077b5;
    --btn-color-dark: #005885;
}

.wpfss-btn-pinterest {
    --btn-color-light: #E60023;
    --btn-color-dark: #C40016;
}

.wpfss-btn-telegram {
    --btn-color-light: #0088cc;
    --btn-color-dark: #006BA3;
}

.wpfss-btn-reddit {
    --btn-color-light: #FF4500;
    --btn-color-dark: #D63C00;
}

.wpfss-btn-copy {
    --btn-color-light: #607D8B;
    --btn-color-dark: #455A64;
}

.wpfss-btn-email {
    --btn-color-light: #7f8c8d;
    --btn-color-dark: #5a6c7d;
}

/* Accessibility */
.wpfss-btn:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .wpfss-floating-bar,
    .wpfss-container {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wpfss-pos-bottom {
        background: rgba(30, 30, 30, 0.95);
    }

    .wpfss-mobile-sticky {
        background: linear-gradient(180deg, rgba(30, 30, 30, 0.98), rgba(30, 30, 30, 0.95)) !important;
        border-top-color: rgba(255, 255, 255, 0.1);
    }

    .wpfss-mobile-sticky .wpfss-btn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }
}
