/**
 * Enhanced Sharing Modal Styles for PickPCParts
 */

.enhanced-sharing-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-out;
}

.enhanced-sharing-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.enhanced-sharing-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.enhanced-sharing-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.enhanced-sharing-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.enhanced-sharing-close:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.enhanced-sharing-modal-body {
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.sharing-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 8px;
}

.sharing-option:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.sharing-option:active {
    transform: translateY(0);
}

.sharing-option-icon {
    font-size: 24px;
    margin-right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
    flex-shrink: 0;
}

.sharing-option-text {
    flex: 1;
}

.sharing-option-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.sharing-option-text p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

/* Specific styling for each sharing option */
.sharing-option:nth-child(1) .sharing-option-icon {
    background: #ff4500;
    color: white;
}

.sharing-option:nth-child(2) .sharing-option-icon {
    background: #3b82f6;
    color: white;
}

.sharing-option:nth-child(3) .sharing-option-icon {
    background: #10b981;
    color: white;
}

.sharing-option:nth-child(4) .sharing-option-icon {
    background: #f59e0b;
    color: white;
}

.sharing-option:nth-child(5) .sharing-option-icon {
    background: #8b5cf6;
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .enhanced-sharing-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .enhanced-sharing-modal-header {
        padding: 16px 20px;
    }
    
    .enhanced-sharing-modal-body {
        padding: 12px;
    }
    
    .sharing-option {
        padding: 12px;
    }
    
    .sharing-option-icon {
        font-size: 20px;
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
    
    .sharing-option-text h4 {
        font-size: 15px;
    }
    
    .sharing-option-text p {
        font-size: 13px;
    }
}

/* Dark mode support (if your site supports it) */
@media (prefers-color-scheme: dark) {
    .enhanced-sharing-modal-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .enhanced-sharing-modal-header {
        background: #111827;
        border-bottom-color: #374151;
    }
    
    .enhanced-sharing-modal-header h3 {
        color: #f9fafb;
    }
    
    .enhanced-sharing-close {
        color: #9ca3af;
    }
    
    .enhanced-sharing-close:hover {
        background-color: #374151;
        color: #d1d5db;
    }
    
    .sharing-option:hover {
        background-color: #374151;
        border-color: #4b5563;
    }
    
    .sharing-option-text h4 {
        color: #f9fafb;
    }
    
    .sharing-option-text p {
        color: #9ca3af;
    }
    
    .sharing-option-icon {
        background: #374151;
    }
}

/* Focus styles for accessibility */
.sharing-option:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.enhanced-sharing-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading state for sharing options */
.sharing-option.loading {
    opacity: 0.6;
    pointer-events: none;
}

.sharing-option.loading .sharing-option-icon {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Success state for sharing options */
.sharing-option.success .sharing-option-icon {
    background: #10b981;
    color: white;
}

.sharing-option.success .sharing-option-icon::after {
    content: "✓";
    position: absolute;
    font-size: 12px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: -4px;
    right: -4px;
}

