/* Style Selection Animation CSS */
.style-card {
    transition: all 0.5s ease;
}

.style-card.selected {
    z-index: 10;
}

/* Animation class for selected card */
.style-card-selected-animation {
    position: absolute;
    z-index: 10;
    animation: moveToCenter 0.8s forwards;
}

/* Animation class for non-selected cards */
.style-card-fade-out {
    animation: fadeSlideOut 0.6s forwards;
    pointer-events: none;
}

/* Animation for the selected card to move to center */
@keyframes moveToCenter {
    0% {
        transform: scale(1.05);
    }
    50% {
        transform: translate(calc(50vw - 50%), calc(40vh - 50%)) scale(1.2);
    }
    100% {
        transform: translate(calc(50vw - 50%), calc(40vh - 50%)) scale(1.3);
        opacity: 0;
    }
}

/* Animation for non-selected cards to fade and slide out */
@keyframes fadeSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Ensure grid maintains layout during animations */
.styles-grid {
    position: relative;
    min-height: 300px;
}

/* Style transition container */
.style-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.style-transition-overlay.active {
    opacity: 1;
}

/* Ensure step transitions are smooth */
.step-container {
    transition: opacity 0.3s ease;
}
