/**
 * Universal Wishlist Styles
 * Provides consistent wishlist styling across all pages
 */

/* Wishlist Button Base Styles */
.wishlist-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    user-select: none;
    outline: none;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wishlist-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.wishlist-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Wishlist Button Variants */
.wishlist-button--primary {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.wishlist-button--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px 0 rgba(239, 68, 68, 0.6);
}

.wishlist-button:hover:not(:disabled)::before {
    opacity: 1;
    transform: scale(1);
}

.wishlist-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    opacity: 0;
}

.wishlist-button--secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.wishlist-button--secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.wishlist-button--outline {
    background: transparent;
    color: #ef4444;
    border: 2px solid #ef4444;
}

.wishlist-button--outline:hover:not(:disabled) {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
}

.wishlist-button--ghost {
    background: transparent;
    color: #6b7280;
    border: none;
}

.wishlist-button--ghost:hover:not(:disabled) {
    background: #f3f4f6;
    color: #374151;
}

/* Wishlist Button Sizes */
.wishlist-button--sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.wishlist-button--lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.wishlist-button--xl {
    padding: 1rem 2rem;
    font-size: 1.25rem;
}

/* Wishlist Button States */
.wishlist-button--loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.wishlist-button--success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.wishlist-button--error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Wishlist Item Styles */
.wishlist-item {
    position: relative;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wishlist-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.wishlist-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px -12px rgba(239, 68, 68, 0.15), 0 8px 16px -8px rgba(0, 0, 0, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.wishlist-item:hover::before {
    opacity: 1;
}

.wishlist-item.removing {
    transform: scale(0.8);
    opacity: 0.5;
    filter: blur(2px);
}

/* Wishlist Counter Styles */
.wishlist-counter {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    min-width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: wishlistPulse 2s infinite;
    border: 2px solid white;
    backdrop-filter: blur(10px);
    transform: scale(1);
    transition: all 0.3s ease;
}

.wishlist-counter:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

@keyframes wishlistPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Wishlist Notification Styles */
.wishlist-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.2), 0 8px 16px -8px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 22rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.wishlist-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    opacity: 0;
}

.wishlist-notification.show {
    transform: translateX(0) scale(1);
}

.wishlist-notification.show::before {
    opacity: 1;
    transform: translateX(100%);
}

.wishlist-notification--success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.wishlist-notification--error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.wishlist-notification--warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.wishlist-notification--info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Wishlist Empty State */
.wishlist-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.wishlist-empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #9ca3af;
}

.wishlist-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.wishlist-empty-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Wishlist Loading States */
.wishlist-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(236, 72, 153, 0.05));
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.wishlist-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(239, 68, 68, 0.2);
    border-top: 3px solid #ef4444;
    border-radius: 50%;
    animation: wishlistSpin 1s linear infinite;
    margin-right: 0.75rem;
    position: relative;
}

.wishlist-loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: wishlistPulse 1.5s ease-in-out infinite;
}

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

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .wishlist-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .wishlist-button--sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .wishlist-button--lg {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .wishlist-item {
        margin-bottom: 1rem;
    }
    
    .wishlist-notification {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .wishlist-notification.show {
        transform: translateY(0);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wishlist-item {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .wishlist-button--secondary {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .wishlist-button--secondary:hover:not(:disabled) {
        background: #4b5563;
        border-color: #6b7280;
    }
    
    .wishlist-button--ghost {
        color: #9ca3af;
    }
    
    .wishlist-button--ghost:hover:not(:disabled) {
        background: #374151;
        color: #f9fafb;
    }
    
    .wishlist-empty {
        color: #9ca3af;
    }
    
    .wishlist-empty-title {
        color: #f9fafb;
    }
    
    .wishlist-empty-description {
        color: #9ca3af;
    }
}

/* Accessibility Improvements */
.wishlist-button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.wishlist-button[aria-pressed="true"] {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

/* Animation Classes */
.wishlist-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.wishlist-fade-out {
    animation: fadeOut 0.3s ease-in-out;
}

.wishlist-slide-in {
    animation: slideIn 0.3s ease-in-out;
}

.wishlist-slide-out {
    animation: slideOut 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOut {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

