﻿/* NxStatusMessage — inline status indicator */

.nx-status-message {
    display: inline-flex;
    align-items: center;
    gap: var(--nx-space-small);
    font-family: var(--nx-font);
    font-size: 0.875rem;
    color: var(--nx-primary-fg);
    position: relative;
    min-height: 1.5rem;
    padding: var(--nx-space-small);
}

/* ── Notification card style (always applied when a state is active) ── */
.nx-status-notification {
    padding: var(--nx-space-small);
    border-radius: var(--nx-border-radius);
    border-style: solid;
    border-width: 1px;
    border-left-width: 4px;
    border-color: var(--nx-border-color);
    background: var(--nx-tertiary-bg);
    color: var(--nx-primary-fg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: nx-status-pop 220ms cubic-bezier(.2,.9,.2,1) both;
}

.nx-status-notification-processing {
    background: var(--nx-highlight-bg);
    border-color: var(--nx-highlight-fg);
}

.nx-status-notification-success {
    border-color: var(--nx-positive-fg);
    background: var(--nx-positive-bg);
}

.nx-status-notification-error {
    border-color: var(--nx-negative-fg);
    background: var(--nx-negative-bg);
}

@keyframes nx-status-pop {
    0% {
        transform: scale(1.05);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Fixed bar mode (bottom-center, slides up from page edge) ── */
.nx-status-fixed {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: none;
}

/* override card style for fixed mode — slide up from below the viewport */
.nx-status-fixed.nx-status-notification {
    box-shadow: none;
    animation: nx-status-slide-up 280ms cubic-bezier(.2,.9,.2,1) both;
}

@keyframes nx-status-slide-up {
    0% {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ── Icons ── */
.nx-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

/* Spinner rotation */
.nx-status-spinner .nx-icon {
    animation: nx-status-spin 1s linear infinite;
    color: var(--nx-highlight-fg);
}

@keyframes nx-status-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Success icon */
.nx-status-success .nx-icon {
    color: var(--nx-positive-fg);
}

/* Error icon */
.nx-status-error .nx-icon {
    color: var(--nx-negative-fg);
}

/* ── Status text ── */
.nx-status-text {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    word-break: break-word;
    white-space: normal;
    color: inherit;
}

/* ── Dismiss button (always visible) ── */
.nx-status-close {
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    padding: var(--nx-space-small);
}

    .nx-status-close:hover {
        color: var(--nx-negative-fg);
    }
