﻿/* Notification / status bar shown by PageLayout */
/* Updated to use nx-theme.css variables */

.nx-notification-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    pointer-events: none;
}

.nx-notification {
    width: 100%;
    box-sizing: border-box;
    padding: var(--nx-space);
    display: flex;
    align-items: center;
    gap: var(--nx-space-small, 0.5rem);
    margin-bottom: var(--nx-space);
    border-radius: var(--nx-border-radius, 6px);
    border-style: solid;
    border-width: 1px;
    border-left-width: 4px;
    border-color: var(--nx-border-color);
    transition: transform 180ms ease, opacity 180ms ease;
    opacity: 1;
    height: fit-content;
    flex-direction: row;
    align-items: flex-start;
    background: var(--nx-tertiary-bg, #333);
    color: var(--nx-primary-fg, #fff);
    font-family: var(--nx-font, sans-serif);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: nx-pop 220ms cubic-bezier(.2,.9,.2,1) both;
    pointer-events: auto;
}

    /* allow message to grow/shrink and wrap; min-width:0 is essential inside flex containers */
    .nx-notification .nx-notification-message {
        flex: 1;
        min-width: 0;
        white-space: normal;
        word-break: break-word;
        line-height: 1.4;
        margin: 0;
        color: inherit;
        background: transparent;
    }

/* pop animation for notification message (scale 1.2 -> 1) */
@keyframes nx-pop {
    0% {
        transform: scale(1.2);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* keep close button compact and anchored top-right of the inner wrapper */
.nx-notification .nx-notification-close {
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 0px;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    padding: var(--nx-space-small);
}

    .nx-notification .nx-notification-close:hover {
        color: var(--nx-negative-fg);
    }

/* Type modifiers (use these classes on the notification element) */
.nx-notification-success {
    border-color: var(--nx-positive-fg);
    background: var(--nx-positive-bg);
}

.nx-notification-warning {
    border-color: var(--nx-alert-fg);
    background: var(--nx-alert-bg);
}

.nx-notification-error {
    border-color: var(--nx-negative-fg);
    background: var(--nx-negative-bg);
}
