/* Стили для уведомлений */

/* Dropdown уведомлений */
.notification-dropdown-menu {
    width: 380px !important;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.notification-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.notification-header h6 {
    color: white !important;
    font-weight: 600;
}

.notification-header .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.notification-item {
    transition: all 0.3s ease;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
}

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

.notification-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.notification-item.unread {
    background-color: #f0f8ff;
    border-left: 4px solid #007bff;
    position: relative;
}

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

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #007bff 0%, #0056b3 100%);
}

.notification-item .dropdown-item {
    padding: 0.75rem;
    border: none;
    background: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.notification-item .dropdown-item:hover {
    background: none;
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.notification-item:hover .notification-icon {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-icon i {
    font-size: 1.1rem;
}

.notification-content {
    flex: 1;
    min-width: 0; /* Позволяет flex-элементу сжиматься */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-message {
    color: #6c757d;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.75rem;
    color: #adb5bd;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.notification-time i {
    font-size: 0.7rem;
}

.notification-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.notification-indicator .badge {
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.notification-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0;
    flex-shrink: 0;
}

.notification-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.notification-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 0 0.5rem 0.5rem;
}

.notification-footer .btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.notification-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* Badge уведомлений */
#notification-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .notification-dropdown-menu {
        width: 320px !important;
        max-height: 350px;
    }
    
    .notification-header {
        padding: 0.75rem;
    }
    
    .notification-item .dropdown-item {
        padding: 0.75rem;
    }
    
    .notification-icon {
        width: 35px;
        height: 35px;
    }
    
    .notification-icon i {
        font-size: 1rem;
    }
    
    .notification-title {
        font-size: 0.85rem;
    }
    
    .notification-message {
        font-size: 0.75rem;
    }
    
    .notification-time {
        font-size: 0.7rem;
    }
    
    .notification-footer {
        padding: 0.75rem;
    }
}
