/**
 * TN Views Counter — front-end styles.
 * Responsive, lightweight, no external font/icon dependencies.
 */

.vcm-auto-insert {
	margin: 0 0 1.25em;
}

.vcm-combined {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.vcm-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f1f3f5;
	color: #50575e;
	font-size: 13px;
	line-height: 1.4;
	font-weight: 500;
	white-space: nowrap;
	box-sizing: border-box;
}

.vcm-badge .vcm-icon {
	flex-shrink: 0;
	opacity: 0.75;
}

.vcm-badge .vcm-count {
	font-weight: 700;
	color: #1d2327;
}

.vcm-badge .vcm-label {
	opacity: 0.75;
	font-weight: 400;
}

/* Online badge — pulsing live dot */
.vcm-online {
	background: #e9f9ee;
	color: #1a7a3e;
}

.vcm-online .vcm-count {
	color: #157a37;
}

.vcm-pulse-dot {
	position: relative;
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	flex-shrink: 0;
}

.vcm-pulse-dot::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: #22c55e;
	opacity: 0.6;
	animation: vcm-pulse 1.8s ease-out infinite;
}

@keyframes vcm-pulse {
	0% {
		transform: scale( 1 );
		opacity: 0.6;
	}
	70% {
		transform: scale( 3.2 );
		opacity: 0;
	}
	100% {
		transform: scale( 3.2 );
		opacity: 0;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.vcm-pulse-dot::before {
		animation: none;
		opacity: 0;
	}
}

/* Widget: popular posts list */
.vcm-widget-online {
	margin-bottom: 12px;
}

.vcm-widget-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vcm-widget-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

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

.vcm-widget-thumb {
	flex-shrink: 0;
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 6px;
	overflow: hidden;
}

.vcm-widget-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vcm-widget-item-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.vcm-widget-item-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vcm-widget-item-views {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #777;
}

.vcm-widget-item-views .vcm-icon {
	opacity: 0.6;
}

.vcm-widget-empty {
	color: #777;
	font-size: 13px;
}

/* Responsive: shrink badges gracefully on small screens */
@media ( max-width: 480px ) {
	.vcm-badge {
		font-size: 12px;
		padding: 4px 10px;
	}

	.vcm-combined {
		gap: 8px;
	}

	.vcm-widget-thumb {
		width: 48px;
		height: 48px;
	}
}
