/* Tarladan SEO frontend: lifecycle notices, breadcrumbs, hub pages. */

.tpseo-listing-ended {
	background: #fff8e5;
	border: 1px solid #f0c36d;
	border-radius: 6px;
	padding: 16px 20px;
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.5;
}

.tpseo-listing-ended__title {
	margin: 0 0 6px;
	font-size: 17px;
}

.tpseo-listing-ended__text {
	margin: 0 0 10px;
}

.tpseo-listing-ended__alternatives {
	margin: 0;
	padding-left: 20px;
}

.tpseo-listing-ended__alternatives li {
	margin-bottom: 4px;
}

.tpseo-gone__inner {
	max-width: 720px;
	margin: 48px auto;
	padding: 0 20px;
}

.tpseo-gone__alternatives {
	padding-left: 20px;
}

/* Breadcrumbs */

.tpseo-breadcrumbs {
	font-size: 14px;
	margin: 0 0 16px;
}

.tpseo-breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.tpseo-breadcrumbs li {
	display: flex;
	align-items: center;
	gap: 6px;
}

.tpseo-breadcrumbs__separator {
	opacity: 0.5;
}

.tpseo-breadcrumbs [aria-current="page"] {
	font-weight: 600;
}

/* ==========================================================================
   Hub pages

   Scoped under .tpseo-hub so nothing here reaches the rest of the theme.
   Selectors are a little more specific than they would need to be on their
   own, because MyListing styles generic classes like .page-numbers globally.
   ========================================================================== */

.tpseo-hub {
	--tpseo-line: #e4e7e2;
	--tpseo-line-soft: #eef0ec;
	--tpseo-ink: #1b211c;
	--tpseo-ink-soft: #5d665f;
	--tpseo-muted: #7c857e;
	--tpseo-accent: #2f6b45;
	--tpseo-surface: #f7f8f6;
}

.tpseo-hub *,
.tpseo-hub *::before,
.tpseo-hub *::after {
	box-sizing: border-box;
}

/* The container the whole page hangs off. Without a max width and padding
   the grid runs to the viewport edge and the text sits flush left. */
.tpseo-hub__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 28px 24px 72px;
}

.tpseo-hub .tpseo-breadcrumbs {
	margin: 0 0 16px;
	color: var(--tpseo-muted);
}

.tpseo-hub__inner > h1 {
	font-size: clamp(25px, 3.2vw, 36px);
	line-height: 1.16;
	letter-spacing: -0.01em;
	margin: 0 0 16px;
	color: var(--tpseo-ink);
	text-wrap: balance;
}

.tpseo-hub__intro {
	max-width: 68ch;
	margin: 0 0 26px;
	font-size: 16.5px;
	line-height: 1.65;
	color: var(--tpseo-ink-soft);
}

.tpseo-hub__intro p:last-child {
	margin-bottom: 0;
}

/* Stats ------------------------------------------------------------------ */

.tpseo-hub__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0 0 30px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--tpseo-line);
	border-radius: 10px;
	overflow: hidden;
}

.tpseo-hub__stat {
	flex: 0 1 auto;
	min-width: 160px;
	padding: 13px 22px;
	border-right: 1px solid var(--tpseo-line);
}

.tpseo-hub__stat:last-child {
	border-right: 0;
}

.tpseo-hub__stat strong {
	display: block;
	font-size: 21px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--tpseo-ink);
	font-variant-numeric: tabular-nums;
}

.tpseo-hub__stat span {
	display: block;
	font-size: 13px;
	line-height: 1.4;
	color: var(--tpseo-muted);
}

/* Listing grid ----------------------------------------------------------- */

.tpseo-hub__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
	gap: 22px;
	margin: 0 0 36px;
	padding: 0;
	list-style: none;
}

.tpseo-hub__grid > li::before,
.tpseo-hub__links li::before {
	content: none;
}

.tpseo-hub__card {
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 1px solid var(--tpseo-line);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tpseo-hub__card:hover {
	border-color: #d3d8cf;
	box-shadow: 0 8px 22px -12px rgba(20, 30, 22, 0.35);
	transform: translateY(-2px);
}

.tpseo-hub__card-media {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--tpseo-surface);
	overflow: hidden;
	line-height: 0;
}

.tpseo-hub__card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.tpseo-hub__card:hover .tpseo-hub__card-media img {
	transform: scale(1.04);
}

.tpseo-hub__card-body {
	display: flex;
	flex-direction: column;
	gap: 7px;
	flex: 1 1 auto;
	padding: 13px 15px 15px;
}

.tpseo-hub__card-title {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.35;
	font-weight: 600;
	text-wrap: balance;
}

.tpseo-hub__card-title a {
	color: var(--tpseo-ink);
	text-decoration: none;
}

.tpseo-hub__card-title a:hover {
	color: var(--tpseo-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tpseo-hub__card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
	margin: auto 0 0;
	font-size: 13px;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}

.tpseo-hub__price {
	font-weight: 700;
	color: var(--tpseo-ink);
	font-size: 14px;
}

.tpseo-hub__card-sub {
	color: var(--tpseo-muted);
}

/* Pagination ------------------------------------------------------------- */

.tpseo-hub__pagination {
	margin: 0 0 42px;
}

.tpseo-hub__pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tpseo-hub__pagination ul.page-numbers li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tpseo-hub__pagination ul.page-numbers li::before {
	content: none;
}

.tpseo-hub__pagination ul.page-numbers li a.page-numbers,
.tpseo-hub__pagination ul.page-numbers li span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	width: auto;
	padding: 0 14px;
	border: 1px solid var(--tpseo-line);
	border-radius: 8px;
	background: #fff;
	color: var(--tpseo-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
}

.tpseo-hub__pagination ul.page-numbers li a.page-numbers:hover {
	border-color: var(--tpseo-accent);
	color: var(--tpseo-accent);
	background: #f4f9f5;
}

.tpseo-hub__pagination ul.page-numbers li span.page-numbers.current {
	background: var(--tpseo-accent);
	border-color: var(--tpseo-accent);
	color: #fff;
}

/* Internal linking ------------------------------------------------------- */

.tpseo-hub__links {
	margin: 0 0 30px;
}

.tpseo-hub__links h2 {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
	margin: 0 0 11px;
	color: var(--tpseo-ink);
}

.tpseo-hub__links ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tpseo-hub__links li {
	margin: 0;
}

.tpseo-hub__links a {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 7px 15px;
	border: 1px solid var(--tpseo-line);
	border-radius: 999px;
	background: #fff;
	color: var(--tpseo-ink);
	text-decoration: none;
	font-size: 14px;
	line-height: 1.3;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.tpseo-hub__links a:hover {
	border-color: var(--tpseo-accent);
	background: #f4f9f5;
	color: var(--tpseo-accent);
}

.tpseo-hub__links a span {
	font-size: 12.5px;
	color: var(--tpseo-muted);
	font-variant-numeric: tabular-nums;
}

.tpseo-hub__links a:hover span {
	color: inherit;
	opacity: 0.7;
}

/* Empty state and Q&A ---------------------------------------------------- */

.tpseo-hub__empty {
	padding: 20px 24px;
	margin: 0 0 32px;
	background: var(--tpseo-surface);
	border: 1px solid var(--tpseo-line);
	border-radius: 10px;
	color: var(--tpseo-ink-soft);
}

.tpseo-hub__empty p {
	margin: 0;
	max-width: 68ch;
}

.tpseo-hub__qa {
	max-width: 68ch;
	margin: 40px 0 0;
	padding-top: 30px;
	border-top: 1px solid var(--tpseo-line);
}

.tpseo-hub__qa h2 {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 16px;
	color: var(--tpseo-ink);
}

.tpseo-hub__qa h3 {
	font-size: 16px;
	font-weight: 600;
	margin: 22px 0 4px;
	color: var(--tpseo-ink);
}

.tpseo-hub__qa p {
	margin: 0;
	color: var(--tpseo-ink-soft);
	line-height: 1.65;
}

@media (max-width: 640px) {
	.tpseo-hub__inner {
		padding: 20px 16px 52px;
	}

	.tpseo-hub__grid {
		grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
		gap: 14px;
	}

	.tpseo-hub__stat {
		flex: 1 1 50%;
		min-width: 0;
		border-right: 0;
		border-bottom: 1px solid var(--tpseo-line);
	}

	.tpseo-hub__stat:last-child {
		border-bottom: 0;
	}

	.tpseo-hub__card-body {
		padding: 11px 12px 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tpseo-hub__card,
	.tpseo-hub__card-media img,
	.tpseo-hub__links a {
		transition: none;
	}

	.tpseo-hub__card:hover {
		transform: none;
	}

	.tpseo-hub__card:hover .tpseo-hub__card-media img {
		transform: none;
	}
}

/* Submission quality meter */

.tpseo-quality {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 14px 16px;
	margin: 0 0 20px;
	background: #fff;
}

.tpseo-quality__bar {
	height: 8px;
	border-radius: 4px;
	background: #e6e6e6;
	overflow: hidden;
	margin: 8px 0 12px;
}

.tpseo-quality__fill {
	height: 100%;
	background: #00a32a;
	transition: width 0.25s ease;
}

.tpseo-quality__fill.is-low {
	background: #d63638;
}

.tpseo-quality__fill.is-mid {
	background: #dba617;
}

.tpseo-quality__hints {
	margin: 0;
	padding-left: 20px;
	font-size: 14px;
}

.tpseo-quality__hints li {
	margin-bottom: 6px;
}
