/* Система уведомлений (Toast Notifications) */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
}

.notification {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: all;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 320px;
    max-width: 420px;
}

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

.notification.hide {
    transform: translateX(120%);
    opacity: 0;
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

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

.notification-title {
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.notification-message {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.notification-message strong {
    color: #0f172a;
    font-weight: 600;
}

.notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    padding: 0;
    margin-left: 4px;
}

.notification-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Типы уведомлений */
.notification.success .notification-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error .notification-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.warning .notification-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification.info .notification-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.notification.info {
    border-left: 4px solid #3b82f6;
}

/* Тёмная тема */
body.dark-mode .notification,
body.dark-theme .notification {
    background: #334155;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #f1f5f9;
}

body.dark-mode .notification-title,
body.dark-theme .notification-title {
    color: #f1f5f9;
}

body.dark-mode .notification-message,
body.dark-theme .notification-message {
    color: #cbd5e1;
}

body.dark-mode .notification-message strong,
body.dark-theme .notification-message strong {
    color: #f1f5f9;
}

body.dark-mode .notification-close,
body.dark-theme .notification-close {
    color: #64748b;
}

body.dark-mode .notification-close:hover,
body.dark-theme .notification-close:hover {
    background: #0f172a;
    color: #f1f5f9;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

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

/* Анимация прогресс-бара для автозакрытия */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 0 var(--radius-lg);
    opacity: 0.3;
    animation: progressBar var(--duration, 5s) linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

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

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

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

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