/* ==========================================================================
   Steam ONL — Full Cover
   Overrides the STEAM.ONL theme's 2:3 cropping so the featured picture is
   always shown 100% complete. Loaded after the theme stylesheet; selectors
   are scoped to the body classes "steam-onl-theme" (added by the theme) and
   "steam-onl-fc" (added by this plugin), so they never leak into other themes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Card cover — the grid on the home page / archive / search results
   -------------------------------------------------------------------------- */

/* The frame keeps its rounded corners and the dark background that shows
   through when a picture does not fill the 2:3 box. */
body.steam-onl-theme .card-img-wrap,
body.steam-onl-fc .card-img-wrap {
	overflow: hidden;
	background: #0b0b0b;
	line-height: 0;
}

/* The picture itself: never cropped, never stretched. */
body.steam-onl-theme .card-img,
body.steam-onl-fc .card-img {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

/* Default layout (also used when the CSS is pasted manually):
   uniform 2:3 cards — the whole picture fits inside the frame (letterbox). */
body.steam-onl-theme .card-img-wrap,
body.steam-onl-fc .card-img-wrap {
	aspect-ratio: 2 / 3;
	height: auto;
}

body.steam-onl-theme .card-img,
body.steam-onl-fc .card-img {
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* "Natural height" mode: the frame follows the picture, cards get taller.
   Enabled from Settings → Steam ONL Cover → Card layout. */
body.steam-onl-fc-mode-natural .card-img-wrap {
	aspect-ratio: auto;
	height: auto;
}

body.steam-onl-fc-mode-natural .card-img {
	height: auto;
	object-fit: contain;
}

/* The theme zooms the picture on hover, which cuts its edges off.
   The card still lifts up, but the picture stays complete. */
body.steam-onl-theme .card:hover .card-img,
body.steam-onl-theme .card:focus-within .card-img,
body.steam-onl-fc .card:hover .card-img,
body.steam-onl-fc .card:focus-within .card-img {
	transform: none;
}

/* --------------------------------------------------------------------------
   2. Cover on the article page (only used when the option is enabled)
   -------------------------------------------------------------------------- */

body.steam-onl-theme .single-thumbnail,
body.steam-onl-fc .single-thumbnail {
	aspect-ratio: auto;
	height: auto;
	max-width: 100%;
	overflow: hidden;
	background: #0b0b0b;
}

body.steam-onl-theme .single-thumbnail img,
body.steam-onl-fc .single-thumbnail img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center;
}

/* --------------------------------------------------------------------------
   3. Pictures placed inside the article body
   -------------------------------------------------------------------------- */

body.steam-onl-theme .entry-content img,
body.steam-onl-fc .entry-content img {
	max-height: none;
	height: auto;
	object-fit: contain;
}
