/**
 * Estilos para Sistema de Notificações
 * Versão: 1.0.0
 */

/* ===== CONTADORES DE NOTIFICAÇÃO ===== */
.notification-count,
.notification-badge {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
    animation: pulse 2s infinite;
}

.notification-count.zero,
.notification-badge.zero {
    display: none !important;
}

/* ===== LISTA DE NOTIFICAÇÕES ===== */
.notification-list,
.notifications-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

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

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

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

.notification-item.unread {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.notification-item.unread .notification-title {
    font-weight: 600;
}

/* ===== PRIORIDADES ===== */
.notification-item.priority-urgent {
    border-left-color: #dc3545 !important;
    background-color: #f8d7da;
}

.notification-item.priority-high {
    border-left-color: #fd7e14 !important;
    background-color: #fff3cd;
}

.notification-item.priority-normal {
    border-left-color: #0d6efd !important;
}

.notification-item.priority-low {
    border-left-color: #6c757d !important;
}

/* ===== ÍCONES DE NOTIFICAÇÃO ===== */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    flex-shrink: 0;
}

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

/* ===== CONTEÚDO DA NOTIFICAÇÃO ===== */
.notification-content {
    min-width: 0; /* Para permitir text-overflow */
}

.notification-title {
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== AÇÕES DE NOTIFICAÇÃO ===== */
.notification-actions {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.notification-actions .btn {
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
}

.notification-actions .btn:hover {
    color: #495057;
    background-color: #e9ecef;
}

/* ===== DROPDOWN DE NOTIFICAÇÕES ===== */
.notification-dropdown .dropdown-menu {
    width: 500px;
    max-width: 90vw;
    padding: 0;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.notification-header h6 {
    margin: 0;
    font-weight: 600;
}

.notification-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* ===== ESTADOS DE CARREGAMENTO ===== */
.notification-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.notification-loading .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* ===== NOTIFICAÇÃO VAZIA ===== */
.notification-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== FILTROS DE NOTIFICAÇÃO ===== */
.notification-filters {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.notification-filter-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    background-color: white;
    color: #6c757d;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.notification-filter-btn:hover,
.notification-filter-btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* ===== BADGES DE CATEGORIA ===== */
.notification-category-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.75rem;
    background-color: #e9ecef;
    color: #495057;
}

/* ===== ANIMAÇÕES ===== */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item {
    animation: slideIn 0.3s ease;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .notification-dropdown .dropdown-menu {
        width: 95vw !important;
        max-width: 95vw !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin-top: 0.5rem;
        position: fixed !important;
    }
    
    .notification-dropdown {
        position: static;
    }
    
    .notification-item {
        padding: 0.75rem !important;
    }
    
    .notification-actions {
        opacity: 1; /* Sempre visível em mobile */
    }
    
    .notification-message {
        -webkit-line-clamp: 3; /* Mais linhas em mobile */
    }
    
    /* Ajustes para o botão de notificações em mobile */
    /* .notification-dropdown .btn {
        padding: 0.5rem;
        border-radius: 50%;
    }
    
    .notification-dropdown .btn i {
        font-size: 1.1rem;
    } */
    
    /* Garantir que o dropdown não seja cortado */
    .navbar-nav .dropdown-menu {
        position: absolute;
    }
}


/* ===== UTILITÁRIOS ===== */
.notification-scroll-thin::-webkit-scrollbar {
    width: 6px;
}

.notification-scroll-thin::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.notification-scroll-thin::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notification-scroll-thin::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===== TOAST NOTIFICATIONS ===== */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-left: 4px solid #0d6efd;
    animation: slideInRight 0.3s ease;
}

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

.notification-toast.success {
    border-left-color: #198754;
}

.notification-toast.warning {
    border-left-color: #ffc107;
}

.notification-toast.error {
    border-left-color: #dc3545;
}