/**
 * Modern Notification System Styles
 * Toast notifications with smooth animations and dark mode support
 */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
}

.notification {
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all var(--transition-base) cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.notification-show {
    opacity: 1;
    transform: translateX(0);
}

.notification-hide {
    opacity: 0;
    transform: translateX(400px);
    transition: all var(--transition-base) ease-in;
}

/* Notification Types */
.notification-success {
    border-left-color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
}

.notification-warning {
    border-left-color: #f59e0b;
}

.notification-info {
    border-left-color: #3b82f6;
}

/* Icon Styles */
.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.notification-success .notification-icon {
    color: #10b981;
}

.notification-error .notification-icon {
    color: #ef4444;
}

.notification-warning .notification-icon {
    color: #f59e0b;
}

.notification-info .notification-icon {
    color: #3b82f6;
}

/* Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    margin: 0;
}

/* Close Button */
.notification-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.notification-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.notification-close:active {
    transform: scale(0.9);
}

/* Progress Bar for Auto-dismiss */
.notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    width: 100%;
    animation: notification-progress 5s linear;
    transform-origin: left;
}

.notification-success::after {
    background: #10b981;
}

.notification-error::after {
    background: #ef4444;
}

.notification-warning::after {
    background: #f59e0b;
}

.notification-info::after {
    background: #3b82f6;
}

@keyframes notification-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Dark Mode Enhancements */
[data-theme="dark"] .notification {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 
                0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* Animation for multiple notifications */
.notification:not(:first-child) {
    margin-top: -8px;
    animation: notification-stack 0.3s ease-out;
}

@keyframes notification-stack {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Legacy Alert Compatibility */
.alert {
    transition: opacity var(--transition-base);
}

.alert.hidden {
    display: none;
}
