/* ===================================== */
/*           NOTIFICATION TOAST          */
/* ===================================== */

/* Контейнер для уведомлений */
.notification-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: 100%;
}

/* Уведомление */
.notification-toast {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,215,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.notification-toast.active {
    opacity: 1;
    transform: translateX(0);
}

/* Анимация для нескольких уведомлений */
.notification-toast:nth-last-child(n+2) {
    animation: slideIn 0.3s ease;
}

.notification-toast:nth-last-child(n+3) {
    animation: slideIn 0.2s ease;
    font-size: 13px;
    padding: 10px 16px;
}

.notification-toast:nth-last-child(n+4) {
    animation: slideIn 0.15s ease;
    font-size: 12px;
    padding: 8px 14px;
}

/* Иконка */
.notification-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Контент */
.notification-content {
    flex: 1;
    word-break: break-word;
    line-height: 1.4;
}

/* Кнопка закрытия */
.notification-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

/* Прогресс-бар */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFD700, #ffaa00);
    width: 100%;
    transform-origin: left;
    animation: progress var(--duration) linear;
}

/* Разная длительность в зависимости от количества */
.notification-toast:nth-last-child(1) {
    --duration: 3000ms;
}

.notification-toast:nth-last-child(2) {
    --duration: 2500ms;
}

.notification-toast:nth-last-child(n+3) {
    --duration: 2000ms;
}

.notification-toast:nth-last-child(n+4) {
    --duration: 1500ms;
}

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

/* Типы уведомлений */
.notification-toast.success {
    border-left: 4px solid #4ade80;
}

.notification-toast.success .notification-progress {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

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

.notification-toast.error .notification-progress {
    background: linear-gradient(90deg, #ff4b4b, #ef4444);
}

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

.notification-toast.warning .notification-progress {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.notification-toast.info {
    border-left: 4px solid #FFD700;
}

/* Позиции */
.notification-container.top-left {
    top: 20px;
    left: 20px;
    bottom: auto;
    right: auto;
}

.notification-container.top-right {
    top: 20px;
    right: 20px;
    bottom: auto;
    left: auto;
}

.notification-container.bottom-left {
    bottom: 20px;
    left: 20px;
    right: auto;
}

.notification-container.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: auto;
    right: auto;
    align-items: center;
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Адаптив */
@media (max-width: 768px) {
    .notification-container {
        bottom: 90px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }

    .notification-toast {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .notification-toast:nth-last-child(n+3) {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .notification-toast {
        background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    }
}