/**
 * Notification Bell & Dropdown Styles
 * Bloomberg-style notification center
 */

/* ===== Bell Container ===== */
.notification-bell-container {
	position: relative;
	display: flex;
	align-items: center;
}

/* ===== Bell Button ===== */
.notification-bell-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 8px;
	color: var(--text-muted);
	cursor: pointer;
	transition: all 0.2s ease;
}

.notification-bell-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--text-primary);
}

.notification-bell-btn.has-notifications {
	color: var(--text-primary);
}

.notification-bell-icon {
	width: 20px;
	height: 20px;
}

/* ===== Badge (same style as cart badge) ===== */
.notification-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: linear-gradient(135deg, #10b981, #059669);
	border-radius: 9px;
	border: 2px solid var(--bg-primary, #0a0e17);
	font-size: 0.6875rem;
	font-weight: 700;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* ===== Dropdown ===== */
.notification-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 360px;
	max-height: 480px;
	background: #131720; /* Solid fallback */
	background: var(--card-bg, #131720);
	border: 1px solid rgba(75, 85, 99, 0.3);
	border: 1px solid var(--border-subtle, rgba(75, 85, 99, 0.3));
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
	            0 0 0 1px rgba(255, 255, 255, 0.05);
	overflow: hidden;
	z-index: 9999;
}

@media (max-width: 480px) {
	.notification-dropdown {
		position: fixed;
		top: 60px;
		right: 8px;
		left: 8px;
		width: auto;
	}
}

/* ===== Header ===== */
.notification-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid var(--border-subtle);
}

.notification-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-primary);
	margin: 0;
}

.notification-mark-read-btn {
	background: transparent;
	border: none;
	font-size: 12px;
	color: var(--accent-green);
	cursor: pointer;
	transition: opacity 0.15s;
}

.notification-mark-read-btn:hover {
	opacity: 0.8;
}

/* ===== List ===== */
.notification-list {
	max-height: 360px;
	overflow-y: auto;
}

/* ===== Loading ===== */
.notification-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
}

.notification-loading-spinner {
	width: 24px;
	height: 24px;
	border: 2px solid var(--border-subtle);
	border-top-color: var(--accent-green);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* ===== Empty State ===== */
.notification-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	color: var(--text-muted);
	font-size: 13px;
}

.notification-empty-icon {
	width: 32px;
	height: 32px;
	margin-bottom: 12px;
	opacity: 0.4;
}

/* ===== Item ===== */
.notification-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--border-subtle);
	cursor: pointer;
	transition: background 0.15s;
}

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

.notification-item:hover {
	background: rgba(255, 255, 255, 0.04);
}

.notification-item.unread {
	background: rgba(0, 209, 102, 0.05);
}

.notification-item.unread:hover {
	background: rgba(0, 209, 102, 0.08);
}

/* Priority styles */
.notification-item.notification-high,
.notification-item.notification-critical {
	border-left: 3px solid var(--accent-orange);
	padding-left: 13px;
}

.notification-item.notification-critical {
	border-left-color: var(--negative);
}

/* ===== Item Icon ===== */
.notification-item-icon {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	color: var(--text-muted);
}

.notification-item-icon svg {
	width: 16px;
	height: 16px;
}

.notification-item.unread .notification-item-icon {
	background: rgba(0, 209, 102, 0.15);
	color: var(--accent-green);
}

.notification-item.notification-high .notification-item-icon,
.notification-item.notification-critical .notification-item-icon {
	color: var(--accent-orange);
}

.notification-item.notification-critical .notification-item-icon {
	color: var(--negative);
}

/* ===== Item Content ===== */
.notification-item-content {
	flex: 1;
	min-width: 0;
}

.notification-item-title {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-primary);
	margin-bottom: 2px;
	line-height: 1.4;
}

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

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

.notification-item-time {
	font-size: 11px;
	color: var(--text-muted);
}

/* ===== Dismiss Button ===== */
.notification-item-dismiss {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 4px;
	color: var(--text-muted);
	cursor: pointer;
	opacity: 0;
	transition: all 0.15s;
}

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

.notification-item-dismiss:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text-primary);
}

.notification-item-dismiss svg {
	width: 14px;
	height: 14px;
}

/* ===== Footer ===== */
.notification-footer {
	padding: 12px 16px;
	border-top: 1px solid var(--border-subtle);
	text-align: center;
}

.notification-view-all {
	font-size: 12px;
	font-weight: 500;
	color: var(--accent-green);
	text-decoration: none;
	transition: opacity 0.15s;
}

.notification-view-all:hover {
	opacity: 0.8;
}

/* ===== Light Mode ===== */
:root:not(.dark) .notification-dropdown {
	background: #ffffff;
	border-color: rgba(0, 0, 0, 0.12);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
	            0 0 0 1px rgba(0, 0, 0, 0.05);
}

:root:not(.dark) .notification-header {
	border-color: rgba(0, 0, 0, 0.08);
}

:root:not(.dark) .notification-item {
	border-color: rgba(0, 0, 0, 0.06);
}

:root:not(.dark) .notification-item:hover {
	background: rgba(0, 0, 0, 0.02);
}

:root:not(.dark) .notification-item.unread {
	background: rgba(0, 209, 102, 0.06);
}

:root:not(.dark) .notification-item-icon {
	background: rgba(0, 0, 0, 0.04);
}

:root:not(.dark) .notification-bell-btn:hover {
	background: rgba(0, 0, 0, 0.05);
}

:root:not(.dark) .notification-footer {
	border-color: rgba(0, 0, 0, 0.08);
}
