/* Estilos del botón de descarga CSV */
.csv-download-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 999;
}

.csv-download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.csv-download-button:active {
    transform: translateY(0);
}

.csv-download-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Posición superior */
.csv-position-top {
    margin: 20px 0;
}

/* Posición inferior */
.csv-position-bottom {
    margin: 20px 0;
    display: block;
}

/* Botón flotante */
.csv-position-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    margin: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

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

/* Loading indicator */
#csv-loading {
    display: inline-block;
    margin-left: 10px;
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

/* Notificaciones */
.csv-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.csv-notification-show {
    opacity: 1;
    transform: translateX(0);
}

.csv-notification-success {
    background: #10b981;
    color: white;
}

.csv-notification-error {
    background: #ef4444;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .csv-download-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .csv-position-floating {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .csv-notification {
        right: 10px;
        left: 10px;
        top: 10px;
    }
}

/* Accesibilidad */
.csv-download-button:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Animación de carga */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.csv-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}
