/**
 * AUTOCORE360 Admin Panel - Alerts & Toasts
 * Alert variants, toast notifications
 */

/* ============ ALERTS ============ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.alert i {
    font-size: 1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.2);
}

.alert-danger,
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info);
    border-color: rgba(14, 165, 233, 0.2);
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    min-width: 320px;
    max-width: 420px;
    animation: toast-slide-in 0.3s var(--ease-out) forwards;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: toast-slide-out 0.2s var(--ease-in-out) forwards;
}

/* Toast type styles */
.toast.success {
    border-left: 4px solid var(--success);
}

.toast.success .toast-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.warning .toast-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast.info .toast-icon {
    background: rgba(6, 182, 212, 0.12);
    color: var(--info);
}

.toast-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    margin: -0.25rem -0.25rem -0.25rem 0;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast) ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text);
    background: var(--surface-hover);
}

/* Toast actions */
.toast-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.toast-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Toast progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toast-progress 4s linear forwards;
}

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
