/* Professional Notification System CSS */

.notification-container {
    position: fixed;
    top: 64px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

@media (max-width: 768px) {
    .notification-container {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    pointer-events: auto;
    overflow: hidden;
    position: relative;
    border-left: 4px solid;
    animation: slideIn 0.4s cubic-bezier(0.23, 1, 0.320, 1) forwards;
}

.notification.notification-slide-out {
    animation: slideOut 0.4s cubic-bezier(0.770, 0, 0.175, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(400px) rotateY(-20deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(0deg);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0) rotateY(0deg);
    }
    to {
        opacity: 0;
        transform: translateX(400px) rotateY(-20deg);
    }
}

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

.notification-success {
    border-left-color: #27ae60;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.notification-success .notification-icon {
    color: #27ae60;
}

.notification-danger,
.notification-error {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.notification-danger .notification-icon,
.notification-error .notification-icon {
    color: #e74c3c;
}

.notification-warning {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.notification-warning .notification-icon {
    color: #f39c12;
}

.notification-info {
    border-left-color: #3498db;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.notification-info .notification-icon {
    color: #3498db;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-dismiss {
    border: 0;
    background: transparent;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
}

.notification-dismiss:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.notification-dismiss:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.notification-sticky {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

@media (prefers-reduced-motion: reduce) {
    .notification,
    .notification.notification-slide-out,
    .notification-progress-bar {
        animation: none !important;
        transition: none !important;
    }
}

.notification-message {
    font-size: 14px;
    font-weight: 500;
    /* Inherit from .notification so light/dark tokens always win */
    color: inherit;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    animation: progressBar 5s linear forwards;
}

.notification-success .notification-progress-bar {
    background: #27ae60;
}

.notification-danger .notification-progress-bar,
.notification-error .notification-progress-bar {
    background: #e74c3c;
}

.notification-warning .notification-progress-bar {
    background: #f39c12;
}

.notification-info .notification-progress-bar {
    background: #3498db;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Optional hover effect */
.notification:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .notification {
        padding: 12px;
        min-height: 50px;
        font-size: 13px;
    }

    .notification-icon {
        font-size: 20px;
    }

    .notification-container {
        gap: 8px;
    }
}
