/* Social Share Plugin Styles */
/* Prevent conflicts by using specific class names */

/* Main container */
#social-share-container.ssp-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Buttons wrapper */
.ssp-buttons-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    max-width: 100%;
    pointer-events: auto;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Individual buttons */
.ssp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: none;
    border-radius: 50%;
    text-decoration: none;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 48px;
    height: 48px;
    position: relative;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    user-select: none;
    -webkit-user-select: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Button icons */
.ssp-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* Share button */
.ssp-share {
    background: rgba(255, 255, 255, 0.9);
    color: #6c757d;
}

.ssp-share:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.ssp-share:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.2);
}

.ssp-share:hover svg {
    opacity: 1;
    transform: rotate(15deg);
}

/* Button hover effects */
.ssp-btn:hover {
    background: #007bff;
    color: white;
}

.ssp-btn:hover svg {
    opacity: 1;
    transform: rotate(15deg) scale(1.1);
}

/* Focus states for accessibility */
.ssp-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Success animation for copy button */
@keyframes ssp-copy-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background: #28a745; }
    100% { transform: scale(1); }
}

.ssp-copy.success {
    animation: ssp-copy-success 0.6s ease-in-out;
}

/* Custom position class */
#social-share-container.ssp-custom-position {
    position: fixed !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .ssp-buttons-wrapper {
        padding: 12px 20px;
        border-radius: 40px;
    }
    
    .ssp-btn {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
    
    .ssp-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Desktop optimizations */
@media (min-width: 769px) {
    .ssp-buttons-wrapper {
        max-width: 200px;
        margin: 0 auto;
        border-radius: 50px;
    }
}

/* Animation for container appearance */
@keyframes ssp-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ssp-container {
    animation: ssp-slide-up 0.5s ease-out;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ssp-buttons-wrapper {
        background: rgba(0, 0, 0, 0.95);
        border-top: 2px solid #ffffff;
    }
    
    .ssp-btn {
        border: 2px solid transparent;
    }
    
    .ssp-btn:hover,
    .ssp-btn:focus {
        border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ssp-btn,
    .ssp-btn svg {
        transition: none;
    }
    
    .ssp-container {
        animation: none;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .ssp-buttons-wrapper {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Light mode adjustments */
@media (prefers-color-scheme: light) {
    .ssp-buttons-wrapper {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    /* Keep button text white for better visibility */
    .ssp-btn {
        color: white !important;
    }
    
    /* Share label stays black in light mode */
    .ssp-share-label {
        color: black !important;
    }
}

/* Print styles - hide on print */
@media print {
    #social-share-container {
        display: none !important;
    }
}

/* Ensure buttons are above other elements */
#social-share-container,
#social-share-container * {
    z-index: 9999;
}

/* Loading state */
.ssp-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ssp-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: ssp-spin 1s linear infinite;
}

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