/**
 * assets/css/notifications.css -Site Notifications System Styles
 * Matches the theme's premium design standards and reference mockups.
 */

/* ── Header Notification Bell Link ─────────────────────────── */
.adn-notification-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: none;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
	vertical-align: middle;
}

.adn-notification-link svg {
	width: 19px;
	height: 19px;
	stroke: currentColor;
	stroke-width: 1.8;
	transition: transform 0.2s ease;
}

.adn-notification-link:hover svg {
	transform: scale(1.08);
}

.adn-notification-link[hidden],
.adn-notification-link[style*="display:none"],
.adn-notification-link[style*="display: none"] {
	display: none !important;
}

/* Tiny crisp unread indicator dot */
.adn-notification-link__dot {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 6.5px;
	height: 6.5px;
	border-radius: 50%;
	background: #ef4444;
	box-shadow: 0 0 0 1.5px #ffffff, 0 1px 3px rgba(239, 68, 68, 0.4);
	pointer-events: none;
	z-index: 2;
}

.adn-notification-link__dot[hidden] {
	display: none !important;
}

/* Scrolled vs transparent header border adjustment */
.site-header:not(.scrolled):not(:has(.header-search:not([hidden]))) .adn-notification-link__dot {
	box-shadow: 0 0 0 1.5px #151e1b, 0 1px 3px rgba(239, 68, 68, 0.4);
}

/* ── Intermediate Notifications Page (/notifications/) ─────── */
.notifications-page {
	background: var(--color-bg-base, #f8fafc);
	min-height: 65vh;
}

/* Page with Sidebar Layout for Notifications */
.notif-page-layout {
	display: grid;
	grid-template-columns: 1fr 310px;
	gap: 36px;
	align-items: start;
}

.notif-main-col {
	min-width: 0;
}

.notif-sidebar-col {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.notif-sidebar-col .sc-card {
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.07);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
	border-radius: 14px;
	padding: 20px;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-sidebar-col .sc-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
	border-color: rgba(176, 141, 87, 0.4);
}

.notif-sidebar-col .sw-panel {
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.07);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
	border-radius: 14px;
}

@media (max-width: 960px) {
	.notif-page-layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	.notif-sidebar-col {
		position: static;
		max-height: none;
		overflow: visible;
	}
}

.notif-container {
	max-width: 740px;
	margin: 0 auto;
	padding: 0 16px;
}

/* Page Header */
.notif-header {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: 24px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.notif-header__title {
	font-size: clamp(1.15rem, 4vw, 1.35rem);
	font-weight: 700;
	color: #0f172a;
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	line-height: 1.3;
	word-break: normal;
}

.notif-header__count {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--secondary-color, #B08D57);
	background: rgba(176, 141, 87, 0.12);
	padding: 2px 9px;
	border-radius: 999px;
	line-height: 1.4;
}

/* Timeline Groups */
.notif-group {
	margin-bottom: 24px;
}

.notif-group-title {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #64748b;
	margin: 0 0 10px 4px;
}

/* Notification Card Item */
.notif-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px;
	background: #ffffff;
	border-radius: 14px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
	margin-bottom: 12px;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

.notif-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
	border-color: rgba(176, 141, 87, 0.35);
}

/* Clean unread accent (left accent + subtle heading dot, no broken tall vertical bar) */
.notif-card.is-unread {
	border-left: 3.5px solid #ef4444;
	border-color: rgba(239, 68, 68, 0.18) rgba(0, 0, 0, 0.06) rgba(0, 0, 0, 0.06) #ef4444;
	background: #ffffff;
}

.notif-card.is-unread .notif-card__heading::after {
	content: '';
	display: inline-block;
	width: 6.5px;
	height: 6.5px;
	border-radius: 50%;
	background: #ef4444;
	margin-left: 6px;
	vertical-align: middle;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

/* Left Avatar / Icon */
.notif-card__avatar-wrap {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	border: 1px solid rgba(0, 0, 0, 0.07);
}

.notif-card__avatar {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.notif-card__avatar-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
	color: #64748b;
}

.notif-card__avatar-placeholder svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
}

.notif-card__avatar-icon {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	background: #f1f5f9;
	color: #1e3a2f;
}

/* Card Content Body */
.notif-card__content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.notif-card__top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}

.notif-card__heading-group {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 10px;
	min-width: 0;
}

.notif-card__heading {
	font-size: 0.98rem;
	font-weight: 600;
	color: #0f172a;
	margin: 0;
	line-height: 1.35;
	word-break: break-word;
}

/* ── Meta Right (Time) ── */
.notif-card__meta-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* ── Edge Indicator Icon (Single clean icon docked at card top-right edge) ── */
.notif-card__edge-icon {
	position: absolute;
	top: 14px;
	right: 16px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	flex-shrink: 0;
	transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.notif-card__edge-icon svg {
	width: 14px;
	height: 14px;
}

/* Ensure heading & time clear the top-right indicator icon */
.notif-card--important .notif-card__top,
.notif-card--mandatory .notif-card__top {
	padding-right: 32px;
}

/* Important: Elegant warm amber/gold star icon */
.notif-card__edge-icon--important {
	background: rgba(245, 158, 11, 0.12);
	color: #d97706;
	border: 1px solid rgba(245, 158, 11, 0.32);
	box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.12);
}

.notif-card--important:not(.is-unread) {
	border-left: 3.5px solid #f59e0b;
}

.notif-card--important:hover {
	border-color: rgba(245, 158, 11, 0.4);
}

/* Mandatory: Crimson alert icon with soft halo pulse */
.notif-card__edge-icon--mandatory {
	background: rgba(239, 68, 68, 0.12);
	color: #dc2626;
	border: 1px solid rgba(239, 68, 68, 0.35);
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
	animation: notifPulse 2.4s infinite ease-in-out;
}

.notif-card--mandatory {
	border-left: 3.5px solid #ef4444 !important;
	background: linear-gradient(90deg, rgba(254, 242, 242, 0.45) 0%, #ffffff 45%);
}

.notif-card--mandatory:hover {
	border-color: rgba(239, 68, 68, 0.45);
}

.notif-card:hover .notif-card__edge-icon {
	transform: scale(1.15);
}

@keyframes notifPulse {
	0%, 100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.35);
		opacity: 0.65;
	}
}

.notif-card__time {
	flex-shrink: 0;
	font-size: 0.76rem;
	font-weight: 500;
	color: #94a3b8;
	white-space: nowrap;
}

/* Rich Description */
.notif-card__desc {
	font-size: 0.88rem;
	color: #475569;
	margin: 2px 0 8px;
	line-height: 1.55;
	word-break: break-word;
}

.notif-card__desc p {
	margin: 0 0 6px;
}

.notif-card__desc p:last-child {
	margin-bottom: 0;
}

.notif-card__desc a {
	color: var(--secondary-color, #B08D57);
	text-decoration: underline;
	word-break: break-all;
}

.notif-card__desc ul,
.notif-card__desc ol {
	margin: 4px 0 8px 18px;
	padding: 0;
}

.notif-card__desc li {
	margin-bottom: 3px;
}

/* Call to Action Link Button */
.notif-card__footer {
	margin-top: 8px;
}

.notif-card__cta,
.btn-outline-primary.notif-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--color-primary, #1e3a2f);
	background: transparent;
	border: 1.5px solid var(--color-primary, #1e3a2f);
	border-radius: var(--radius-sm, 8px);
	padding: 6px 14px;
	text-decoration: none;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	width: fit-content;
	line-height: 1.2;
}

.notif-card__cta:hover,
.btn-outline-primary.notif-card__cta:hover {
	background: var(--color-primary, #1e3a2f);
	color: #ffffff;
	border-color: var(--color-primary, #1e3a2f);
	box-shadow: 0 4px 12px rgba(30, 58, 47, 0.16);
	transform: translateY(-1px);
}

.notif-card__cta svg {
	width: 13px;
	height: 13px;
	stroke: currentColor;
	stroke-width: 2.2;
	transition: transform 0.15s ease;
}

.notif-card__cta:hover svg,
.btn-outline-primary.notif-card__cta:hover svg {
	transform: translateX(3px);
}

/* Empty State */
.notif-empty {
	text-align: center;
	padding: 50px 20px;
	background: #ffffff;
	border-radius: 16px;
	border: 1px dashed rgba(0, 0, 0, 0.12);
}

.notif-empty__icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #94a3b8;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 14px;
}

.notif-empty__icon svg {
	width: 26px;
	height: 26px;
	stroke: currentColor;
}

.notif-empty__title {
	font-size: 1.05rem;
	font-weight: 600;
	color: #1e293b;
	margin: 0 0 6px;
}

.notif-empty__text {
	font-size: 0.88rem;
	color: #64748b;
	margin: 0;
}

/* Responsive (Mobile Totally Refined) */
@media (max-width: 640px) {
	.notif-container {
		padding: 0 12px;
	}
	.notif-card {
		padding: 13px 14px;
		gap: 12px;
		border-radius: 12px;
		margin-bottom: 11px;
	}
	.notif-card__avatar-wrap {
		width: 38px;
		height: 38px;
	}
	.notif-card__edge-icon {
		top: 12px;
		right: 12px;
		width: 22px;
		height: 22px;
	}
	.notif-card--important .notif-card__top,
	.notif-card--mandatory .notif-card__top {
		padding-right: 28px;
	}
	.notif-card__top {
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 4px 10px;
	}
	.notif-card__heading {
		font-size: 0.92rem;
		line-height: 1.35;
	}
	.notif-card__time {
		font-size: 0.72rem;
	}
	.notif-card__desc {
		font-size: 0.84rem;
		line-height: 1.5;
	}
	.notif-card__cta {
		font-size: 0.76rem;
		padding: 4px 10px;
	}
}
