/**
 * ManyBoxEnviox - UI Utilities CSS
 * Estilos para componentes de utilidad de la interfaz
 */

/* ========== SISTEMA DE NOTIFICACIONES ========== */

.ui-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(calc(100% + 40px));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 420px;
    min-width: 300px;
}

.ui-notification.show {
    transform: translateX(0);
}

.ui-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-notification-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

.ui-notification-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #9ca3af;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}

/* Tipos de notificación */
.ui-notification-success {
    border-left: 4px solid #22c55e;
}

.ui-notification-success .ui-notification-icon {
    color: #22c55e;
}

.ui-notification-error {
    border-left: 4px solid #ef4444;
}

.ui-notification-error .ui-notification-icon {
    color: #ef4444;
}

.ui-notification-warning {
    border-left: 4px solid #f59e0b;
}

.ui-notification-warning .ui-notification-icon {
    color: #f59e0b;
}

.ui-notification-info {
    border-left: 4px solid #3b82f6;
}

.ui-notification-info .ui-notification-icon {
    color: #3b82f6;
}

/* ========== SPINNER DE CARGA ========== */

.ui-spinner {
    animation: ui-spin 1s linear infinite;
}

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

/* ========== ESTADO DE BOTONES ========== */

button.loading,
.btn-auth-primary.loading {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

button:disabled,
.btn-auth-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ========== ERRORES DE CAMPOS ========== */

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-error::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #ef4444;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 480px) {
    .ui-notification {
        left: 16px;
        right: 16px;
        max-width: none;
        min-width: 0;
        transform: translateY(-120%);
    }

    .ui-notification.show {
        transform: translateY(0);
    }
}

/* ========== DARK MODE SUPPORT ========== */

@media (prefers-color-scheme: dark) {
    .ui-notification {
        background: rgba(31, 41, 55, 0.98);
        box-shadow: 
            0 4px 6px -1px rgba(0, 0, 0, 0.3),
            0 2px 4px -1px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    .ui-notification-message {
        color: #f3f4f6;
    }

    .ui-notification-close {
        color: #6b7280;
    }

    .ui-notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #d1d5db;
    }
}
