/* Global Notifications System */

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

.notification {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-right: 4px solid #3b82f6;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.notification.success {
    border-right-color: #10b981;
}

.notification.error {
    border-right-color: #ef4444;
}

.notification.warning {
    border-right-color: #f59e0b;
}

.notification.info {
    border-right-color: #3b82f6;
}

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

.notification.success .notification-icon {
    color: #10b981;
}

.notification.error .notification-icon {
    color: #ef4444;
}

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

.notification.info .notification-icon {
    color: #3b82f6;
}

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

.notification-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1f2937;
}

.notification-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: #f3f4f6;
    color: #64748b;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(59, 130, 246, 0.3);
    transition: width linear;
}

.notification.success .notification-progress {
    background: rgba(16, 185, 129, 0.3);
}

.notification.error .notification-progress {
    background: rgba(239, 68, 68, 0.3);
}

.notification.warning .notification-progress {
    background: rgba(245, 158, 11, 0.3);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.notification.removing {
    animation: slideOut 0.3s ease-in forwards;
}

/* Dark Mode */
.dark-mode .notification {
    background: #1f2937;
    border-right-color: #3b82f6;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dark-mode .notification-title {
    color: #f3f4f6;
}

.dark-mode .notification-message {
    color: #9ca3af;
}

.dark-mode .notification-close {
    color: #6b7280;
}

.dark-mode .notification-close:hover {
    background: #374151;
    color: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
        font-size: 12px;
    }
    
    .notification-icon {
        font-size: 18px;
        width: 20px;
        height: 20px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}

/* Stack Notifications */
.notifications-container.stack .notification {
    animation: slideInStack 0.3s ease-out;
}

@keyframes slideInStack {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notification Types Enhanced */
.notification.promotion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-right-color: #764ba2;
}

.notification.promotion .notification-title {
    color: white;
}

.notification.promotion .notification-message {
    color: rgba(255, 255, 255, 0.9);
}

.notification.promotion .notification-close {
    color: rgba(255, 255, 255, 0.8);
}

.notification.promotion .notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Notification Sound Effect */
.notification.sound {
    animation: slideIn 0.3s ease-out, pulse 0.5s ease-in-out;
}

/* Accessibility */
.notification:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.notification[role="alert"] {
    border-right-color: #ef4444;
}

/* Print Styles */
@media print {
    .notifications-container {
        display: none !important;
    }
}
