/* Promotion Wizard Premium Animations */

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { 
        transform: translateX(0); 
    }
    25% { 
        transform: translateX(-5px); 
    }
    75% { 
        transform: translateX(5px); 
    }
}

@keyframes pulse-success {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) skewX(-12deg);
    }
    100% {
        transform: translateX(200%) skewX(-12deg);
    }
}

/* Template selection card hover effects */
.template-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.template-card.selected {
    animation: pulse-success 1s ease-in-out;
}

/* Form field animations */
.form-field {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field:focus {
    transform: translateY(-1px);
}

.form-field.error {
    animation: shake 0.5s ease-in-out;
}

/* Step indicator animations */
.step-circle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-circle.completed {
    animation: pulse-success 0.6s ease-in-out;
}

/* Progress bar animation */
.progress-bar {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

/* Button hover effects */
.premium-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.premium-button:active {
    transform: translateY(0);
}

/* Shimmer effect for buttons */
.shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: translateX(-100%) skewX(-12deg);
    transition: transform 1s ease-out;
}

.premium-button:hover .shimmer {
    animation: shimmer 1s ease-out;
}

/* Preview card animations */
.preview-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-card.updating {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Mobile mockup hover effect */
.mobile-mockup {
    transition: transform 0.3s ease-out;
}

.mobile-mockup:hover {
    transform: scale(1.05) rotate(1deg);
}

/* Success toast animations */
.toast {
    animation: slide-up 0.3s ease-out;
}

.toast.removing {
    animation: slide-up 0.3s ease-out reverse;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Gradient text animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(-45deg, #6366f1, #8b5cf6, #ec4899, #ef4444);
    background-size: 400% 400%;
    animation: gradient-shift 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Utility classes for JavaScript animations */
.animate-entrance {
    animation: slide-up 0.6s ease-out;
}

.animate-scale-in {
    animation: scale-in 0.4s ease-out;
}

.animate-pulse-success {
    animation: pulse-success 1s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .template-card:hover {
        transform: none; /* Disable hover effects on mobile */
    }
    
    .premium-button:hover {
        transform: none;
    }
    
    .mobile-mockup:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .template-card {
        border-width: 2px;
    }
    
    .form-field {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .template-card:hover {
        transform: none;
    }
    
    .premium-button:hover {
        transform: translateY(-1px);
    }
}