/*
 * Share component styles for pepguide.ai
 * Floating share bar, mobile share bar, and end-of-article CTA
 */

/* Floating Share Bar (Desktop) */
.share-floating {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 12px;
    display: flex;
}

.share-floating.visible {
    opacity: 1;
    visibility: visible;
}

/* Mobile Share Bar */
.share-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    padding: 12px 24px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: all 0.3s ease;
    display: none;
}

.share-mobile.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-mobile .share-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

/* Share Buttons */
.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f8fafc;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    text-decoration: none;
}

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

/* Platform-specific hover colors */
.share-button.copy:hover {
    background: #0ea5e9;
    color: white;
}

.share-button.twitter:hover {
    background: #000000;
    color: white;
}

.share-button.reddit:hover {
    background: #ff4500;
    color: white;
}

.share-button.linkedin:hover {
    background: #0077b5;
    color: white;
}

.share-button.whatsapp:hover {
    background: #25d366;
    color: white;
}

.share-button.telegram:hover {
    background: #0088cc;
    color: white;
}

.share-button.native:hover {
    background: #0ea5e9;
    color: white;
}

/* Mobile share button sizing */
.share-mobile .share-button {
    width: 36px;
    height: 36px;
}

/* End-of-Article Share CTA */
.share-end-article {
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 32px;
    margin: 48px 0;
    text-align: center;
}

.share-end-article h3 {
    color: #1f2937;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-family: 'Inter', sans-serif;
}

.share-end-article p {
    color: #64748b;
    margin: 0 0 24px 0;
    font-size: 16px;
}

.share-end-article .share-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Share Tooltip */
.share-tooltip {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.share-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}

.share-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

/* Share SVG Icons Styling */
.share-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.share-mobile .share-button svg {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 767px) {
    .share-floating {
        display: none;
    }
    
    .share-mobile {
        display: block;
    }
    
    .share-end-article {
        padding: 24px;
    }
    
    .share-end-article h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .share-end-article .share-buttons {
        gap: 12px;
    }
    
    .share-mobile .share-buttons {
        gap: 12px;
    }
    
    .share-mobile {
        padding: 8px 16px;
    }
}

/* Animation for share buttons */
@keyframes shareButtonPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.share-button.copied {
    animation: shareButtonPulse 0.3s ease-in-out;
}

/* Focus states for accessibility */
.share-button:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.share-button:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .share-button {
        border: 2px solid currentColor;
    }
    
    .share-tooltip {
        border: 1px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .share-floating {
        transition: opacity 0.1s ease;
    }
    
    .share-mobile {
        transition: opacity 0.1s ease;
    }
    
    .share-button {
        transition: none;
    }
    
    .share-tooltip {
        transition: opacity 0.1s ease;
    }
}