/**
 * Notification Board - Pure CSS Frontend Styles
 * Lightweight, accessible, responsive, white-label
 */

:root {
	--nb-card-bg: #ffffff;
	--nb-card-border: #e2e8f0;
	--nb-card-radius: 12px;
	--nb-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	--nb-card-shadow-hover: 0 12px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
	
	--nb-text-primary: #1e293b;
	--nb-text-secondary: #64748b;
	--nb-text-muted: #94a3b8;
	
	--nb-badge-new-bg: #eff6ff;
	--nb-badge-new-text: #2563eb;
	--nb-badge-new-border: #bfdbfe;
	
	--nb-badge-important-bg: #fffbeb;
	--nb-badge-important-text: #d97706;
	--nb-badge-important-border: #fde68a;
	
	--nb-btn-bg: #2563eb;
	--nb-btn-hover-bg: #1d4ed8;
	--nb-btn-text: #ffffff;
	
	--nb-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	
	--nb-ticker-speed: 30s;
	--nb-ticker-height: 520px;
}

/* Main Board Wrapper & Continuous Ticker Container */
.nb-notification-board,
.notification-board-wrapper {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	font-family: var(--nb-font-family);
	box-sizing: border-box;
}

.nb-ticker-container {
	position: relative;
	width: 100%;
	max-width: 100%;
	height: var(--nb-ticker-height, 300px);
	overflow: hidden;
	border-radius: var(--nb-card-radius);
	padding: 4px;
	box-sizing: border-box;
}

/* Soft Fade Masks at top & bottom of ticker */
.nb-ticker-container::before,
.nb-ticker-container::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 36px;
	z-index: 10;
	pointer-events: none;
}

.nb-ticker-container::before {
	top: 0;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
}

.nb-ticker-container::after {
	bottom: 0;
	background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Continuous Vertical Auto-Scrolling Track */
.nb-ticker-track {
	display: flex;
	flex-direction: column;
	width: 100%;
	animation: nbTickerVertical var(--nb-ticker-speed) linear infinite;
	will-change: transform;
}

/* Pause on Hover */
.nb-ticker-container:hover .nb-ticker-track,
.nb-ticker-track:hover {
	animation-play-state: paused;
}

.nb-ticker-group {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 8px 0;
}

@keyframes nbTickerVertical {
	0% {
		transform: translateY(100%);
	}
	95% {
		transform: translateY(-100%);
	}
	100% {
		transform: translateY(-100%);
	}
}

.nb-notification-board *,
.nb-notification-board *::before,
.nb-notification-board *::after {
	box-sizing: border-box;
}

/* Notification Card */
.nb-card {
	background-color: var(--nb-card-bg);
	border: 1px solid var(--nb-card-border);
	border-radius: var(--nb-card-radius);
	box-shadow: var(--nb-card-shadow);
	padding: 20px 24px;
	position: relative;
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.nb-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--nb-card-shadow-hover);
	border-color: #cbd5e1;
}

/* Accent for Important Notification */
.nb-card-important {
	border-left: 4px solid var(--nb-badge-important-text);
}

/* Card Header Layout */
.nb-card-header {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

@media (min-width: 600px) {
	.nb-card-header {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
	}
}

.nb-title-container {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

/* Badges Container */
.nb-badges-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/* Individual Badge Base */
.nb-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.2;
	white-space: nowrap;
}

.nb-badge-new {
	background-color: var(--nb-badge-new-bg);
	color: var(--nb-badge-new-text);
	border: 1px solid var(--nb-badge-new-border);
	animation: nbSoftPulseNew 1.2s ease-in-out infinite;
}

.nb-badge-important {
	background-color: var(--nb-badge-important-bg);
	color: var(--nb-badge-important-text);
	border: 1px solid var(--nb-badge-important-border);
	animation: nbSoftPulseImportant 1.8s ease-in-out infinite;
}

/* Animations for v1.1.0 */
@keyframes nbSoftPulseNew {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.45;
		transform: scale(0.96);
	}
}

@keyframes nbSoftPulseImportant {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.5;
		transform: scale(0.97);
	}
}

@keyframes nbCardSlideUp {
	0% {
		opacity: 0;
		transform: translateY(18px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Entrance animation applied on card load */
.nb-card {
	animation: nbCardSlideUp 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delay for cards appearing sequentially on page load */
.nb-card:nth-child(1) { animation-delay: 0ms; }
.nb-card:nth-child(2) { animation-delay: 80ms; }
.nb-card:nth-child(3) { animation-delay: 160ms; }
.nb-card:nth-child(4) { animation-delay: 240ms; }
.nb-card:nth-child(5) { animation-delay: 320ms; }
.nb-card:nth-child(6) { animation-delay: 400ms; }

/* Card Title */
.nb-card-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--nb-text-primary);
	line-height: 1.4;
}

/* Date Display */
.nb-card-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	color: var(--nb-text-secondary);
	font-weight: 500;
	white-space: nowrap;
}

.nb-date-icon {
	width: 14px;
	height: 14px;
	fill: currentColor;
	opacity: 0.75;
}

/* Description Text */
.nb-card-description {
	color: var(--nb-text-primary);
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 0;
}

.nb-card-description p {
	margin: 0 0 8px 0;
}

.nb-card-description p:last-child {
	margin-bottom: 0;
}

/* Download PDF Action Footer */
.nb-card-actions {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding-top: 4px;
}

.nb-pdf-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background-color: var(--nb-btn-bg);
	color: var(--nb-btn-text);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 8px;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	cursor: pointer;
	border: none;
}

.nb-pdf-button:hover,
.nb-pdf-button:focus-visible {
	background-color: var(--nb-btn-hover-bg);
	color: var(--nb-btn-text);
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
	outline: none;
}

.nb-pdf-icon {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* Empty State Styling */
.nb-empty-state {
	background-color: var(--nb-card-bg);
	border: 1px dashed var(--nb-card-border);
	border-radius: var(--nb-card-radius);
	padding: 32px 24px;
	text-align: center;
	color: var(--nb-text-secondary);
}

.nb-empty-state p {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 500;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
	.nb-card {
		padding: 16px 18px;
	}

	.nb-card-title {
		font-size: 1rem;
	}

	.nb-pdf-button {
		width: 100%;
		justify-content: center;
	}
}
