/* WPK Trending – the "right now" bubble. */

.wpkt {
	--wpkt-accent: #d32f2f;
	--wpkt-bg: #fff;
	--wpkt-fg: #111;
	--wpkt-muted: #6b6b6b;
	--wpkt-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
	position: fixed;
	z-index: 2147483647;
	left: 12px;
	right: 12px;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	max-width: 100%;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.35;
	color: var(--wpkt-fg);
	transform: translateY(calc(100% + 24px));
	opacity: 0;
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
	pointer-events: none;
}

.wpkt.is-open {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.wpkt.is-closing {
	transform: translateY(calc(100% + 24px));
	opacity: 0;
	pointer-events: none;
}

.wpkt__card {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 12px;
	background: var(--wpkt-bg);
	border-radius: 16px;
	box-shadow: var(--wpkt-shadow);
	padding: 12px 40px 12px 12px;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
}

.wpkt__card:hover,
.wpkt__card:focus-visible {
	text-decoration: none;
	color: inherit;
	outline: none;
}

.wpkt__card:focus-visible {
	box-shadow: var(--wpkt-shadow), 0 0 0 3px var(--wpkt-accent);
}

.wpkt__image {
	flex: 0 0 84px;
	width: 84px;
	height: 84px;
	border-radius: 10px;
	object-fit: cover;
	background: #eee;
	display: block;
	transition: transform 0.4s ease;
}

.wpkt__card:hover .wpkt__image {
	transform: scale(1.04);
}

.wpkt__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

.wpkt__label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wpkt-accent);
	white-space: nowrap;
	min-width: 0;
	overflow: visible;
}

.wpkt__label > span:not(.wpkt__dot) {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wpkt__dot {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wpkt-accent);
	position: relative;
}

.wpkt__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--wpkt-accent);
	opacity: 0.55;
	transform: scale(1);
	animation: wpkt-pulse 1.8s ease-out infinite;
	pointer-events: none;
}

.wpkt__views {
	font-weight: 600;
	color: var(--wpkt-muted);
	text-transform: none;
	letter-spacing: 0;
}

.wpkt__site {
	font-weight: 600;
	color: var(--wpkt-muted);
	text-transform: none;
	letter-spacing: 0;
}

.wpkt__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wpkt__cta {
	font-size: 13px;
	font-weight: 700;
	color: var(--wpkt-accent);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	align-self: flex-end;
}

.wpkt__cta::after {
	content: "\2192";
	transition: transform 0.25s ease;
}

.wpkt__card:hover .wpkt__cta::after {
	transform: translateX(3px);
}

.wpkt__close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wpkt-muted);
	font-size: 22px;
	line-height: 30px;
	text-align: center;
	cursor: pointer;
	padding: 0;
	margin: 0;
	box-shadow: none;
}

.wpkt__close:hover,
.wpkt__close:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	color: var(--wpkt-fg);
	outline: none;
}

.wpkt__bar {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 100%;
	background: var(--wpkt-accent);
	transform-origin: left;
	opacity: 0.6;
}

@keyframes wpkt-pulse {
	0% {
		transform: scale(1);
		opacity: 0.55;
	}
	70% {
		transform: scale(3);
		opacity: 0;
	}
	100% {
		transform: scale(3);
		opacity: 0;
	}
}

@keyframes wpkt-drain {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

@media (min-width: 640px) {
	.wpkt {
		left: auto;
		right: 20px;
		bottom: 20px;
		width: 380px;
	}

	.wpkt.wpkt--left {
		left: 20px;
		right: auto;
	}

	.wpkt.wpkt--center {
		left: 50%;
		right: auto;
		transform: translate(-50%, calc(100% + 24px));
	}

	.wpkt.wpkt--center.is-open {
		transform: translate(-50%, 0);
	}

	.wpkt.wpkt--center.is-closing {
		transform: translate(-50%, calc(100% + 24px));
	}

	.wpkt__image {
		flex-basis: 96px;
		width: 96px;
		height: 96px;
	}
}

@media (prefers-color-scheme: dark) {
	.wpkt {
		--wpkt-bg: #1c1c1e;
		--wpkt-fg: #f2f2f2;
		--wpkt-muted: #a5a5a5;
	}

	.wpkt__close:hover,
	.wpkt__close:focus-visible {
		background: rgba(255, 255, 255, 0.1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpkt,
	.wpkt__image,
	.wpkt__cta::after {
		transition: none;
	}

	.wpkt__dot::after,
	.wpkt__bar {
		animation: none !important;
	}

	.wpkt__dot::after {
		display: none;
	}
}

@media print {
	.wpkt {
		display: none;
	}
}
