/**
 * Floating Social Share Buttons
 * Sticky share buttons on the side of the page
 */

.floating-share-buttons {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(-100px);
    z-index: 998;
    transition: transform 0.3s ease;
}

.floating-share-buttons.visible {
    transform: translateY(-50%) translateX(0);
}

.floating-share-buttons.near-footer {
    opacity: 0.5;
}

.share-buttons-container {
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.share-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-bottom: 5px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.share-btn:hover::before {
    width: 100%;
    height: 100%;
}

.share-btn i {
    font-size: 20px;
    position: relative;
    z-index: 1;
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Platform-specific colors */
.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0C63D4 100%);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #0C85D0 100%);
}

.share-btn.email {
    background: linear-gradient(135deg, #EA4335 0%, #C5221F 100%);
}

.share-btn.messenger {
    background: linear-gradient(135deg, #00B2FF 0%, #006AFF 100%);
}

.share-btn.viber {
    background: linear-gradient(135deg, #7360F2 0%, #5B4FD1 100%);
}

.share-btn.wechat {
    background: linear-gradient(135deg, #09B83E 0%, #078C2E 100%);
}

.share-btn.copy-link {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
}

/* Hover effects */
.share-btn.whatsapp:hover {
    background: #25D366;
}

.share-btn.facebook:hover {
    background: #1877F2;
}

.share-btn.twitter:hover {
    background: #1DA1F2;
}

.share-btn.email:hover {
    background: #EA4335;
}

.share-btn.messenger:hover {
    background: #00B2FF;
}

.share-btn.viber:hover {
    background: #7360F2;
}

.share-btn.wechat:hover {
    background: #09B83E;
}

.share-btn.copy-link:hover {
    background: #4B5563;
}

/* Tooltip on hover */
.share-btn::after {
    content: attr(title);
    position: absolute;
    left: 60px;
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.share-btn:hover::after {
    opacity: 1;
}

/* WeChat QR Modal */
.wechat-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.wechat-qr-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    position: relative;
    max-width: 300px;
    animation: slideUp 0.3s ease;
}

.wechat-qr-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 30px;
    color: #9ca3af;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.wechat-qr-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.wechat-qr-content h3 {
    margin: 0 0 20px;
    color: #1f2937;
    font-size: 18px;
}

.wechat-qr-content img {
    width: 200px;
    height: 200px;
    margin-bottom: 15px;
}

.wechat-qr-content p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* Share Notification */
.share-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.share-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .floating-share-buttons {
        left: auto;
        right: 10px;
        top: auto;
        bottom: 80px;
        transform: translateY(0) translateX(100px);
    }
    
    .floating-share-buttons.visible {
        transform: translateY(0) translateX(0);
    }
    
    .share-buttons-container {
        flex-direction: row;
        padding: 10px 15px;
        border-radius: 50px;
        overflow-x: auto;
        max-width: calc(100vw - 20px);
    }
    
    .share-label {
        writing-mode: horizontal-tb;
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .share-btn i {
        font-size: 18px;
    }
    
    .share-btn::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .share-btn {
        width: 36px;
        height: 36px;
    }
    
    .share-btn i {
        font-size: 16px;
    }
    
    .share-buttons-container {
        gap: 8px;
        padding: 8px 12px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print: hide share buttons */
@media print {
    .floating-share-buttons {
        display: none !important;
    }
}
