/* 🚀 UNIVERSAL FLOATING SHARE - 2025 Modern Design */
/* Für alle Single-Pages: Artikel, Experten, Events, Tipps, Produkte */

/* 🎯 Floating Share Widget */
.lb-floating-share-universal {
    position: fixed;
    left: 20px;
    bottom: 150px; /* Über den Print/PDF-Buttons (die sind bei 20px) */
    z-index: 9997;
    display: flex;
    flex-direction: column-reverse; /* Toggle-Button unten, Menu oben */
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.lb-floating-share-universal.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 🎨 Share Toggle Button */
.lb-share-toggle-universal {
    width: 50px;
    height: 50px;
    background-image: linear-gradient(to right, #EDDE5D 0%, #F09819 100%);
    /* background: rgba(255, 255, 255, 0.95); */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
}

.lb-share-toggle-universal svg {
    width: 20px;
    height: 20px;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.lb-share-toggle-universal:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 1);
}

.lb-share-toggle-universal:hover svg {
    color: #2d3748;
    transform: scale(1.1) rotate(90deg);
}

/* 🎯 Share Menu */
.lb-share-menu-universal {
    display: flex;
    flex-direction: column; /* Normal von oben nach unten */
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.8); /* Von unten her einfahren + scale effect */
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: bottom; /* Animation von unten ausgehend */
}

.lb-floating-share-universal.menu-open .lb-share-menu-universal {
    opacity: 1;
    visibility: visible;
    transform: translateY(0px) scale(1); /* Nach oben bewegen */
}

/* 🔗 Individual Share Buttons */
.lb-share-btn-universal {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8),
                inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    /* Initial state: versteckt und unten positioniert */
    transform: translateY(20px) scale(0.5);
    opacity: 0;
}

/* Buttons werden sichtbar wenn Menu geöffnet */
.lb-floating-share-universal.menu-open .lb-share-btn-universal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.lb-share-btn-universal svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
}

.lb-share-btn-universal:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.lb-share-btn-universal:active {
    transform: translateY(-1px) scale(1.05);
}

/* 📱 Platform Colors */
.lb-share-btn-universal[data-platform="facebook"] {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
}

.lb-share-btn-universal[data-platform="facebook"]:hover {
    background: linear-gradient(135deg, #166fe5 0%, #1565c0 100%);
}

.lb-share-btn-universal[data-platform="twitter"] {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bf0 100%);
    color: white;
}

.lb-share-btn-universal[data-platform="twitter"]:hover {
    background: linear-gradient(135deg, #0d8bf0 0%, #0277bd 100%);
}

.lb-share-btn-universal[data-platform="linkedin"] {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    color: white;
}

.lb-share-btn-universal[data-platform="linkedin"]:hover {
    background: linear-gradient(135deg, #005885 0%, #004d69 100%);
}

.lb-share-btn-universal[data-platform="whatsapp"] {
    background: linear-gradient(135deg, #25d366 0%, #20b954 100%);
    color: white;
}

.lb-share-btn-universal[data-platform="whatsapp"]:hover {
    background: linear-gradient(135deg, #20b954 0%, #1a9946 100%);
}

.lb-share-btn-universal[data-platform="email"] {
    background: linear-gradient(135deg, #ea4335 0%, #d32f2f 100%);
    color: white;
}

.lb-share-btn-universal[data-platform="email"]:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
}

.lb-share-btn-universal[data-platform="copy"] {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.lb-share-btn-universal[data-platform="copy"]:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
}

/* 💬 Tooltips */
.lb-share-btn-universal::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 65px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 32, 44, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.lb-share-btn-universal::after {
    content: '';
    position: absolute;
    left: 57px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent rgba(26, 32, 44, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
}

.lb-share-btn-universal:hover::before,
.lb-share-btn-universal:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* 🎨 Staggered Animations - Von unten nach oben */
.lb-floating-share-universal.menu-open .lb-share-btn-universal:nth-child(1) {
    transition-delay: 0.35s; /* Facebook - zuletzt (oben) */
}

.lb-floating-share-universal.menu-open .lb-share-btn-universal:nth-child(2) {
    transition-delay: 0.3s; /* Twitter */
}

.lb-floating-share-universal.menu-open .lb-share-btn-universal:nth-child(3) {
    transition-delay: 0.25s; /* LinkedIn */
}

.lb-floating-share-universal.menu-open .lb-share-btn-universal:nth-child(4) {
    transition-delay: 0.2s; /* WhatsApp */
}

.lb-floating-share-universal.menu-open .lb-share-btn-universal:nth-child(5) {
    transition-delay: 0.15s; /* Email */
}

.lb-floating-share-universal.menu-open .lb-share-btn-universal:nth-child(6) {
    transition-delay: 0.1s; /* Copy - zuerst (unten) */
}

/* 📱 Mobile Responsive */
@media (max-width: 768px) {
    .lb-floating-share-universal {
        left: 50%;
        transform: translateX(-50%) translateY(100px);
        bottom: 20px; /* Gleiche Höhe wie Print/PDF-Buttons */
        flex-direction: row;
        gap: 12px;
    }
    .lb-share-menu-universal {
        position: relative;
        left: -8em;}
    .lb-floating-share-universal.show {
        transform: translateX(-25%) translateY(0);
    }
    
    .lb-share-toggle-universal {
        width: 55px;
        height: 55px;
    }
    
    .lb-share-toggle-universal svg {
        width: 18px;
        height: 18px;
    }
    
    .lb-share-menu-universal {
        flex-direction: row; /* Bei Mobile horizontal */
        gap: 10px;
        transform: translateY(10px) scale(0.8); /* Bei Mobile leicht von unten */
    }
    
    .lb-floating-share-universal.menu-open .lb-share-menu-universal {
        transform: translateY(-70px) scale(1); /* Bei Mobile deutlich nach oben */
    }
    
    .lb-share-btn-universal {
        width: 45px;
        height: 45px;
    }
    
    .lb-share-btn-universal svg {
        width: 20px;
        height: 20px;
    }
    
    /* Mobile Tooltips oben */
    .lb-share-btn-universal::before {
        right: 50%;
        top: -45px;
        transform: translateX(50%);
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .lb-share-btn-universal::after {
        right: 50%;
        top: -15px;
        transform: translateX(50%);
        border-width: 8px 6px 0 6px;
        border-color: rgba(26, 32, 44, 0.95) transparent transparent transparent;
    }
    
    .lb-share-btn-universal:hover::before,
    .lb-share-btn-universal:hover::after {
        transform: translateX(50%);
    }
}

/* 🔔 Success Notification */
.lb-share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(72, 187, 120, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.lb-share-notification.show {
    transform: translateX(0);
}

.lb-share-notification.error {
    background: rgba(245, 101, 101, 0.95);
}
