/* Sistema Anti-Spam para Botones */
.btn-processing {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed !important;
}

.btn-processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-processing .btn-text {
    opacity: 0.5;
}

.btn-cooldown {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed !important;
}

.btn-cooldown::after {
    content: attr(data-cooldown);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: currentColor;
}

.btn-cooldown .btn-text {
    opacity: 0.3;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos específicos para diferentes tipos de botones */
.btn-primary.btn-processing {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.btn-success.btn-processing {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.btn-danger.btn-processing {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

/* Tooltip para botones deshabilitados */
.btn-processing[title]::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-processing:hover::before {
    opacity: 1;
}

/* Animación de pulso para botones importantes */
.btn-important {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 123, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0); }
} 