/* Container principal no cabeçalho */
.notifications-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

/* O botão do Sino com a bolinha */
.notification-bell-btn {
    background: transparent;
    border: none;
    color: var(--text-color, #495057);
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-btn:hover {
    background-color: var(--gray-light, #f8f9fa);
}

.bell-icon {
    width: 22px;
    height: 22px;
    color: #6c757d;
}

/* Bolinha vermelha de contador */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 3px;
    background-color: #ef4444; /* Vermelho vibrante */
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white; /* Cria um vazado estilo iOS */
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Efeito pulsante quando há notificação nova */
.notification-badge.pulse {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}


/* Dropdown List */
.notifications-dropdown {
    position: absolute;
    top: 50px;
    right: -10px; /* Alinhar um pouco para a direita proxima do avatar */
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color, #e9ecef);
    z-index: 1050;
    display: none; /* Escondido por padrão, toggle via JS */
    flex-direction: column;
    overflow: hidden;
}

.notifications-dropdown.show {
    display: flex;
    animation: slideDownFade 0.2s ease-out;
}

@keyframes slideDownFade {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Header do Dropdown */
.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #e9ecef);
    background-color: #fafbfc;
}

.notifications-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #343a40);
}

.mark-all-read-btn {
    background: none;
    border: none;
    color: var(--primary-color, #3b82f6);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    padding: 0;
}

.mark-all-read-btn:hover {
    text-decoration: underline;
}

/* Lista Scrollável */
.notifications-list {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.notifications-empty {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* Cada Item */
.notification-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 14px 36px 14px 16px; /* Espaço na direita para o botão X */
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none; /* Porque será um <a> no JS */
}

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

/* Destacar itens não lidos com um bg diferente */
.notification-item.unread {
    background-color: #eff6ff; /* Azul bem claro */
    border-left: 3px solid var(--primary-color, #3b82f6);
}
.notification-item.unread:hover {
    background-color: #e0f2fe;
}

.notification-title {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 4px;
}

.notification-body {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 linhas */
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 11px;
    color: #94a3b8;
    align-self: flex-start;
}

/* Botão de Fechar Individual */
.btn-close-notification {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close-notification:hover {
    background-color: #dcfce7; /* Verde clarinho */
    color: #16a34a; /* Verde mais escuro pra o check */
}
