/* VRTL Forum Pulse
   Uses the theme's variables where it finds them (fonts, radii, shadows of
   the lazionet theme) and falls back to the same values elsewhere, e.g. in
   embed.html. */

.vrtl-pulse {
	--vp-ink: #151C28;
	--vp-muted: #5B6B7A;
	--vp-blue: #15366F;
	--vp-link: #1C4792;
	--vp-sky: #EAF7FD;
	--vp-line: #E1ECF2;
	--vp-hover: #F3FAFE;
	--vp-new: #FFF4CC;
	--vp-red: #E5484D;

	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: #fff;
	color: var(--vp-ink);
	font-family: var(--f-body, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif);
	font-size: 0.9375rem;
	line-height: 1.25;
	border-radius: var(--r-surface, 10px);
	box-shadow: var(--sh-2, 0 1px 2px rgba(20, 60, 80, .05), 0 4px 10px -2px rgba(20, 60, 80, .09));
	text-align: left;
}
.vrtl-pulse *,
.vrtl-pulse *::before {
	box-sizing: border-box;
}
.vrtl-pulse[hidden],
.vrtl-pulse [hidden] {
	display: none !important;
}
.vrtl-pulse-inline {
	margin: 0 0 12px;
}

/* Head: live label and title */
.vrtl-pulse .vp-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: var(--vp-blue);
	color: #fff;
}
.vrtl-pulse .vp-live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	padding: 1px 8px 1px 6px;
	background: rgba(255, 255, 255, .14);
	border-radius: var(--r-pill, 999px);
	font-family: var(--f-data, "IBM Plex Mono", ui-monospace, Consolas, monospace);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: .08em;
}
.vrtl-pulse .vp-live i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--vp-red);
	animation: vp-beat 1.6s ease-in-out infinite;
}
.vrtl-pulse .vp-title {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-family: var(--f-display, "Archivo", "Segoe UI", system-ui, sans-serif);
	font-size: 0.9375rem;
	font-weight: 700;
}

/* Counter */
.vrtl-pulse .vp-online {
	padding: 3px 12px;
	background: var(--vp-sky);
	border-bottom: 1px solid var(--vp-line);
	color: var(--vp-blue);
	font-size: 0.8125rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

/* Rows */
.vrtl-pulse .vp-list {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.vrtl-pulse .vp-list li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--vp-line);
}
.vrtl-pulse .vp-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 4px 12px;
	color: inherit;
	text-decoration: none;
}
.vrtl-pulse .vp-row:hover,
.vrtl-pulse .vp-row:focus-visible {
	background: var(--vp-hover);
	text-decoration: none;
}
.vrtl-pulse .vp-row:focus-visible {
	outline: 2px solid var(--vp-link);
	outline-offset: -2px;
}
.vrtl-pulse .vp-new {
	animation: vp-in .6s ease-out, vp-glow 3s ease-out;
}

.vrtl-pulse .vp-av {
	flex: none;
	width: 24px;
	height: 24px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--vp-sky);
}
.vrtl-pulse .vp-av img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.vrtl-pulse .vp-av svg {
	display: block;
	width: 100%;
	height: 100%;
	padding: 4px;
	fill: var(--vp-link);
}
.vrtl-pulse .vp-av-dot {
	width: 10px;
	height: 10px;
	margin: 4px 4px 0;
}

.vrtl-pulse .vp-body {
	display: flex;
	flex-direction: column;
	gap: 0;
	flex: 1 1 auto;
	min-width: 0;
}
.vrtl-pulse .vp-meta {
	display: flex;
	align-items: baseline;
	gap: 6px;
}
.vrtl-pulse .vp-name {
	flex: 0 1 auto;
	max-width: 50%;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--vp-blue);
	font-weight: 600;
}
.vrtl-pulse .vp-badge {
	flex: none;
	display: inline-flex;
	align-self: center;
	width: 14px;
	height: 14px;
	margin-left: -3px;
}
.vrtl-pulse .vp-badge svg {
	width: 100%;
	height: 100%;
	fill: #3498db;
}
.vrtl-pulse .vp-time {
	flex: none;
	margin-left: auto;
	color: var(--vp-muted);
	font-family: var(--f-data, "IBM Plex Mono", ui-monospace, Consolas, monospace);
	font-size: 0.75rem;
}
.vrtl-pulse .vp-text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	color: var(--vp-ink);
	font-size: 0.875rem;
	line-height: 1.25;
	overflow-wrap: anywhere;
}
.vrtl-pulse .vp-topic {
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--vp-link);
	font-size: 0.75rem;
}
.vrtl-pulse .vp-topic::before {
	content: "\203A\00A0";
	color: var(--vp-muted);
}
.vrtl-pulse .vp-row:hover .vp-topic {
	text-decoration: underline;
}

.vrtl-pulse .vp-empty {
	flex: 1 1 auto;
	padding: 10px 12px;
	color: var(--vp-muted);
	font-size: 0.875rem;
}

/* Invitation for guests */
.vrtl-pulse .vp-signup {
	display: block;
	flex: none;
	padding: 6px 12px;
	background: var(--vp-link);
	color: #fff;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}
.vrtl-pulse .vp-signup:hover,
.vrtl-pulse .vp-signup:focus-visible {
	background: var(--vp-blue);
	color: #fff;
	text-decoration: none;
}

/* embed.html: the box fills the iframe, the page that embeds decides the size */
html:has(> body.vrtl-pulse-embed),
body.vrtl-pulse-embed {
	height: 100%;
	margin: 0;
	background: transparent;
}
body.vrtl-pulse-embed .vrtl-pulse {
	height: 100%;
}

@keyframes vp-beat {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: .45; transform: scale(.8); }
}
@keyframes vp-in {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: none; }
}
@keyframes vp-glow {
	from { background: var(--vp-new); }
	to { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
	.vrtl-pulse .vp-live i,
	.vrtl-pulse .vp-new {
		animation: none;
	}
}
