/* ============================================================================
   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: var(--color-notification-bg);
    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 var(--color-notification-border);
    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 var(--color-notification-border);
    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: var(--client-header-text, #ffffff);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* pulse animation defined in styles/utilities.css */

.notification-title {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--client-header-text, #ffffff);
    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: var(--client-header-text, #ffffff);
}

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

/* Body */
.notification-body {
    padding: 14px 16px;
    background: var(--color-notification-bg);
}

.notification-user {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-notification-text);
    margin-bottom: 4px;
}

.notification-action {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.notification-action strong {
    color: var(--color-notification-text);
    font-weight: 600;
}

.notification-change {
    background: var(--color-surface);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

.value-old {
    color: var(--color-danger);
    text-decoration: line-through;
    opacity: 0.7;
}

.value-new {
    color: var(--color-success);
    font-weight: 600;
}

/* Footer */
.notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-notification-border);
}

.notification-client {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.notification-time {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* 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 var(--color-notification-border);
}

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

/* ============================================================================
   Success Notification (Task Created)
   ============================================================================ */

.notification--success {
    border-left: 4px solid var(--color-success);
}

.notification-header--success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.notification-icon--success {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.notification-body--success {
    padding: 16px;
}

.notification-task-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-notification-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.notification-allocation {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--color-success-bg);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.notification-allocation--empty {
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border-color: var(--color-border);
}

.notification-allocation__icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.notification-footer--success {
    background: var(--color-success-bg);
    border-top-color: var(--color-success);
}

.notification-progress--success {
    background: var(--gradient-success);
    animation: progressSuccess 6s linear forwards;
}

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

/* Dark Mode Support - handled via CSS variables in main.css */

