/*
 * EGGIO China 1.3.7 square-logo display compatibility.
 * Scope every override to the audited 2026/08 target asset so a brand rollback
 * automatically restores RiPro's original horizontal-logo sizing behavior.
 */

/* RiPro standalone login, register and lost-password pages. */
.login-and-register img.logo.regular[src$="/2026/08/小logo.png"] {
	display: block;
	width: auto;
	height: auto;
	min-width: 0;
	max-width: 60px;
	max-height: 60px;
	margin-right: auto;
	margin-left: auto;
	object-fit: contain;
	transform: none;
}

/* RiPro's account AJAX popup uses the same shared site_logo source. */
.ri-popup:has(#account-from) .logo-wrapper img.logo.regular[src$="/2026/08/小logo.png"] {
	display: block;
	width: auto;
	height: auto;
	min-width: 0;
	max-width: 52px;
	max-height: 52px;
	margin-right: auto;
	margin-left: auto;
	object-fit: contain;
	transform: none;
}

@media screen and (max-width: 767px) {
	.login-and-register img.logo.regular[src$="/2026/08/小logo.png"] {
		width: auto;
		height: auto;
		min-width: 0;
		max-width: 48px;
		max-height: 48px;
		object-fit: contain;
		transform: none;
	}

	.ri-popup:has(#account-from) .logo-wrapper img.logo.regular[src$="/2026/08/小logo.png"] {
		width: auto;
		height: auto;
		min-width: 0;
		max-width: 44px;
		max-height: 44px;
		object-fit: contain;
		transform: none;
	}

	/*
	 * mobile-home.css owns the 32px Header slot. Its scale(1.6) enlarged the
	 * new square bitmap to 51.2px inside an overflow-hidden 32px container.
	 */
	body.eggio-mobile-discovery-active.eggio-mobile-home-compact.home:not(.logged-in) .site-header .logo-wrapper {
		overflow: visible;
	}

	body.eggio-mobile-discovery-active.eggio-mobile-home-compact.home:not(.logged-in) .site-header .logo-wrapper img.logo.regular[src$="/2026/08/小logo.png"] {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px !important;
		max-width: 32px !important;
		max-height: 32px !important;
		object-fit: contain !important;
		transform: none !important;
	}
}
