/* =============================================================================
   NotificationCenter — MatDash-inspired dual-use styles
   ============================================================================= */

/* ---- Shared: notification item ---- */
.nc-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f5f5f5;
	cursor: pointer;
	transition: background 0.15s ease;
	position: relative;
}

.nc-item:last-child { border-bottom: none; }
/* No negative margins: they widened the row on hover and popped a horizontal scrollbar */
.nc-item:hover { background: #f8fafc; border-radius: 8px; }
.nc-item-done { opacity: 0.5; }

.nc-icon-circle {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 0.95rem;
}

.nc-item-body {
	flex: 1;
	min-width: 0;
}

.nc-item-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}

.nc-item-title {
	font-size: 0.84rem;
	font-weight: 600;
	color: #2A3547;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nc-item-time {
	color: #a0aec0;
	font-size: 0.72rem;
	flex-shrink: 0;
	white-space: nowrap;
}

.nc-item-desc {
	display: block;
	color: #718096;
	font-size: 0.76rem;
	line-height: 1.3;
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* AI summary block */
.nc-ai-summary {
	display: flex;
	align-items: flex-start;
	gap: 5px;
	margin-top: 4px;
	padding: 4px 8px;
	background: #f0f4ff;
	border-left: 2px solid #5d87ff;
	border-radius: 3px;
	font-size: 0.72rem;
	line-height: 1.35;
	color: #334155;
}
.nc-ai-summary span {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.nc-ai-icon { flex-shrink: 0; margin-top: 1px; opacity: 0.7; }
.nc-ai-summary-modal { margin-bottom: 14px; padding: 8px 12px; font-size: 0.82rem; }
.nc-ai-summary-modal span { -webkit-line-clamp: unset; overflow: visible; }

.nc-item-done-label {
	display: block;
	color: #4caf50;
	font-size: 0.7rem;
	margin-top: 2px;
}

/* Priority + deadline meta (notify_user actionable notifications) */
.nc-item-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	flex-wrap: wrap;
}

.nc-prio-tag {
	display: inline-flex;
	align-items: center;
	background: #ffebee;
	color: #c62828;
	font-size: 0.64rem;
	font-weight: 700;
	padding: 1px 7px;
	border-radius: 10px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.nc-item-deadline {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #b45309;
	font-size: 0.72rem;
	font-weight: 600;
}

/* Item hover actions */
.nc-item-actions {
	display: none;
	gap: 4px;
	flex-shrink: 0;
	align-self: center;
}

.nc-item:hover .nc-item-actions { display: flex; }

/* ---- Buttons ---- */
.nc-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border: 1px solid #e0e0e0;
	border-radius: 7px;
	background: #fff;
	color: #718096;
	font-size: 0.74rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.nc-btn:hover { border-color: #5D87FF; color: #5D87FF; }

/* Icon-only button (header actions) */
.nc-btn-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	background: #fff;
	color: #a0aec0;
	font-size: 0.8rem;
	cursor: pointer;
	transition: all 0.15s ease;
}

.nc-btn-icon:hover { border-color: #5D87FF; color: #5D87FF; background: rgba(93,135,255,0.04); }

.nc-btn-icon.nc-btn-success {
	border-color: #4caf50;
	color: #4caf50;
}

.nc-btn-icon.nc-btn-success:hover {
	background: #4caf50;
	color: #fff;
}

.nc-btn-success {
	border-color: #4caf50;
	color: #4caf50;
}

.nc-btn-success:hover {
	background: #4caf50;
	color: #fff;
}

.nc-btn-sm {
	padding: 3px 7px;
	border: none;
	border-radius: 6px;
	background: #f5f5f5;
	color: #999;
	font-size: 0.7rem;
	cursor: pointer;
	transition: all 0.15s ease;
}

.nc-btn-sm.nc-btn-success:hover { background: #e8f5e9; color: #4caf50; }
.nc-btn-sm.nc-btn-danger:hover { background: #ffebee; color: #f44336; }

/* Notification item action buttons row */
.nc-item-btns {
	display: flex;
	gap: 5px;
	margin-top: 6px;
	flex-wrap: wrap;
}

.nc-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border: none;
	border-radius: 6px;
	font-size: 0.7rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s ease;
}

.nc-action-details {
	background: #fff3e0;
	color: #e65100;
}
.nc-action-details:hover { background: #ffe0b2; }

.nc-action-link {
	background: #e3f2fd;
	color: #1565c0;
}
.nc-action-link:hover { background: #bbdefb; color: #1565c0; }

.nc-action-ok {
	background: #e8f5e9;
	color: #2e7d32;
}
.nc-action-ok:hover { background: #c8e6c9; }

.nc-action-close {
	background: #fce4ec;
	color: #c62828;
}
.nc-action-close:hover { background: #f8bbd0; }

/* Detail dialog content */
.nc-detail-content {
	font-size: 0.85rem;
}

.nc-detail-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 10px 0;
}

.nc-detail-content table th,
.nc-detail-content table td {
	padding: 6px 10px;
	border: 1px solid #e0e0e0;
	font-size: 0.8rem;
}

.nc-detail-content table th {
	background: #f5f7fa;
	font-weight: 600;
}

.nc-detail-content h5, .nc-detail-content h6 {
	margin: 8px 0;
}

/* ---- Mode WIDGET (inside WidgetWrapper) ---- */
.nc-widget-actions {
	margin-bottom: 4px;
}

.nc-widget-list {
	max-height: 400px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
}

/* Widget: 2 lines so the end of the message (date, poste) stays readable in a narrow column */
.nc-widget .nc-item-desc {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	white-space: normal;
	text-overflow: clip;
}

.nc-empty {
	text-align: center;
	color: #a0aec0;
	padding: 20px 0;
}

.nc-empty p { margin-top: 8px; font-size: 0.85rem; }

/* ---- Mode DROPDOWN ---- */
.nc-dropdown-container {
	position: relative;
	display: inline-flex;
}

.nc-bell {
	position: relative;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: #718096;
	font-size: 1.2rem;
	transition: color 0.15s ease;
	border-radius: 50%;
}

.nc-bell:hover {
	color: #5D87FF;
	background: rgba(93, 135, 255, 0.06);
}

.nc-bell-badge {
	position: absolute;
	top: 2px;
	right: 0;
	background: #f44336;
	color: #fff;
	font-size: 0.6rem;
	font-weight: 700;
	padding: 1px 5px;
	border-radius: 10px;
	min-width: 16px;
	text-align: center;
	line-height: 1.4;
}

.nc-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 360px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.06);
	z-index: 1000;
	overflow: hidden;
	animation: ncSlideIn 0.2s ease;
}

@keyframes ncSlideIn {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

.nc-dropdown-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 12px;
	border-bottom: 1px solid #f0f0f0;
}

.nc-dropdown-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #2A3547;
	margin: 0;
}

.nc-unread-badge {
	background: #5D87FF;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 12px;
}

.nc-dropdown-list {
	max-height: 380px;
	overflow-y: auto;
	padding: 4px 16px;
	scrollbar-width: thin;
}

.nc-dropdown .nc-item {
	padding: 10px 4px;
	cursor: default;
	border-radius: 6px;
	transition: background 0.15s;
}

.nc-item.nc-item-clickable {
	cursor: pointer;
}

.nc-item.nc-item-clickable:hover {
	background: #edf2f7;
}

.nc-dropdown .nc-icon-circle {
	width: 38px;
	height: 38px;
	font-size: 0.9rem;
}

.nc-dropdown .nc-item-title {
	font-size: 0.82rem;
}

.nc-dropdown-footer {
	display: block;
	text-align: center;
	padding: 14px;
	background: #5D87FF;
	color: #fff;
	font-weight: 600;
	font-size: 0.85rem;
	text-decoration: none;
	transition: background 0.15s ease;
}

.nc-dropdown-footer:hover {
	background: #4a73e6;
	color: #fff;
}

/* ===== Comment mention modal ===== */
.comment-detail-header {
	margin-bottom: 12px;
	font-size: 0.9rem;
}

.comment-detail-body {
	margin: 0;
	padding: 12px 16px;
	border-left: 3px solid #5d87ff;
	background: #f8fafc;
	color: #1e293b;
	border-radius: 0 6px 6px 0;
}

.mention-tag {
	color: #2563eb;
	font-weight: 700;
	background: #eff6ff;
	padding: 1px 6px;
	border-radius: 4px;
}
