/**
 * Стили для системы уведомлений (колокольчик в шапке)
 */

/* Контейнер колокольчика */
.notification-bell-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Иконка колокольчика */
.notification-bell-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted, #cccccc);
    font-size: 18px;
}

.notification-bell-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light, #ffffff);
}

.notification-bell-container.active .notification-bell-icon {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-light, #ffffff);
}

/* Бейдж с количеством */
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: translate(25%, -25%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: translate(25%, -25%) scale(1); }
    50% { transform: translate(25%, -25%) scale(1.05); }
}

/* Выпадающий список */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 360px;
    max-width: calc(100vw - 20px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Заголовок дропдауна */
.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}

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

.notification-dropdown-action {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
    color: #007bff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-dropdown-action:hover {
    background: #f0f7ff;
    color: #0056b3;
}

/* Список уведомлений */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Элемент уведомления */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-item.unread:hover {
    background: #e6f2ff;
}

/* Иконка в уведомлении */
.notification-item-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
}

.notification-item.unread .notification-item-icon {
    background: #007bff;
    color: #fff;
}

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

.notification-item-title {
    font-weight: 500;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 2px;
    word-wrap: break-word;
}

.notification-item.read .notification-item-title {
    color: #666;
}

.notification-item-message {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-item-time {
    font-size: 11px;
    color: #999;
}

.notification-item-author {
    font-size: 11px;
    color: #999;
}

.notification-item-author::before {
    content: '•';
    margin-right: 8px;
}

/* Точка непрочитанного */
.notification-item-dot {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #007bff;
}

/* Пустое состояние */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
}

.notification-empty i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-empty span {
    font-size: 14px;
}

/* Футер дропдауна */
.notification-dropdown-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    text-align: center;
}

.notification-dropdown-footer a {
    font-size: 13px;
    color: #007bff;
    text-decoration: none;
}

.notification-dropdown-footer a:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 480px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        right: -10px;
    }
    
    .notification-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .notification-item-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Светлая тема - корректировки для шапки */
.light-theme .notification-bell-icon {
    color: #666;
}

.light-theme .notification-bell-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #333;
}

.light-theme .notification-bell-container.active .notification-bell-icon {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

