/* ==============================================
   CUSTOM NOTIFICATIONS SYSTEM
   Кастомная система уведомлений в стиле приложения
   ============================================== */

/* Контейнер для уведомлений */
.notifications-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

/* Уведомление */
.notification {
    background: var(--background-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    pointer-events: all;
    transform: translateX(100%);
    opacity: 0;
    transition: all var(--duration-300) var(--ease-out);
    position: relative;
    overflow: hidden;
    min-width: 320px;
}

/* Анимация появления */
.notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Анимация исчезновения */
.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Типы уведомлений */
.notification.success {
    border-left: 4px solid var(--success-500);
    background: linear-gradient(135deg, 
        var(--background-secondary) 0%, 
        rgba(16, 185, 129, 0.05) 100%);
}

.notification.error {
    border-left: 4px solid var(--error-500);
    background: linear-gradient(135deg, 
        var(--background-secondary) 0%, 
        rgba(239, 68, 68, 0.05) 100%);
}

.notification.warning {
    border-left: 4px solid var(--warning-500);
    background: linear-gradient(135deg, 
        var(--background-secondary) 0%, 
        rgba(245, 158, 11, 0.05) 100%);
}

.notification.info {
    border-left: 4px solid var(--primary-500);
    background: linear-gradient(135deg, 
        var(--background-secondary) 0%, 
        rgba(59, 130, 246, 0.05) 100%);
}

/* Заголовок и содержимое */
.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.notification-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.notification-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: all var(--duration-200);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.notification-close:hover {
    color: var(--text-primary);
    background: var(--background-tertiary);
}

.notification-message {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

/* Иконки для разных типов */
.notification.success .notification-icon {
    color: var(--success-500);
}

.notification.error .notification-icon {
    color: var(--error-500);
}

.notification.warning .notification-icon {
    color: var(--warning-500);
}

.notification.info .notification-icon {
    color: var(--primary-500);
}

/* Прогресс бар автозакрытия */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width linear;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.notification.success .notification-progress {
    background: var(--success-500);
}

.notification.error .notification-progress {
    background: var(--error-500);
}

.notification.warning .notification-progress {
    background: var(--warning-500);
}

/* Адаптивность */
@media (max-width: 640px) {
    .notifications-container {
        top: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
        max-width: none;
    }
    
    .notification {
        min-width: auto;
        padding: var(--space-3) var(--space-4);
    }
    
    .notification-title {
        font-size: var(--font-size-xs);
    }
    
    .notification-message {
        font-size: var(--font-size-xs);
    }
}

/* Анимация bounce для важных уведомлений */
@keyframes notification-bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateX(0) scale(1);
    }
    40%, 43% {
        transform: translateX(-8px) scale(1.02);
    }
    70% {
        transform: translateX(-4px) scale(1.01);
    }
    90% {
        transform: translateX(-2px) scale(1.005);
    }
}

.notification.bounce {
    animation: notification-bounce 0.8s ease-out;
}

/* Стили для темной темы (уже включены в переменные) */
@media (prefers-color-scheme: dark) {
    .notification {
        background: var(--background-secondary);
        border-color: var(--border-primary);
    }
} 