/**
 * Elegante Share-Buttons für BenimEvim
 * Responsive, moderne Social Media Integration
 */

/* Floating Share Bar */
.floating-share-bar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.floating-share-bar.hidden {
    right: -60px;
    opacity: 0;
}

/* Inline Share Buttons */
.inline-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

/* Share Button Base Styles */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    color: white;
    text-decoration: none;
}

.share-btn i {
    font-size: 20px;
    z-index: 2;
    position: relative;
}

/* Platform-spezifische Farben */
.share-btn.facebook {
    background: linear-gradient(135deg, #4267B2 0%, #365899 100%);
}

.share-btn.facebook:hover {
    background: linear-gradient(135deg, #365899 0%, #2d4373 100%);
}

.share-btn.linkedin {
    background: linear-gradient(135deg, #0077B5 0%, #005885 100%);
}

.share-btn.linkedin:hover {
    background: linear-gradient(135deg, #005885 0%, #004466 100%);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
}

.share-btn.whatsapp:hover {
    background: linear-gradient(135deg, #1DA851 0%, #128C3E 100%);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
}

.share-btn.twitter:hover {
    background: linear-gradient(135deg, #0d8bd9 0%, #0a6bb3 100%);
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
}

.share-btn.telegram:hover {
    background: linear-gradient(135deg, #0066aa 0%, #004488 100%);
}

.share-btn.email {
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
}

.share-btn.email:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #cc4a1f 100%);
}

/* Tooltip für Share Buttons */
.share-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.share-btn::after {
    content: '';
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid rgba(0,0,0,0.8);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.floating-share-bar .share-btn:hover::before,
.floating-share-bar .share-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Inline Share Buttons haben größere Buttons mit Text */
.inline-share-buttons .share-btn {
    width: auto;
    height: 45px;
    padding: 0 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

.inline-share-buttons .share-btn i {
    margin-right: 8px;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .floating-share-bar {
        right: 10px;
        gap: 8px;
    }
    
    .share-btn {
        width: 45px;
        height: 45px;
    }
    
    .share-btn i {
        font-size: 18px;
    }
    
    .inline-share-buttons {
        gap: 8px;
    }
    
    .inline-share-buttons .share-btn {
        height: 40px;
        padding: 0 16px;
        font-size: 13px;
    }
    
    .inline-share-buttons .share-btn i {
        font-size: 14px;
    }
    
    /* Tooltips ausblenden auf Mobile */
    .share-btn::before,
    .share-btn::after {
        display: none;
    }
}

/* Share Count Badge */
.share-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation beim Laden */
.share-btn {
    animation: shareButtonSlideIn 0.5s ease-out;
    animation-fill-mode: both;
}

@keyframes shareButtonSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Sequenzielle Animation */
.share-btn:nth-child(1) { animation-delay: 0.1s; }
.share-btn:nth-child(2) { animation-delay: 0.2s; }
.share-btn:nth-child(3) { animation-delay: 0.3s; }
.share-btn:nth-child(4) { animation-delay: 0.4s; }
.share-btn:nth-child(5) { animation-delay: 0.5s; }
.share-btn:nth-child(6) { animation-delay: 0.6s; }

/* Share Modal für erweiterte Optionen */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal.active {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.share-modal.active .share-modal-content {
    transform: scale(1);
}

/* Accessibility */
.share-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Print verstecken */
@media print {
    .floating-share-bar,
    .inline-share-buttons {
        display: none !important;
    }
}