/* ============================================
   SOCIAL SHARING WIDGET - VIRAL DISTRIBUTION
   ============================================ */

.experts123-share-widget {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.experts123-share-widget.visible {
    opacity: 1;
}

/* Toggle Button */
.share-widget-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border: none;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-widget-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5);
}

.share-widget-toggle:active {
    transform: scale(0.95);
}

.share-widget-toggle svg {
    color: white;
    transition: transform 0.3s ease;
}

.share-widget-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.share-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #F59E0B;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    min-width: 24px;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.share-count.pulse {
    animation: sharePulse 0.6s ease;
}

@keyframes sharePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* Share Menu */
.share-menu {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    min-width: 320px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.share-menu[aria-hidden="false"],
.share-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.share-menu::before {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.share-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.share-menu-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.share-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.share-menu-close:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

/* Share Buttons */
.share-buttons {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #1a202c;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.share-btn:active {
    transform: translateY(0);
}

.share-btn svg {
    flex-shrink: 0;
}

/* Platform-specific colors */
.share-twitter {
    border-color: #1DA1F2;
}

.share-twitter:hover {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.share-facebook {
    border-color: #1877F2;
}

.share-facebook:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.share-linkedin {
    border-color: #0A66C2;
}

.share-linkedin:hover {
    background: #0A66C2;
    color: white;
    border-color: #0A66C2;
}

.share-reddit {
    border-color: #FF4500;
}

.share-reddit:hover {
    background: #FF4500;
    color: white;
    border-color: #FF4500;
}

.share-whatsapp {
    border-color: #25D366;
}

.share-whatsapp:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.share-copy {
    border-color: #8B5CF6;
}

.share-copy:hover {
    background: #8B5CF6;
    color: white;
    border-color: #8B5CF6;
}

.share-copy.copied {
    background: #10B981;
    color: white;
    border-color: #10B981;
}

/* Share Stats */
.share-stats {
    padding-top: 1rem;
    border-top: 2px solid #f3f4f6;
}

.share-count-text {
    margin: 0;
    font-size: 0.875rem;
    color: #718096;
    text-align: center;
}

.share-total {
    color: #8B5CF6;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .experts123-share-widget {
        right: 1rem;
    }

    .share-menu {
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .experts123-share-widget {
        position: fixed;
        right: auto;
        left: 50%;
        top: auto;
        bottom: 1rem;
        transform: translateX(-50%);
    }

    .share-widget-toggle {
        width: 64px;
        height: 64px;
    }

    .share-menu {
        position: fixed;
        right: auto;
        left: 50%;
        top: auto;
        bottom: 90px;
        transform: translateX(-50%) translateY(20px);
        width: calc(100vw - 2rem);
        max-width: 400px;
    }

    .share-menu[aria-hidden="false"],
    .share-menu.active {
        transform: translateX(-50%) translateY(0);
    }

    .share-menu::before {
        left: 50%;
        right: auto;
        top: auto;
        bottom: -10px;
        transform: translateX(-50%) rotate(90deg);
    }
}

/* Mobile Bottom Bar Alternative */
@media (max-width: 640px) {
    .experts123-share-widget.bottom-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        transform: none;
        background: white;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        border-radius: 20px 20px 0 0;
        padding: 1rem;
    }

    .experts123-share-widget.bottom-bar .share-widget-toggle {
        width: 100%;
        height: auto;
        padding: 1rem;
        border-radius: 12px;
    }

    .experts123-share-widget.bottom-bar .share-menu {
        position: relative;
        left: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        max-width: none;
        margin-top: 1rem;
        border-radius: 16px;
    }

    .experts123-share-widget.bottom-bar .share-menu::before {
        display: none;
    }
}

/* Accessibility */
.share-btn:focus,
.share-widget-toggle:focus,
.share-menu-close:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .experts123-share-widget,
    .share-menu,
    .share-btn,
    .share-widget-toggle {
        transition: none;
    }
}

