/* Site Visitor Counter — front-end styles.
 *
 * Designed to be theme-agnostic: every colour is derived from the text colour
 * it inherits, so the counter reads correctly on a white sidebar or a dark
 * footer without any configuration. Override the custom properties below to
 * brand it. */

.svc {
	/* Fallbacks first, for browsers without color-mix(). */
	--svc-border: rgba(128, 128, 128, .32);
	--svc-bg: rgba(128, 128, 128, .10);
	--svc-muted: inherit;
	--svc-live: #22c07a;
	--svc-radius: 8px;
	--svc-gap: 26px;

	color: inherit;
	font-size: 15px;
	line-height: 1.5;
}

@supports (color: color-mix(in srgb, currentColor 10%, transparent)) {
	.svc {
		--svc-border: color-mix(in srgb, currentColor 24%, transparent);
		--svc-bg: color-mix(in srgb, currentColor 7%, transparent);
		--svc-muted: color-mix(in srgb, currentColor 72%, transparent);
	}
}

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

.svc__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
}

.svc__item::before,
.svc__item::marker {
	content: none;
}

.svc__label {
	color: var(--svc-muted);
}

.svc__value {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.svc__value--live {
	color: var(--svc-live);
}

.svc__dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 7px;
	border-radius: 50%;
	background: var(--svc-live);
	vertical-align: middle;
}

@media (prefers-reduced-motion: no-preference) {
	.svc__dot {
		animation: svc-pulse 2.4s ease-in-out infinite;
	}
}

@keyframes svc-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .45; }
}

/* Auto-placed footer wrapper. */

.svc-autoplace {
	display: flex;
	clear: both;
	padding: 16px 20px;
	color: inherit;
}

.svc-autoplace--left { justify-content: flex-start; }
.svc-autoplace--center { justify-content: center; }
.svc-autoplace--right { justify-content: flex-end; }

.svc-autoplace .svc--widget,
.svc-autoplace .svc--tiles {
	width: 100%;
	max-width: 640px;
}

/* --- Style A: sidebar widget --- */

.svc--widget {
	border: 1px solid var(--svc-border);
	border-radius: var(--svc-radius);
	overflow: hidden;
	background: var(--svc-bg);
}

.svc--widget .svc__title {
	margin: 0;
	padding: 11px 14px;
	border-bottom: 1px solid var(--svc-border);
	background: var(--svc-bg);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: inherit;
}

.svc--widget .svc__list {
	padding: 6px 0;
}

.svc--widget .svc__item {
	padding: 8px 14px;
}

.svc--widget .svc__item + .svc__item {
	border-top: 1px solid var(--svc-border);
}

/* --- Style B: footer strip --- */

.svc--strip .svc__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--svc-gap);
	padding: 13px 18px;
	border: 1px solid var(--svc-border);
	border-radius: var(--svc-radius);
	background: var(--svc-bg);
}

.svc--strip .svc__item {
	gap: 7px;
	justify-content: flex-start;
}

/* --- Style C: stat tiles --- */

.svc--tiles .svc__list {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.svc--tiles .svc__item {
	flex-direction: column-reverse;
	gap: 4px;
	padding: 18px 14px;
	text-align: center;
	border: 1px solid var(--svc-border);
	border-radius: 10px;
	background: var(--svc-bg);
}

.svc--tiles .svc__value {
	font-size: 28px;
	line-height: 1.1;
	letter-spacing: -.02em;
}

.svc--tiles .svc__label {
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* --- Style D: inline badge --- */

.svc--badge {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border: 1px solid var(--svc-border);
	border-radius: 999px;
	background: var(--svc-bg);
	font-size: 13px;
	font-weight: 600;
}
