/**
 * Notification component – Mantine-style
 * Notification theme. Use with notification.js
 * 
 * Usage:
 *   Notification.show({ title: 'We notify you that', message: 'You are now obligated...', color: 'gray' });
 */

/* ===== Notifications container (fixed bottom-right) ===== */
.notification-container {
    position: fixed;
    bottom: var(--mantine-spacing-md, 1rem);
    right: var(--mantine-spacing-md, 1rem);
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    max-width: 340px;
    width: calc(100% - 2rem);
    pointer-events: none;
}

.notification-container > * {
    pointer-events: auto;
}

/* ===== Notification base (compact) ===== */
.notification {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--notification-radius, 0.5rem);
    background: rgba(29, 29, 29, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    font-size: 0.8125rem;
    line-height: 1.4;
    animation: notification-slide-in 0.22s ease-out;
}

@keyframes notification-slide-in {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification.notification--exiting {
    animation: notification-slide-out 0.18s ease-in forwards;
}

@keyframes notification-slide-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.15rem 0;
    font-size: 0.8125rem;
}

.notification-message {
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-size: 0.75rem;
}

.notification-close {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.notification-close:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

/* ===== Color variants (with left border accent) ===== */
.notification--gray {
    border-left: 4px solid #868e96;
}
.notification--gray .notification-title { color: rgba(255, 255, 255, 0.95); }

.notification--blue {
    border-left: 4px solid var(--mantine-color-primary-4, #1a76fd);
}
.notification--blue .notification-title { color: rgba(26, 118, 253, 0.95); }

.notification--green {
    border-left: 4px solid #40c057;
}
.notification--green .notification-title { color: rgba(64, 192, 87, 0.95); }

.notification--red {
    border-left: 4px solid #fa5252;
}
.notification--red .notification-title { color: rgba(250, 82, 82, 0.95); }

.notification--yellow, .notification--orange {
    border-left: 4px solid #fab005;
}
.notification--yellow .notification-title, .notification--orange .notification-title { color: rgba(250, 176, 5, 0.95); }

/* ===== Light mode ===== */
[data-mantine-color-scheme=light] .notification {
    background: #fff;
    border-color: #dee2e6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-mantine-color-scheme=light] .notification-title {
    color: #212529;
}

[data-mantine-color-scheme=light] .notification-message {
    color: #495057;
}

[data-mantine-color-scheme=light] .notification-close {
    color: #868e96;
}

[data-mantine-color-scheme=light] .notification-close:hover {
    color: #212529;
    background: #f1f3f5;
}
