/* ============================================================================
   Real-time Update Notifications
   ============================================================================ */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-modal-high);
    pointer-events: none;
    max-width: 420px;
}

.notification {
    background: white;
    border-radius: 12px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
}

/* Entry/Exit Animations */
.notification-enter {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
}

.notification-active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.notification-exit {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
}

/* Header */
.notification-header {
    display: flex;
    align-items: center;
    padding: 12px 16px 8px;
    border-bottom: 1px solid #f0f0f0;
    background: var(--client-header-gradient, linear-gradient(135deg, #2c5282 0%, #2d3748 100%));
}

.notification-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.notification-title {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    opacity: 0.95;
}

.notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Body */
.notification-body {
    padding: 14px 16px;
    background: white;
}

.notification-user {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.notification-action {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.notification-action strong {
    color: #4b5563;
    font-weight: 600;
}

.notification-change {
    background: #f9fafb;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: #6b7280;
    margin-top: 8px;
}

.value-old {
    color: #ef4444;
    text-decoration: line-through;
    opacity: 0.7;
}

.value-new {
    color: #10b981;
    font-weight: 600;
}

/* Footer */
.notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #f9fafb;
    border-top: 1px solid #f0f0f0;
}

.notification-client {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.notification-time {
    font-size: 11px;
    color: #9ca3af;
}

/* Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary, #3b82f6) 0%, var(--color-primary-hover, #2563eb) 100%);
    animation: progress 30s linear forwards;
    transform-origin: left;
}

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

/* Hover Effects */
.notification:hover {
    transform: translateX(-5px);
    box-shadow:
        0 25px 30px -5px rgba(0, 0, 0, 0.15),
        0 15px 15px -5px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.08);
}

.notification:hover .notification-progress {
    animation-play-state: paused;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #1f2937;
        box-shadow:
            0 20px 25px -5px rgba(0, 0, 0, 0.3),
            0 10px 10px -5px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .notification-header {
        border-bottom-color: #374151;
    }

    .notification-body {
        background: #1f2937;
    }

    .notification-user {
        color: #f3f4f6;
    }

    .notification-action {
        color: #9ca3af;
    }

    .notification-action strong {
        color: #d1d5db;
    }

    .notification-change {
        background: #111827;
        color: #9ca3af;
    }

    .notification-footer {
        background: #111827;
        border-top-color: #374151;
    }
}

