
/* Анимации для уведомлений */
@keyframes slideUp{
    0%{
        transform: translateY(100%);
        opacity: 0;
    }100%{
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown{
    0%{
        transform: translateY(0);
        opacity: 1;
    }100%{
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes widthToZero{
    0%{
        width: 100%;
    }100%{
        width: 0;
    }
}

/* Контейнер уведомлений - расположен слева от чата */
.notify {
    position: fixed;
    z-index: 999999;
    height: 0;
    bottom: 80px; /* Выше кнопки чата (bottom: 25px) и самого чата */
    right: 380px; /* Слева от правого сайдбара (360px) + отступ 20px */
    width: auto;
    transition: right 0.3s ease-in-out; /* Плавное перемещение при сворачивании чата */
}

/* При свернутом чате уведомления сдвигаются к правому краю */
body:has(.right-sidebar.hidden) .notify,
body.chat-hidden .notify {
    right: 20px;
}

/* Элемент уведомления */
.notify__item {
    position: absolute;
    bottom: 0;
    right: 0;
    opacity: 0;
    margin-top: 8px;
    cursor: pointer;
}

/* Последний элемент (самый нижний) */
.notify__item:last-child {
    bottom: 0;
}

/* Элементы выше последнего позиционируются снизу вверх */
.notify__item:not(:last-child) {
    bottom: auto;
}

/* Стили для всех типов уведомлений - серые */
.notify__item.success .notify__item-wrap,
.notify__item.error .notify__item-wrap,
.notify__item.info .notify__item-wrap,
.notify__item.warning .notify__item-wrap,
.notify__item.default .notify__item-wrap{
    background: rgba(22, 25, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.notify__item.show {
    opacity: 1;
    animation: slideUp 0.3s ease-out forwards;
}

.notify__item:not(.show) {
    z-index: 0;
    animation: slideDown 0.25s ease-in forwards;
    opacity: 0;
}

.notify__item.hiding {
    animation: slideDown 0.25s ease-in forwards;
    opacity: 0;
}

/* Обертка уведомления - уменьшенный размер */
.notify__item-wrap {
    transition: all 0.25s ease-in-out;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box;
    width: 280px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Эффект при наведении - показать что можно кликнуть */
.notify__item-wrap:hover {
    transform: translateX(-2px);
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Иконка уведомления - уменьшенная */
.notify__aside {
    width: 14px;
    height: 14px;
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.7;
}

.notify__aside img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.8);
}

.notify__aside svg {
    width: 100%;
    height: 100%;
}

/* Заголовок уведомления */
.notify__title {
    padding-bottom: 3px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
}

/* Текст сообщения - серый */
.notify__message {
    flex: 1;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: break-word;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

/* Все типы сообщений в серых тонах */
.notify__item.success .notify__message,
.notify__item.error .notify__message,
.notify__item.info .notify__message,
.notify__item.warning .notify__message,
.notify__item.default .notify__message {
    color: rgba(255, 255, 255, 0.75);
}

/* Индикатор прогресса (таймер) - серый */
.notify__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    border-radius: 0 0 12px 12px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    transition: none;
    z-index: 2;
}

.notify__item.error .notify__progress,
.notify__item.success .notify__progress,
.notify__item.info .notify__progress,
.notify__item.warning .notify__progress,
.notify__item.default .notify__progress{
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* Останавливаем анимацию индикатора при наведении */
.notify__item-wrap:hover .notify__progress {
    animation-play-state: paused !important;
}

.notify__item.error .notify__item-wrap::before,
.notify__item.success .notify__item-wrap::before,
.notify__item.info .notify__item-wrap::before,
.notify__item.warning .notify__item-wrap::before,
.notify__item.default .notify__item-wrap::before{
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
}


/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .notify {
        right: 20px;
        width: auto;
        bottom: 80px;
    }
    
    .notify__item-wrap {
        width: calc(100vw - 80px);
        max-width: 280px;
    }
}