/* Notification System — shared across pages. Matches the card/header aesthetic. */

.notification-container {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    position: relative;
    width: 360px;
    min-height: 60px;
    max-height: 50vh;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 2px solid #bfdbfe;
    border-radius: 12px;
    box-shadow: 0 10px 30px -8px rgba(30, 58, 138, 0.18);
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
    pointer-events: auto;
    cursor: pointer;
    transform: translateX(120%);
    animation: notif-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: height 0.25s ease, opacity 0.2s ease, transform 0.25s ease;
}

.notification:hover {
    border-color: #93c5fd;
}

@keyframes notif-in {
    to { transform: translateX(0); }
}

.notification.notif-out {
    transform: translateX(120%);
    opacity: 0;
}

.notification.notif-collapse {
    height: 0 !important;
    min-height: 0;
    margin: 0;
    padding: 0;
    border-width: 0;
}

/* Icon — filled circle with white glyph */

.notification-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.notification-icon svg {
    width: 16px;
    height: 16px;
    color: #ffffff;
}

.notification-success .notification-icon { background: #16a34a; }
.notification-error   .notification-icon { background: #dc2626; }
.notification-warning .notification-icon { background: #d97706; }
.notification-info    .notification-icon { background: #2563eb; }

/* Body */

.notification-content {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #1e293b;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Progress bar */

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
}

.notification-success .notification-progress { background: #16a34a; }
.notification-error   .notification-progress { background: #dc2626; }
.notification-warning .notification-progress { background: #d97706; }
.notification-info    .notification-progress { background: #2563eb; }

.notification-progress.active {
    animation: notif-progress var(--duration, 3000ms) linear forwards;
}

@keyframes notif-progress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@media (max-width: 640px) {
    .notification-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }
    .notification {
        width: auto;
    }
}
