/**
 * SP Forum Icons 1.0.3
 *
 * Loaded in addition to the active phpBB style. It does not replace or edit
 * prosilver/theme/content.css or forumlist_body.html.
 *
 * phpBB's native read/unread/locked/link status icon remains the background
 * image of dl.row-item. The existing left padding of .list-inner is therefore
 * deliberately left untouched.
 */

ul.topiclist.forums > li.row,
ul.topiclist.forums dl.row-item,
ul.topiclist.forums dl.row-item > dt,
ul.topiclist.forums dl.row-item > dt > .list-inner {
	overflow: visible;
}

ul.topiclist.forums > li.row {
	position: relative;
	z-index: 1;
}

/* Only increase row height. Never reset padding-left or background images. */
ul.topiclist.forums dl.row-item > dt > .list-inner {
	box-sizing: border-box;
	min-height: calc(var(--sp-fi-normal) + 8px);
}

.forum-image {
	display: inline-flex;
	float: left;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 2;
	width: var(--sp-fi-normal);
	height: var(--sp-fi-normal);
	margin: 0 12px 4px 0;
	padding: 0;
	overflow: visible;
	vertical-align: middle;
}

.forum-image img {
	display: block;
	width: var(--sp-fi-normal);
	height: var(--sp-fi-normal);
	max-width: none;
	object-fit: contain;
	transform: translateZ(0) scale(1);
	transform-origin: center center;
	transition: transform var(--sp-fi-duration) ease, filter var(--sp-fi-duration) ease;
	will-change: transform;
}

.sp-forum-image-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border: 0;
	text-decoration: none;
}

/* Keep text and following content inside the forum row beside/under the float. */
ul.topiclist.forums dl.row-item > dt > .list-inner::after {
	content: "";
	display: block;
	clear: both;
}

@media (max-width: 700px), (hover: none), (pointer: coarse) {
	ul.topiclist.forums dl.row-item > dt > .list-inner {
		min-height: calc(var(--sp-fi-mobile) + 8px);
	}

	.forum-image,
	.forum-image img {
		width: var(--sp-fi-mobile);
		height: var(--sp-fi-mobile);
	}

	.forum-image img {
		transform: none !important;
		filter: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.forum-image img {
		transition: none;
	}
}
