/* Система всплывающих уведомлений */

/* Контейнер для уведомлений */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

/* Базовые стили уведомления */
.notification {
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
    
    /* Анимации */
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Анимация скрытия */
.notification.notification-hide {
    opacity: 0;
    transform: translateX(100%);
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    max-height: 0;
}

/* Иконка уведомления */
.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin-top: 2px;
}

/* Содержимое уведомления */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-message {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.4;
    word-wrap: break-word;
}

/* Кнопка закрытия */
.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Типы уведомлений */

/* Успех */
.notification-success {
    border-left-color: var(--color-success);
}

.notification-success .notification-icon {
    background: var(--color-success);
}

.notification-success .notification-title {
    color: var(--color-success);
}

/* Ошибка */
.notification-error {
    border-left-color: var(--color-error);
}

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

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

/* Предупреждение */
.notification-warning {
    border-left-color: var(--color-warning);
}

.notification-warning .notification-icon {
    background: var(--color-warning);
    color: var(--color-text-primary);
}

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

/* Информация */
.notification-info {
    border-left-color: var(--color-primary);
}

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

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

/* Адаптивность */
@media screen and (max-width: 768px) {
    .notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .notification-icon {
        width: 20px;
        height: 20px;
        font-size: var(--font-size-xs);
    }
    
    .notification-title {
        font-size: var(--font-size-sm);
    }
    
    .notification-message {
        font-size: var(--font-size-xs);
    }
}

@media screen and (max-width: 480px) {
    .notifications-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }
    
    .notification {
        padding: 12px 14px;
        gap: 8px;
        margin-bottom: 8px;
    }
}

/* Специальные стили для форм */
.notification.form-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #20c997 100%);
    color: var(--color-white);
    border-left: none;
}

.notification.form-success .notification-title,
.notification.form-success .notification-message {
    color: var(--color-white);
}

.notification.form-success .notification-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
}

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

.notification.form-success .notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

/* Анимация пульсации для важных уведомлений */
@keyframes pulse {
    0% { box-shadow: var(--shadow-lg); }
    50% { box-shadow: var(--shadow-lg), 0 0 20px rgba(40, 167, 69, 0.3); }
    100% { box-shadow: var(--shadow-lg); }
}

.notification.notification-pulse {
    animation: pulse 2s ease-in-out;
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .notification {
        background: var(--color-bg-dark, #2d3748);
        color: var(--color-text-dark, #e2e8f0);
    }
    
    .notification-title {
        color: var(--color-text-primary-dark, #f7fafc);
    }
    
    .notification-message {
        color: var(--color-text-secondary-dark, #cbd5e0);
    }
    
    .notification-close {
        color: var(--color-text-muted-dark, #a0aec0);
    }
    
    .notification-close:hover {
        background: var(--color-bg-secondary-dark, #4a5568);
        color: var(--color-text-primary-dark, #f7fafc);
    }
}
