

/*
 * Vorro Light V1.3.11
 * Avatar aspect-ratio protection.
 *
 * MyBB already outputs proportionally-scaled width/height attributes.
 * Vorro's global `img { max-width:100%; }` can shrink only the rendered
 * width inside narrow cells while the HTML height attribute remains fixed.
 * These scoped rules force height:auto so the image can never be squashed.
 */

/* =========================================================
   MEMBER LIST
   ========================================================= */

.vorro-member-avatar {
	display: block;
	width: auto;
	height: auto !important;
	max-width: 70px !important;
	max-height: 70px !important;
	margin: 0 auto;
	object-fit: contain;
	border-radius: 8px;
}

/* Keep the avatar column stable without stretching the image. */
body table .vorro-member-avatar {
	min-width: 0;
}

/* =========================================================
   PORTAL ANNOUNCEMENTS
   ========================================================= */

.vorro-portal-avatar-cell {
	width: 82px !important;
	min-width: 82px;
	max-width: 82px;
	padding: 10px !important;
}

.vorro-portal-avatar {
	display: block;
	width: auto;
	height: auto !important;
	max-width: 64px !important;
	max-height: 64px !important;
	margin: 0 auto;
	object-fit: contain;
	border-radius: 8px;
}

/* =========================================================
   BUDDY POPUP
   ========================================================= */

.vorro-buddy-avatar {
	display: block;
	width: auto;
	height: auto !important;
	max-width: 50px !important;
	max-height: 50px !important;
	margin: 3px 0 0;
	object-fit: contain;
	border-radius: 7px;
}

/* =========================================================
   EXTRA SAFETY FOR STOCK AVATAR CONTEXTS
   ========================================================= */

/*
 * If a plugin or inherited stock template emits an avatar without the
 * Vorro class in these known avatar containers, preserve its aspect ratio.
 */
.buddy_avatar img,
.author_avatar img,
.vorro-current-avatar img,
.vorro-avatar-preview img,
.vorro-profile-avatar img {
	height: auto !important;
}

/* Do not let generic max-width distort member/portal avatar images. */
.vorro-member-avatar,
.vorro-portal-avatar,
.vorro-buddy-avatar {
	box-sizing: border-box;
}

/* Mobile: same ratio protection, slightly smaller portal column. */
@media (max-width: 620px) {
	.vorro-portal-avatar-cell {
		width: 66px !important;
		min-width: 66px;
		max-width: 66px;
		padding: 8px !important;
	}

	.vorro-portal-avatar {
		max-width: 50px !important;
		max-height: 50px !important;
	}
}
