/* Theme-aware palette: WP block-theme presets when defined, hardcoded fallbacks otherwise. */
.steam-widget-profile-games {
	color-scheme: light dark;
	--sw-bg: var(--wp--preset--color--accent-2, var(--wp--preset--color--background, var(--global--color-background, light-dark(#f8f8f8, #181818))));
	--sw-fg: var(--wp--preset--color--contrast, var(--wp--preset--color--foreground, var(--global--color-secondary, light-dark(#666, #bbb))));
	--sw-border: var(--wp--preset--color--accent-4, var(--wp--preset--color--tertiary, var(--global--color-border, light-dark(#ccc, #444))));
	--sw-online: #a7c9e1;
	--sw-ingame: #B7D282;
}

/* Profile row: avatar left, info right, aligned via flex instead of floats. */
.steam-widget-profile-games .profile {
	display: flex;
	align-items: center;
	gap: 0.6em;
	background: var(--sw-bg);
	color: var(--sw-fg);
	padding: 0.4em;
	margin-bottom: 0.25em;
	line-height: 1.4;
}
.steam-widget-profile-games .profile-icon {
	border: 4px solid var(--sw-border);
	border-radius: 2px;
	height: 4em;
	width: 4em;
}
.steam-widget-profile-games .profile-name {
	font-weight: bold;
	font-size: 1.15em;
}

/* Reset default ul styling so the games list looks unchanged without needing extra markup. */
.steam-widget-profile-games .games {
	list-style: none;
	margin: 0;
	padding: 0;
}
.steam-widget-profile-games .game {
	display: flex;
	align-items: center;
	gap: 6px;
	padding-bottom: 0.6em;
}
.steam-widget-profile-games .game-icon-link {
	flex-shrink: 0;
	line-height: 0;
}
.steam-widget-profile-games .game-icon {
	border: 4px solid var(--sw-border);
	border-radius: 2px;
	display: block;
	width: 2.2em;
	height: 2.2em;
	box-sizing: content-box;
}

/* Status border colors apply to both profile and game icons. */
.steam-widget-profile-games .online { border-color: var(--sw-online); }
.steam-widget-profile-games .ingame { border-color: var(--sw-ingame); }

/* Game info column takes remaining space and truncates long names cleanly. */
.steam-widget-profile-games .game-info {
	min-width: 0;
	flex: 1;
}
.steam-widget-profile-games .game-name,
.steam-widget-profile-games .game-time {
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
