/* Product Designer - AI Generator Specific Styles */

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.3);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Design Cards */
.design-card {
    animation: fadeIn 0.5s ease-out;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.design-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

.design-card.selected {
    border-color: #8B5CF6;
    border-width: 2px;
    animation: pulse-glow 2s infinite;
}

.design-card.selected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6366F1, #8B5CF6);
    border-radius: 14px;
    z-index: -1;
    opacity: 0.5;
}

/* Card Image Container */
.card-image {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #1E293B, #0F172A);
}

.card-image svg {
    transition: transform 0.5s ease;
}

.design-card:hover .card-image svg {
    transform: scale(1.05);
}

/* Badges */
.selected-badge {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    animation: pulse-glow 2s infinite;
}

/* Buttons */
.action-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.action-btn:active::after {
    width: 100px;
    height: 100px;
}

/* Product Type & Style Buttons */
.product-type-btn, .style-btn, .palette-btn {
    transition: all 0.2s ease;
}

.product-type-btn:hover, .style-btn:hover {
    transform: translateY(-2px);
    border-color: #6366F1;
}

.product-type-btn.active, .style-btn.active {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: white;
    border-color: transparent;
}

.palette-btn {
    transition: all 0.2s ease;
}

.palette-btn:hover {
    transform: translateX(4px);
    border-color: #6366F1;
}

.palette-btn.active {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: white;
    border-color: transparent;
}

.palette-btn.active .flex.gap-1 {
    opacity: 0.9;
}

/* View Toggle */
.view-btn {
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: #334155;
    color: white;
}

.view-btn.active {
    background: #6366F1;
    color: white;
    border-color: #6366F1;
}

/* List View */
.design-list {
    display: none;
}

.design-list.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.list-item:hover {
    transform: translateX(4px);
    border-color: #6366F1;
}

.list-item.selected {
    border-color: #8B5CF6;
    border-width: 2px;
    background: rgba(99, 102, 241, 0.1);
}

.list-preview {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #1E293B, #0F172A);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-preview svg {
    width: 40px;
    height: 40px;
}

.list-content {
    flex: 1;
}

.list-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.list-description {
    font-size: 0.75rem;
    color: #94A3B8;
}

.list-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Loading Indicator */
.loading-spinner {
    animation: spin 1s linear infinite;
}

/* AI Suggestion Card */
#ai-suggestion {
    transition: all 0.3s ease;
}

#ai-suggestion:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 1rem;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #334155;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #94A3B8;
    margin-bottom: 1.5rem;
}

/* Success Animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.checkmark {
    animation: checkmark 0.5s ease;
}

/* Scrollbar */
.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #1E293B;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #6366F1;
}

/* Responsive */
@media (max-width: 1024px) {
    .lg\:w-\[400px\] {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #334155;
    }
    
    .list-item {
        flex-wrap: wrap;
    }
    
    .list-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list-preview {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    
    .list-actions {
        width: 100%;
    }
    
    .list-actions button {
        flex: 1;
    }
}