/* ULP Leaderboard Widget (scoped styles) */

.ulp-leaderboard-widget .ulp-leaderboard {
	width: 100%;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ulp-leaderboard-widget .ulp-leaderboard-list.loading .ulp-item {
	animation: ulp-lb-pulse 1.5s ease-in-out infinite;
}

.ulp-leaderboard-widget .ulp-item {
	position: relative;
	margin-bottom: 20px;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ulp-leaderboard-widget .ulp-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ulp-leaderboard-widget .ulp-thumb-wrapper {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	overflow: hidden;
	background: #f5f5f5;
}

.ulp-leaderboard-widget .ulp-thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ulp-leaderboard-widget .ulp-item:hover .ulp-thumb {
	transform: scale(1.05);
}

.ulp-leaderboard-widget .ulp-rank {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 800;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	z-index: 2;
}

.ulp-leaderboard-widget .ulp-item:nth-child(1) .ulp-rank {
	background: linear-gradient(135deg, #ffd700, #ffa500);
	color: #fff;
}

.ulp-leaderboard-widget .ulp-item:nth-child(2) .ulp-rank {
	background: linear-gradient(135deg, #c0c0c0, #808080);
	color: #fff;
}

.ulp-leaderboard-widget .ulp-item:nth-child(3) .ulp-rank {
	background: linear-gradient(135deg, #cd7f32, #8b4513);
	color: #fff;
}

.ulp-leaderboard-widget .ulp-content {
	padding: 15px;
}

.ulp-leaderboard-widget .ulp-title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #2c3e50;
	text-decoration: none;
	line-height: 1.4;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.8em;
}

.ulp-leaderboard-widget .ulp-title:hover {
	color: #e74c3c;
}

.ulp-leaderboard-widget .ulp-likes {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 20px;
	background: linear-gradient(135deg, #ff6b6b, #e74c3c);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.ulp-leaderboard-widget .ulp-likes-icon {
	display: inline-block;
}

@media (min-width: 350px) {
	.ulp-leaderboard-widget .ulp-item-horizontal {
		display: flex;
		align-items: flex-start;
		gap: 15px;
		padding: 15px;
	}

	.ulp-leaderboard-widget .ulp-item-horizontal .ulp-thumb-wrapper {
		flex-shrink: 0;
		width: 100px;
		height: 100px;
		padding-top: 0;
		border-radius: 12px;
		overflow: hidden;
	}

	.ulp-leaderboard-widget .ulp-item-horizontal .ulp-rank {
		top: 5px;
		left: 5px;
		width: 32px;
		height: 32px;
		font-size: 14px;
	}

	.ulp-leaderboard-widget .ulp-item-horizontal .ulp-content {
		flex: 1;
		padding: 0;
		min-width: 0;
	}

	.ulp-leaderboard-widget .ulp-item-horizontal .ulp-title {
		font-size: 14px;
		margin-bottom: 10px;
	}
}

@keyframes ulp-lb-pulse {
	0% {
		opacity: 0.6;
	}
	50% {
		opacity: 1;
	}
	100% {
		opacity: 0.6;
	}
}

@media (prefers-color-scheme: dark) {
	.ulp-leaderboard-widget .ulp-item {
		background: #2d3748;
		box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
	}

	.ulp-leaderboard-widget .ulp-title {
		color: #e2e8f0;
	}

	.ulp-leaderboard-widget .ulp-title:hover {
		color: #fc8181;
	}

	.ulp-leaderboard-widget .ulp-item:nth-child(n + 4) .ulp-rank {
		background: rgba(45, 55, 72, 0.95);
		color: #e2e8f0;
	}
}

.ulp-leaderboard-widget .ulp-range-switch {
	display: flex;
	gap: 6px;
	margin-bottom: 12px;
	justify-content: center;
}

.ulp-leaderboard-widget .ulp-range-btn {
	flex: 1 1 0;
	padding: 6px 0;
	font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #475569;
	background: #f1f5f9;
	border: 0;
	border-radius: 9999px;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ulp-leaderboard-widget .ulp-range-btn:hover {
	background: #e2e8f0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ulp-leaderboard-widget .ulp-range-btn.active {
	background: linear-gradient(135deg, #ff6b6b, #e74c3c);
	color: #fff;
	box-shadow: 0 3px 8px rgba(231, 76, 60, 0.35);
}

@media (prefers-color-scheme: dark) {
	.ulp-leaderboard-widget .ulp-range-btn {
		background: #374151;
		color: #e5e7eb;
		box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
	}

	.ulp-leaderboard-widget .ulp-range-btn:hover {
		background: #4b5563;
	}

	.ulp-leaderboard-widget .ulp-range-btn.active {
		background: linear-gradient(135deg, #fb7185, #f43f5e);
		box-shadow: 0 3px 8px rgba(244, 63, 94, 0.45);
	}
}

@media (max-width: 240px) {
	.ulp-leaderboard-widget .ulp-range-switch {
		flex-direction: column;
	}
}


