/* ============================================================
   animations.css — Micro-animasyonlar ve sayfa geçişleri
   ============================================================ */

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

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

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(124, 58, 237, 0.7), 0 0 80px rgba(124, 58, 237, 0.2);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

/* ── Page Transitions ─────────────────────────────────────── */
.page-enter {
    animation: slideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.page-exit {
    animation: fadeOut 0.2s ease forwards;
}

/* ── Utility Animation Classes ───────────────────────────── */
.anim-fade-in {
    animation: fadeIn 0.4s ease both;
}

.anim-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.anim-zoom-in {
    animation: zoomIn 0.35s ease both;
}

.anim-float {
    animation: float 3s ease-in-out infinite;
}

.anim-glow-pulse {
    animation: glow-pulse 2.5s ease-in-out infinite;
}

.anim-spin {
    animation: spin 0.8s linear infinite;
}

/* Staggered children */
.stagger-children>* {
    opacity: 0;
    animation: slideUp 0.4s ease forwards;
}

.stagger-children>*:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 0.10s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 0.20s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 0.30s;
}

.stagger-children>*:nth-child(n+7) {
    animation-delay: 0.35s;
}

/* ── Skeleton Loading ─────────────────────────────────────── */
.skeleton {
    border-radius: 6px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.10) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 1000px 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-text {
    height: 14px;
    margin: 6px 0;
    border-radius: 4px;
}

.skeleton-title {
    height: 24px;
    margin: 8px 0;
    border-radius: 6px;
}

.skeleton-rect {
    border-radius: 12px;
}

/* ── Ripple Effect on Click ──────────────────────────────── */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* ── Slot hover shimmer ───────────────────────────────────── */
.slot-available {
    position: relative;
    overflow: hidden;
}

.slot-available::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
    pointer-events: none;
}

.slot-available:hover::after {
    left: 130%;
}

/* ── Animated gradient hero ─────────────────────────────── */
.hero-gradient {
    background: linear-gradient(-45deg, #7c3aed, #5b21b6, #1a0533, #4c1d95);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

/* ── Chart bars ──────────────────────────────────────────── */
.chart-bar {
    transform-origin: bottom;
    animation: barGrow 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.chart-bar:nth-child(2) {
    animation-delay: 0.05s;
}

.chart-bar:nth-child(3) {
    animation-delay: 0.10s;
}

.chart-bar:nth-child(4) {
    animation-delay: 0.15s;
}

.chart-bar:nth-child(5) {
    animation-delay: 0.20s;
}

.chart-bar:nth-child(6) {
    animation-delay: 0.25s;
}

.chart-bar:nth-child(7) {
    animation-delay: 0.30s;
}

/* ── Notification dot ─────────────────────────────────────── */
.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--clr-red);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px var(--clr-red);
}

/* ── Hover scale effects ─────────────────────────────────── */
.hover-scale {
    transition: transform var(--t-base);
}

.hover-scale:hover {
    transform: scale(1.03);
}

.hover-lift {
    transition: transform var(--t-base), box-shadow var(--t-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ── Number count animation ─────────────────────────────── */
.count-animate {
    animation: countUp 0.6s ease both;
}

/* ── Pulse border (selected state) ──────────────────────── */
.pulse-border {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* ── Transition helpers ──────────────────────────────────── */
.transition-all {
    transition: all var(--t-base);
}

.transition-fast {
    transition: all var(--t-fast);
}