/**
 * Social Sharing Buttons Component
 * Privacy-focused, native implementation for MindInsight
 */

.social-sharing {
    margin: 2rem 0;
    padding: 0.25rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.social-sharing-header {
    margin-bottom: 1rem;
    text-align: center;
}

.social-sharing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-sharing-subtitle {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* Platform-specific styling */
.social-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0c5cbf 100%);
    color: white;
}

.social-btn.facebook:hover {
    background: linear-gradient(135deg, #0c5cbf 0%, #0a4d9c 100%);
}

.social-btn.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
    color: white;
}

.social-btn.twitter:hover {
    background: linear-gradient(135deg, #0d8bd9 0%, #0a6fb8 100%);
}

.social-btn.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    color: white;
}

.social-btn.linkedin:hover {
    background: linear-gradient(135deg, #005885 0%, #004066 100%);
}

.social-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1ebe57 100%);
    color: white;
}

.social-btn.whatsapp:hover {
    background: linear-gradient(135deg, #1ebe57 0%, #17a348 100%);
}

.social-btn.instagram {
    background: linear-gradient(135deg, #e4405f 0%, #833ab4 50%, #fccc63 100%);
    color: white;
}

.social-btn.instagram:hover {
    background: linear-gradient(135deg, #d6336c 0%, #7829a3 50%, #f4b942 100%);
}

.social-btn.copy-link {
    background: linear-gradient(135deg, #6b73ff 0%, #5a67d8 100%);
    color: white;
}

.social-btn.copy-link:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
}

.social-btn.copy-link.copied {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

/* Icons */
.social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .social-sharing {
        margin: 1.5rem 0;
        padding: 0.25rem 1rem 1rem 1rem;
    }
    
    .social-buttons {
        gap: 0.5rem;
    }
    
    .social-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    .social-btn span {
        display: none;
    }
    
    .social-icon {
        width: 18px;
        height: 18px;
    }
    
    .social-sharing-title {
        font-size: 1rem;
    }
    
    .social-sharing-subtitle {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .social-buttons {
        justify-content: space-between;
    }
    
    .social-btn {
        flex: 1;
        justify-content: center;
        max-width: calc(50% - 0.25rem);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .social-sharing {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
    }
    
    .social-sharing-title {
        color: #f7fafc;
    }
    
    .social-sharing-subtitle {
        color: #a0aec0;
    }
}

/* Print styles */
@media print {
    .social-sharing {
        display: none;
    }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
    .social-btn {
        transition: none;
    }
    
    .social-btn:hover {
        transform: none;
    }
}

/* Focus styles for keyboard navigation */
.social-btn:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* Loading state for copy button */
.social-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.social-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}