/* All About Material Theme 1.0.29
 * Runtime zoom alignment. The normal v1.0.11 desktop header is untouched.
 * When JS detects browser zoom-out, the header adopts the exact measured width
 * of the main content container and distributes the available row space cleanly.
 */

@media (min-width: 1051px) {
	body.aam-browser-zoomed-out .aam-container.aam-nav-wrap {
		width: var(--aam-runtime-content-width, min(1240px, calc(100% - 40px))) !important;
		max-width: none !important;
		margin-left: auto !important;
		margin-right: auto !important;
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 0 !important;
	}

	body.aam-browser-zoomed-out .aam-logo {
		order: 1 !important;
		flex: 0 0 auto !important;
		margin: 0 !important;
	}

	body.aam-browser-zoomed-out .aam-header-search {
		order: 2 !important;
		flex: 1 1 auto !important;
		width: auto !important;
		min-width: 270px !important;
		max-width: none !important;
		margin: 0 0 0 16px !important;
	}

	body.aam-browser-zoomed-out .aam-nav {
		order: 3 !important;
		flex: 0 0 auto !important;
		justify-content: flex-start !important;
		gap: 18px !important;
		margin: 0 0 0 16px !important;
	}

	body.aam-browser-zoomed-out .aam-nav a {
		white-space: nowrap !important;
	}

	body.aam-browser-zoomed-out .aam-nav-actions {
		order: 4 !important;
		flex: 0 0 auto !important;
		gap: 12px !important;
		margin: 0 0 0 14px !important;
		padding-left: 0 !important;
	}

	/* Guest header needs more fixed room for Sign in + List your brand. */
	body.aam-browser-zoomed-out:not(.logged-in) .aam-header-search {
		min-width: 250px !important;
	}

	body.aam-browser-zoomed-out:not(.logged-in) .aam-nav {
		gap: 16px !important;
		margin-left: 14px !important;
	}

	body.aam-browser-zoomed-out:not(.logged-in) .aam-nav-actions {
		gap: 10px !important;
		margin-left: 12px !important;
	}

	body.aam-browser-zoomed-out .aam-header-search-panel,
	body.aam-browser-zoomed-out .aam-header-search-panel > form,
	body.aam-browser-zoomed-out .aam-header-search-panel input[type="search"] {
		min-width: 0 !important;
	}
}
