/**
 * Modern Notification System Styles
 * Features: Glassmorphism, smooth animations, responsive design
 */

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

.notification {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    overflow: hidden;
    min-width: 320px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation States */
.notification-enter {
    opacity: 0;
    transform: translateX(400px) scale(0.9);
}

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

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

/* Type Variants */
.notification-success {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.15) 0%,
        rgba(5, 150, 105, 0.15) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.notification-error {
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.15) 0%,
        rgba(220, 38, 38, 0.15) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.notification-warning {
    background: linear-gradient(135deg,
        rgba(251, 191, 36, 0.15) 0%,
        rgba(245, 158, 11, 0.15) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.notification-info {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* Icon */
.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon svg {
    width: 100%;
    height: 100%;
}

/* Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    color: currentColor;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.notification-message {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    color: #e5e7eb;
    word-wrap: break-word;
}

/* Close Button */
.notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: currentColor;
    opacity: 0.6;
    transition: all 0.2s ease;
    padding: 0;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.notification-close:active {
    transform: scale(0.95);
}

/* Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.4;
    transform-origin: left;
    transform: scaleX(1);
}

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

/* Responsive */
@media (max-width: 768px) {
    .notification-container {
        right: 16px;
        left: 16px;
        max-width: none;
    }

    .notification {
        min-width: auto;
        max-width: none;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: light) {
    .notification-message {
        color: #1f2937;
    }

    .notification-success {
        background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.95) 0%,
            rgba(5, 150, 105, 0.95) 100%);
        color: #fff;
    }

    .notification-error {
        background: linear-gradient(135deg,
            rgba(239, 68, 68, 0.95) 0%,
            rgba(220, 38, 38, 0.95) 100%);
        color: #fff;
    }

    .notification-warning {
        background: linear-gradient(135deg,
            rgba(251, 191, 36, 0.95) 0%,
            rgba(245, 158, 11, 0.95) 100%);
        color: #fff;
    }

    .notification-info {
        background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.95) 0%,
            rgba(37, 99, 235, 0.95) 100%);
        color: #fff;
    }
}

/* Hover effect - pause animation */
.notification:hover .notification-progress {
    animation-play-state: paused;
}

/* Multiple notifications stacking */
.notification:not(:last-child) {
    margin-bottom: 0;
}

/* Accessibility */
.notification:focus-within {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .notification {
        transition: opacity 0.2s ease;
        transform: none !important;
    }

    .notification-enter,
    .notification-exit {
        transform: none;
    }

    .notification-progress {
        animation: none;
        transition: transform 4s linear;
    }
}
