/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Clases de animación */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Transiciones */
.alert {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.progress-bar {
    transition: width 0.5s ease-out;
}

.candidato-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.candidato-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.candidato-card.selected {
    transform: translateY(-4px);
    box-shadow: 0 0 0 2px var(--primary);
}

/* Tooltips */
.tooltip {
    position: absolute;
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    z-index: 1000;
    pointer-events: none;
    animation: fadeIn 0.2s ease-out;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    z-index: 1;
}

/* Efectos hover */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.activity-item {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.activity-item:hover {
    background-color: var(--bg-tertiary);
    transform: translateX(5px);
}

/* Efectos de foco */
.form-control:focus {
    transform: translateY(-1px);
}

/* Efectos de estado */
.badge {
    transition: transform 0.2s ease;
}

.badge:hover {
    transform: scale(1.1);
}
