/* ============================================
   Estilos compartidos - Morac Distribution
   ============================================ */

/* Scrollbar personalizado */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #1f2937; border-radius: 8px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 8px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* Expansion suave para formularios colapsables */
.smooth-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}
.smooth-expand.abierto {
    max-height: 2000px;
}

/* Auto-dismiss para alertas */
.alerta-auto-dismiss {
    animation: fadeInDown 0.4s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state para botones */
button[disabled],
input[type="submit"][disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    position: relative;
    pointer-events: none;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    right: 16px;
    margin-top: -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Hover mejorado para filas de tabla */
.hover-row:hover {
    background-color: rgba(55, 65, 81, 0.5);
}

/* Transiciones suaves globales */
a, button {
    transition: all 0.2s ease;
}

/* Focus visible mejorado para accesibilidad */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
