/* Share Button Styles - Magic UI Design System */

/* Container */
.share-button-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

/* Main Share FAB (Floating Action Button) */
.share-fab {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(16, 185, 129, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.share-fab:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.15),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(16, 185, 129, 0.2);
    background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-700) 100%);
}

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

/* Pulse animation for attention */
.share-fab::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 100%);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    opacity: 0.5;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* Share Options Container */
.share-options {
    position: absolute;
    bottom: 75px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-button-container.active .share-options {
    pointer-events: auto;
    opacity: 1;
}

/* Individual Share Option */
.share-option {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--text-secondary);
    text-decoration: none;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.share-button-container.active .share-option {
    transform: scale(1);
}

/* Platform-specific colors on hover */
.share-option:hover {
    transform: scale(1.1);
    color: white;
}

.share-option.share-x:hover {
    background: #000000;
}

.share-option.share-reddit:hover {
    background: #FF4500;
}

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

.share-option.share-instagram:hover {
    background: linear-gradient(45deg, #833AB4, #E1306C, #F77737);
}

/* Ripple effect on click */
.share-option::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    opacity: 0;
    transition: all 0.4s ease;
}

.share-option:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

/* Pop-in animation */
@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Toast notification for Instagram */
.share-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--border-default);
}

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

.share-toast strong {
    color: var(--text-primary);
    font-weight: 600;
}

.share-toast small {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .share-button-container {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .share-fab {
        width: 56px;
        height: 56px;
    }
    
    .share-fab i {
        width: 32px !important;
        height: 32px !important;
    }
    
    .share-option {
        width: 48px;
        height: 48px;
    }
    
    .share-option svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .share-options {
        bottom: 65px;
        gap: 0.625rem;
    }
    
    .share-toast {
        width: calc(100% - 2rem);
        left: 1rem;
        transform: translateX(0) translateY(100px);
        bottom: 1rem;
    }
    
    .share-toast.show {
        transform: translateX(0) translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .share-fab::before {
        animation: none;
    }
    
    .share-option,
    .share-fab,
    .share-options,
    .share-toast {
        transition: none;
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .share-option {
        background: var(--gray-800, #1f2937);
        color: var(--gray-300, #d1d5db);
        box-shadow: 
            0 4px 6px -1px rgba(0, 0, 0, 0.3),
            0 2px 4px -1px rgba(0, 0, 0, 0.2);
    }
    
    .share-toast {
        background: var(--gray-800, #1f2937);
        color: var(--gray-100, #f3f4f6);
        border-color: var(--gray-700, #374151);
    }
}