/* Listing Manager — app-card styles
   Only the "Related apps" block on a listing page still uses these (templates/parts/app-card.php, related-apps.php).
   The homepage, archives, /categories/ and the 404 use tiles.css / front-page.css / archive.css. Colours come from the
   tokens in global.css, so no .dark-theme overrides are needed. */

.latest-game-section {
	padding: 24px 0;
}

.editor-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.editor-heading h2 {
	font-size: 19px;
	margin: 0;
	color: var( --lm-ink );
}

.editor-app-display.grid-home {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
	gap: 10px;
}

.app-container.recommended-app-blocks {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border-radius: 10px;
	background: var( --lm-panel );
	border: 1px solid var( --lm-line );
	text-decoration: none;
	color: var( --lm-ink );
}

.app-container.recommended-app-blocks:hover {
	border-color: var( --lm-blue );
}

.left-icon img {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	object-fit: cover;
	flex-shrink: 0;
}

.right-content {
	min-width: 0; /* allow text truncation inside a flex child */
}

.app-name-homepage {
	font-size: 14px;
	font-weight: 600;
	color: var( --lm-ink );
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.app-card-meta {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var( --lm-muted );
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media ( max-width: 600px ) {
	/* Card grid: switch from horizontal (icon left, name right) to
	   stacked (icon top, name below, centered) so 4 cards fit per row on a phone. */
	.editor-app-display.grid-home {
		grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
		gap: 8px;
	}

	.app-container.recommended-app-blocks {
		flex-direction: column;
		text-align: center;
		padding: 8px 4px;
		gap: 6px;
	}

	.left-icon img {
		width: 44px;
		height: 44px;
	}

	.app-name-homepage {
		font-size: 12px;
		overflow-wrap: anywhere;
		white-space: normal;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		line-height: 1.3;
	}

	.editor-heading h2 {
		font-size: 16px;
	}

	.app-card-meta {
		font-size: 12px;
		white-space: normal;
		line-height: 1.25;
	}
}
