/* ==========================================================================
   SYSTEM NOTIFICATION TOAST COMPONENT
   ========================================================================== */

/* 1. Global Outer Viewport Positioning */
.notification-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 20px);
    z-index: 9999;
    opacity: 0;
    width: 100%;
    max-width: 450px;
    padding: 0 16px;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: none;
}

    /* Activated State via JS */
    .notification-toast.active {
        opacity: 1;
        transform: translate(-50%, 0);
        pointer-events: auto;
    }

/* 2. Inner Component Layout */
.notification-frame {
    background-color: var(--rm-surface);
    border: 1px solid var(--rm-border);
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.notification-frame-body {
    flex-grow: 1;
    padding-bottom: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 3. Typography & Micro-elements */
.notification-alert-message {
    margin: 0;
    color: var(--rm-text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    font-family: system-ui, -apple-system, sans-serif;
}

.notification-alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-close-btn {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

    .notification-close-btn:hover {
        color: var(--rm-text-secondary);
    }

/* 4. Progress Countdown Animating Track */
.notification-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: var(--rm-focus);
    transform-origin: left;
    transform: scaleX(1);
}

.notification-toast.active .notification-progress-bar {
    animation: toastCountdown 5s linear forwards;
}

@keyframes toastCountdown {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

/* 5. Situational Threat Structural State Modifiers */
.notification-toast.type-error .notification-frame {
    border-color: #EF4444;
}

.notification-toast.type-error .notification-progress-bar {
    background-color: #EF4444;
}

.notification-toast.type-warning .notification-frame {
    border-color: #F59E0B;
}

.notification-toast.type-warning .notification-progress-bar {
    background-color: #F59E0B;
}

.notification-toast.type-info .notification-frame {
    border-color: var(--rm-focus);
}

.notification-toast.type-info .notification-progress-bar {
    background-color: var(--rm-focus);
}
