﻿/* ============================================
   ANIMAÇÕES GERAIS
   ============================================ */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Slide Up */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide Down */
@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse (para botões) */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Shimmer (para skeletons) */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* ============================================
   CLASSES UTILITÁRIAS
   ============================================ */

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-slide-down {
    animation: slideDown 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

/* Delays para efeito cascata */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* ============================================
   TRANSIÇÕES SUAVES
   ============================================ */

.smooth-transition {
    transition: all 0.3s ease;
}

.smooth-transition-slow {
    transition: all 0.5s ease;
}

/* ============================================
   EFEITOS DE HOVER
   ============================================ */

/* Card Hover */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

    .card-hover:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
    }

/* Button Hover */
.btn-hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-hover-lift:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .btn-hover-lift:active {
        transform: translateY(0);
    }

/* Image Hover Zoom */
.img-hover-zoom {
    overflow: hidden;
}

    .img-hover-zoom img {
        transition: transform 0.4s ease;
    }

    .img-hover-zoom:hover img {
        transform: scale(1.1);
    }

/* ============================================
   LOADING SKELETON
   ============================================ */

.skeleton {
    background: linear-gradient( 90deg, #f0f0f0 0%, #e0e0e0 20%, #f0f0f0 40%, #f0f0f0 100% );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-image {
    height: 200px;
    width: 100%;
}

.skeleton-circle {
    border-radius: 50%;
}

/* ============================================
   LOADING SPINNER MELHORADO
   ============================================ */

.spinner-custom {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-dots {
    display: flex;
    gap: 8px;
}

    .spinner-dots span {
        width: 12px;
        height: 12px;
        background-color: #28a745;
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out both;
    }

        .spinner-dots span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .spinner-dots span:nth-child(2) {
            animation-delay: -0.16s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* ============================================
   MODAL ANIMATIONS
   ============================================ */

.modal-backdrop-fade {
    animation: fadeIn 0.3s ease-out;
}

.modal-content-scale {
    animation: scaleIn 0.3s ease-out;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.page-transition {
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   BADGES E TAGS ANIMADOS
   ============================================ */

.badge-pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   FORM INPUTS
   ============================================ */

.form-control:focus,
.form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
