/**
 * Şekercioğlu Mobilya - Animasyonlar ve Geçişler
 */

/* Temel Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

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

/* Dikkat Çekici Animasyonlar */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Sayfa Geçişleri (SPA) */
.page-enter {
    animation: fadeIn var(--transition-normal) ease forwards;
}

.page-exit {
    animation: fadeOut var(--transition-fast) ease forwards;
}

/* Animasyon Yardımcı Sınıfları */
.animate-fadeIn {
    animation: fadeIn var(--transition-normal) ease forwards;
}

.animate-fadeInUp {
    animation: fadeInUp var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scaleIn {
    animation: scaleIn var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slideInRight {
    animation: slideInRight var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.spin {
    animation: spin 1s linear infinite;
}

/* Skeleton Loading Efekti */
.skeleton {
    background: var(--color-bg-tertiary);
    background-image: linear-gradient(
        90deg, 
        var(--color-bg-tertiary) 0px, 
        var(--color-surface) 40px, 
        var(--color-bg-tertiary) 80px
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-rect {
    height: 100px;
}

/* Erişilebilirlik - Azaltılmış Hareket */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
