/**
 * Share Modal Styles
 * Social sharing modal for website and images
 * 
 * @package Fotografiescu
 * @version 2.0.0
 */

/* ============================================================================
   Modal Base
   ============================================================================ */

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.share-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.share-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.share-modal-content {
    position: relative;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}

.share-modal.is-open .share-modal-content {
    transform: scale(1) translateY(0);
}

/* ============================================================================
   Modal Header
   ============================================================================ */

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.share-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.share-modal-close svg {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   Preview Sections
   ============================================================================ */

/* Image Preview */
.share-modal-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.share-preview-info {
    flex: 1;
    min-width: 0;
}

.share-preview-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-preview-info p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.share-preview-category {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Website Preview */
.share-modal-website-preview {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.website-preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.website-preview-logo {
    width: 48px;
    height: 48px;
    padding: 8px;
    background: #fff;
    border-radius: 10px;
}

.website-preview-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.website-preview-info p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   Share Buttons Grid
   ============================================================================ */

.share-modal-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 24px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.share-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.share-btn:hover svg {
    transform: scale(1.1);
}

.share-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Platform Colors */
.share-btn-facebook {
    background: rgba(24, 119, 242, 0.2);
    border-color: rgba(24, 119, 242, 0.3);
}
.share-btn-facebook:hover {
    background: rgba(24, 119, 242, 0.4);
}
.share-btn-facebook svg {
    color: #1877F2;
}

.share-btn-twitter {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}
.share-btn-twitter:hover {
    background: rgba(0, 0, 0, 0.5);
}
.share-btn-twitter svg {
    color: #fff;
}

.share-btn-instagram {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.3), rgba(253, 29, 29, 0.3), rgba(252, 176, 69, 0.3));
    border-color: rgba(225, 48, 108, 0.4);
}
.share-btn-instagram:hover {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.5), rgba(253, 29, 29, 0.5), rgba(252, 176, 69, 0.5));
}
.share-btn-instagram svg {
    color: #E1306C;
}

.share-btn-pinterest {
    background: rgba(230, 0, 35, 0.2);
    border-color: rgba(230, 0, 35, 0.3);
}
.share-btn-pinterest:hover {
    background: rgba(230, 0, 35, 0.4);
}
.share-btn-pinterest svg {
    color: #E60023;
}

.share-btn-linkedin {
    background: rgba(0, 119, 181, 0.2);
    border-color: rgba(0, 119, 181, 0.3);
}
.share-btn-linkedin:hover {
    background: rgba(0, 119, 181, 0.4);
}
.share-btn-linkedin svg {
    color: #0077B5;
}

.share-btn-whatsapp {
    background: rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.3);
}
.share-btn-whatsapp:hover {
    background: rgba(37, 211, 102, 0.4);
}
.share-btn-whatsapp svg {
    color: #25D366;
}

.share-btn-telegram {
    background: rgba(0, 136, 204, 0.2);
    border-color: rgba(0, 136, 204, 0.3);
}
.share-btn-telegram:hover {
    background: rgba(0, 136, 204, 0.4);
}
.share-btn-telegram svg {
    color: #0088CC;
}

.share-btn-email {
    background: rgba(234, 179, 8, 0.2);
    border-color: rgba(234, 179, 8, 0.3);
}
.share-btn-email:hover {
    background: rgba(234, 179, 8, 0.4);
}
.share-btn-email svg {
    color: #EAB308;
}

.share-btn-copy {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
}
.share-btn-copy:hover {
    background: rgba(139, 92, 246, 0.4);
}
.share-btn-copy svg {
    color: #8B5CF6;
}

.share-btn-native {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}
.share-btn-native:hover {
    background: rgba(99, 102, 241, 0.4);
}
.share-btn-native svg {
    color: #6366F1;
}

/* ============================================================================
   Link & Embed Sections
   ============================================================================ */

.share-modal-link,
.share-modal-embed {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-link label,
.share-modal-embed label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-link-wrapper {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.share-link-wrapper input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: 'Monaco', 'Consolas', monospace;
}

.share-link-wrapper input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.share-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.share-copy-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   Toast Notification
   ============================================================================ */

.share-modal-toast {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #22c55e;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.share-modal-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.share-modal-toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================================================
   Mobile Responsive
   ============================================================================ */

@media (max-width: 520px) {
    .share-modal-content {
        width: 95%;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .share-modal-header {
        padding: 16px 20px;
    }
    
    .share-modal-preview {
        padding: 16px 20px;
    }
    
    .share-modal-preview img {
        width: 60px;
        height: 60px;
    }
    
    .share-modal-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 16px 20px;
    }
    
    .share-btn {
        padding: 12px 6px;
        gap: 6px;
    }
    
    .share-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .share-btn span {
        font-size: 10px;
    }
    
    .share-modal-link,
    .share-modal-embed {
        padding: 12px 20px;
    }
    
    .share-link-wrapper input {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .share-modal-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   Dark/Light Mode Support
   ============================================================================ */

@media (prefers-color-scheme: light) {
    /* Keep dark theme for share modal - it looks better */
}

/* ============================================================================
   Animation Utilities
   ============================================================================ */

@keyframes shareModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes shareToastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================================================
   Scrollbar Styling (for modal content)
   ============================================================================ */

.share-modal-content::-webkit-scrollbar {
    width: 6px;
}

.share-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.share-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.share-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
