/**
 * Popular Posts Strip
 * File: flatsome-child/shortcodes/popular-posts/popular-posts-style.css
 */

:root {
	--pps-red: #e50914;
	--pps-red-dark: #c9000a;
	--pps-text: #222;
	--pps-muted: #666;
	--pps-border: #ececec;
	--pps-bg-soft: #f7f7f7;
	--pps-radius: 6px;
	--pps-transition: 0.22s ease;
}

.pps-wrapper {
	width: 100%;
	margin: 0 auto;
}

.pps-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding-bottom: 12px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--pps-border);
}

.pps-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.25;
	color: var(--pps-text);
	text-transform: uppercase;
	letter-spacing: 0.2px;
}

.pps-title__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--pps-red);
}

.pps-tabs {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.pps-tab {
	min-width: 86px;
	padding: 7px 18px;
	border: 0;
	border-radius: 4px;
	background: #f4f4f4;
	color: #222;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background var(--pps-transition), color var(--pps-transition);
}

.pps-tab:hover,
.pps-tab--active {
	background: var(--pps-red);
	color: #fff;
}

.pps-panel {
	display: none;
}

.pps-panel--active {
	display: block;
}

.pps-list {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 28px;
}

.pps-card {
	position: relative;
	min-width: 0;
}

.pps-card__thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: visible;
	border-radius: var(--pps-radius);
	background: var(--pps-bg-soft);
	text-decoration: none;
}

.pps-card__thumb img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	border-radius: var(--pps-radius);
	transition: transform var(--pps-transition), filter var(--pps-transition);
}

.pps-card:hover .pps-card__thumb img {
	transform: translateY(-2px);
	filter: brightness(0.96);
}

.pps-card__placeholder {
	width: 100%;
	height: 100%;
	border-radius: var(--pps-radius);
	background: linear-gradient(135deg, #f0f0f0, #dcdcdc);
}

.pps-card__rank {
	position: absolute;
	top: -10px;
	left: -8px;
	z-index: 2;
	width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--pps-red);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 800;
	line-height: 1;
	border: 2px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.pps-card__title {
	margin: 13px 0 0;
	font-size: 0.98rem;
	font-weight: 800;
	line-height: 1.45;
	color: var(--pps-text);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pps-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color var(--pps-transition);
}

.pps-card__title a:hover {
	color: var(--pps-red);
}

.pps-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 20px 0;
	color: var(--pps-muted);
	text-align: center;
}

/* Tablet */
@media (max-width: 1024px) {
	.pps-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.pps-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.pps-tabs {
		width: 100%;
		overflow-x: auto;
		padding-bottom: 3px;
	}

	.pps-tab {
		min-width: 78px;
		padding: 7px 15px;
	}

	.pps-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
	}
}

/* Small mobile */
@media (max-width: 480px) {
	.pps-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pps-card__thumb {
		aspect-ratio: 16 / 8.5;
	}
}