/* ========================================
   ANIMATIONS & TRANSITIONS
   Vendor Portal - Smooth UX Enhancements
   ======================================== */

/* ========================================
   FADE ANIMATIONS
   ======================================== */

@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);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.4s ease-out;
}

/* ========================================
   SLIDE ANIMATIONS
   ======================================== */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

/* ========================================
   SCALE ANIMATIONS
   ======================================== */

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

.scale-out {
    animation: scaleOut 0.3s ease-in;
}

.bounce {
    animation: bounce 0.6s ease-in-out;
}

/* ========================================
   PULSE & GLOW ANIMATIONS
   ======================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ========================================
   SHIMMER/SKELETON LOADING
   ======================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

.skeleton-text:last-child {
    width: 80%;
}

.skeleton-card {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 6px;
}

/* ========================================
   SPIN ANIMATIONS
   ======================================== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

.spin-slow {
    animation: spin 2s linear infinite;
}

.spin-reverse {
    animation: spinReverse 1s linear infinite;
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

/* Card hover lift */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

/* Button hover effects */
.btn-hover-lift {
    transition: all 0.2s ease;
}

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-hover-scale {
    transition: transform 0.2s ease;
}

.btn-hover-scale:hover {
    transform: scale(1.05);
}

/* Link hover underline */
.link-hover-underline {
    position: relative;
    text-decoration: none;
}

.link-hover-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.link-hover-underline:hover::after {
    width: 100%;
}

/* Image hover zoom */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.3s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Icon hover rotate */
.icon-hover-rotate {
    transition: transform 0.3s ease;
}

.icon-hover-rotate:hover {
    transform: rotate(90deg);
}

/* ========================================
   PAGE TRANSITIONS
   ======================================== */

.page-transition-enter {
    animation: fadeInUp 0.4s ease-out;
}

.page-transition-exit {
    animation: fadeOut 0.3s ease-in;
}

/* ========================================
   SMOOTH SCROLLING
   ======================================== */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
