/* ================================================== */
/* Стили ТОЛЬКО для компонента уведомления            */
/* Версия БЕЗ CSS-переменных и глобальных стилей     */
/* ПРЕДПОЛАГАЕТСЯ, что Roboto и Material Icons       */
/* подключены на основной странице сайта.           */
/* ================================================== */

/* Контейнер уведомления: позиционирование и базовые свойства */
#notificationContainer {
    position: fixed;
    z-index: 1060; /* Убедитесь, что это значение достаточно высокое для вашего сайта */
    width: 95%;
    max-width: 350px;
    display: none; /* Скрыт по умолчанию */
    font-family: 'Roboto', sans-serif; /* Явно задаем шрифт для уведомления */
                                       /* Если хотите наследовать шрифт сайта, удалите эту строку */
    box-sizing: border-box; /* Изолируем расчет размеров */
    line-height: 1.5;       /* Базовая высота строки для уведомления */
    color: #202124;         /* Базовый цвет текста */
}
/* Применяем box-sizing ко всем дочерним элементам внутри контейнера */
#notificationContainer * {
    box-sizing: border-box;
    margin: 0; /* Базовый сброс отступов внутри */
    padding: 0;/* Базовый сброс полей внутри */
}

/* Позиция на компьютере */
@media (min-width: 768px) {
    #notificationContainer {
        bottom: 25px;
        right: 25px;
        width: 350px;
        top: auto;
        left: auto;
        transform: none;
        max-width: 350px;
    }
}

/* Позиция на мобильном */
@media (max-width: 767px) {
    #notificationContainer {
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100vw - 30px);
        width: 100%;
        right: auto;
        bottom: auto;
    }
}

/* Стили самого блока уведомления */
#notificationContainer .notification {
    background-color: #ffffff; /* var(--bg-color) */
    border-radius: 12px; /* var(--border-radius) */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08); /* var(--shadow) */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    border-left: 4px solid #4285f4; /* var(--primary-color) - базовый цвет полосы */
}

#notificationContainer .notification.show {
    transform: translateY(0);
    opacity: 1;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1); /* var(--shadow-hover) */
}

/* Начальная позиция для анимации на мобильных */
@media (max-width: 767px) {
    #notificationContainer .notification {
        transform: translateY(-40px);
    }
}

/* Шапка уведомления */
#notificationContainer .notification-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: rgba(66, 133, 244, 0.08); /* Светлый фон на основе primary-color */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Иконка приложения */
#notificationContainer .notification-icon {
    width: 28px;
    height: 28px;
    margin-right: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4285f4, #3367d6); /* var(--primary-color), var(--primary-dark) */
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

/* Имя приложения */
#notificationContainer .notification-app-name {
    font-size: 15px;
    color: #202124; /* var(--text-color) */
    font-weight: 500;
    overflow: hidden; /* Обрезка длинного текста */
    text-overflow: ellipsis; /* Многоточие */
    white-space: nowrap; /* Запрет переноса */
}

/* Время */
#notificationContainer .notification-time {
    margin-left: auto;
    padding-left: 10px; /* Отступ от имени приложения */
    font-size: 13px;
    color: #5f6368; /* var(--text-light) */
    white-space: nowrap;
    flex-shrink: 0;
}

/* Контентная часть */
#notificationContainer .notification-content {
    padding: 18px;
    display: flex;
    position: relative;
}

/* Картинка в уведомлении */
#notificationContainer .notification-image {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Текстовый блок */
#notificationContainer .notification-text {
    flex: 1;
    min-width: 0; /* Позволяет сжиматься */
}

/* Заголовок */
#notificationContainer .notification-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #202124; /* var(--text-color) */
}

/* Текст сообщения */
#notificationContainer .notification-message {
    font-size: 15px;
    color: #5f6368; /* var(--text-light) */
    margin-bottom: 12px;
    /* line-height наследуется от #notificationContainer */
}

/* Блок с кнопками действий */
#notificationContainer .notification-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Кнопка действия */
#notificationContainer .notification-action {
    background-color: rgba(66, 133, 244, 0.1); /* Фон на основе primary-color */
    color: #4285f4; /* var(--primary-color) */
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 18px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s;
    border: none;
    font-family: inherit; /* Наследуем шрифт от контейнера */
    line-height: 1; /* Нормализация высоты */
}

#notificationContainer .notification-action:hover {
    background-color: rgba(66, 133, 244, 0.2);
    text-decoration: none;
}

/* Иконка внутри кнопки действия */
#notificationContainer .notification-action .material-icons {
    font-size: 18px; /* Размер иконки */
    margin-left: 6px;
    /* Важно: Material Icons должны быть подключены на сайте */
    display: inline-block; /* Для корректного отображения */
    vertical-align: middle; /* Выравнивание по центру строки */
}

/* Кнопка "Закрыть" (крестик) */
#notificationContainer .notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368; /* var(--text-light) */
    cursor: pointer;
    font-size: 16px; /* Размер иконки крестика */
    opacity: 0;
    transition: all 0.2s;
    border: none;
    z-index: 2;
}

#notificationContainer .notification:hover .notification-close {
    opacity: 1;
    background: rgba(0, 0, 0, 0.15);
}

/* Анимация пульсации */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#notificationContainer .notification.pulse {
    animation: pulse 0.5s ease 2;
}

/* Бейдж (кружок) */
#notificationContainer .notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #fbbc05; /* Цвет бейджа - желтый */
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white; /* Белая обводка */
    z-index: 1;
}

/* Цвета полоски для разных уровней важности (если JS их устанавливает) */
/* Эти селекторы сработают, если JS добавит класс или изменит стиль */
#notificationContainer .notification[style*="border-left-color: rgb(251, 188, 5);"] /* #fbbc05 - high */ {
    /* Можно добавить доп. стили для high importance, если нужно */
}
#notificationContainer .notification[style*="border-left-color: rgb(52, 168, 83);"] /* #34a853 - medium */ {
    /* Можно добавить доп. стили для medium importance, если нужно */
}

/* Очистка возможных проблем с плавающими элементами (на всякий случай) */
#notificationContainer .notification::after {
    content: "";
    display: table;
    clear: both;
}