/* ShopSlim Nederland Content Repair 1.0.3: theme-specific layout guards. */

/*
 * The News theme places the logo, search form and primary menu in the same
 * 100px row. With the longer Dutch category labels the floated menu drops
 * below that row, where the independence bar covers it. The theme also hides
 * the complete .header-main when its sticky class is added on desktop.
 *
 * Keep the desktop brand, navigation and search form in one row. The sticky
 * state uses the same structure in a shorter 64px bar. This keeps the existing
 * WordPress menu and theme controls; it only repairs their layout.
 */
@media (min-width: 1211px) {
	body.ssnl-independent-site.sscr-layout-repair .header .header-main,
	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .header-main {
		display: block !important;
		background: #10253f;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main > .container {
		display: flex;
		align-items: center;
		gap: 18px;
		width: calc(100% - 40px);
		height: 80px !important;
		min-height: 80px;
		padding: 0;
		box-sizing: border-box;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .logo {
		order: 1;
		flex: 0 0 auto;
		float: none !important;
		min-width: 0;
		height: auto;
		margin: 0;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .logo > a {
		height: auto;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-lockup {
		grid-template-columns: auto auto;
		gap: 0 5px;
		padding: 0;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-main {
		font-size: 25px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-country {
		font-size: 18px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-lockup small {
		display: none;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main-right {
		order: 3;
		flex: 0 0 220px;
		float: none !important;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main-right .search-form {
		float: none !important;
		width: 220px;
		margin: 0;
	}

	body.ssnl-independent-site.sscr-layout-repair .main-nav {
		order: 2;
		flex: 1 1 auto;
		float: none !important;
		min-width: 0;
		width: auto;
		height: 40px;
		margin: 0;
		line-height: 40px;
	}

	body.ssnl-independent-site.sscr-layout-repair .main-nav-inner > ul {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 4px;
		min-width: 0;
	}

	body.ssnl-independent-site.sscr-layout-repair .main-nav-inner > ul > li,
	body.ssnl-independent-site.sscr-layout-repair .main-nav-inner > ul > li:nth-child(n+2) {
		float: none;
		margin: 0;
	}

	body.ssnl-independent-site.sscr-layout-repair #menu-header-main-menu > li > a {
		padding-right: 10px;
		padding-left: 10px;
		font-size: 14px;
		white-space: nowrap;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main > .container > .cboth {
		display: none;
	}

	/* Compact but complete navigation after the theme enables sticky mode. */
	body.ssnl-independent-site.sscr-layout-repair.body-padding {
		padding-top: 64px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .header-main > .container {
		justify-content: space-between;
		gap: 18px;
		height: 64px !important;
		min-height: 64px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .header-main-right {
		display: none;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .logo {
		flex: 0 0 auto;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .ssnl-brand-lockup {
		grid-template-columns: auto auto;
		gap: 0 5px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .ssnl-brand-main {
		font-size: 23px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .ssnl-brand-country {
		font-size: 16px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .ssnl-brand-lockup small {
		display: none;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed .main-nav {
		flex: 1 1 auto;
		height: 38px;
		line-height: 38px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed #menu-header-main-menu {
		justify-content: flex-end;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-fixed #menu-header-main-menu > li > a {
		padding-right: 8px;
		padding-left: 8px;
		font-size: 12px;
	}

}

/* Just above the theme's mobile breakpoint, reduce controls enough to keep
 * every Dutch label on the same row. */
@media (min-width: 1211px) and (max-width: 1350px) {
	body.ssnl-independent-site.sscr-layout-repair .header-main > .container {
		gap: 12px;
		width: calc(100% - 24px);
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-main {
		font-size: 22px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-country {
		font-size: 15px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main-right {
		flex-basis: 180px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main-right .search-form {
		width: 180px;
	}

	body.ssnl-independent-site.sscr-layout-repair .main-nav-inner > ul {
		gap: 2px;
	}

	body.ssnl-independent-site.sscr-layout-repair #menu-header-main-menu > li > a {
		padding-right: 6px;
		padding-left: 6px;
		font-size: 12px;
	}
}

/* Keep the editorial brand centred between the native mobile menu and search
 * buttons. The theme's existing JavaScript continues to open/close the menu. */
@media (max-width: 1210px) {
	body.ssnl-independent-site.sscr-layout-repair .header-main .logo,
	body.ssnl-independent-site.sscr-layout-repair .header.header-mobile .logo {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 60px;
		margin-top: 0;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .logo > a {
		display: block;
		height: auto;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-lockup {
		gap: 0 5px;
		padding: 0;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-main {
		font-size: 22px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-country {
		font-size: 15px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header-main .ssnl-brand-lockup small {
		display: none;
	}

	body.ssnl-independent-site.sscr-layout-repair .icon-show-nav {
		left: 10px;
		padding: 0 10px;
	}

	body.ssnl-independent-site.sscr-layout-repair .icon-search {
		right: 10px;
		padding: 0 10px;
	}

	body.ssnl-independent-site.sscr-layout-repair .header.header-mobile .main-nav {
		height: auto;
		line-height: 1.5;
	}
}

/* The optimizer already provides the complete legal/trust footer. Keep the
 * theme's old 2025 footer out of the rendered page without touching the
 * editorial <footer class="sstb-method"> inside the main article. */
body.ssnl-independent-site.sscr-layout-repair > footer.footer {
	display: none !important;
}

/* The paid landing has its own context and title. The theme breadcrumb wrapper
 * was the first Auto Ads insertion target and pushed the H1 below a large
 * Related Search unit. Hiding the structural wrapper before layout prevents it
 * from being offered as visible page inventory. */
body.sscr-focus-landing.sscr-layout-repair .block-breadcrumb.breadcrumb-single {
	display: none !important;
}

/* Server-side filtering removes this block. This is a fallback in case another
 * plugin re-adds the table of contents after the normal content filters. */
body.sscr-focus-landing.sscr-layout-repair #ez-toc-container {
	display: none !important;
}

/* Four reader-oriented menu links must remain usable on a narrow desktop. */
body.sscr-layout-repair #menu-header-main-menu > .sscr-menu-item > a {
	white-space: nowrap;
}

@media (min-width: 901px) and (max-width: 1180px) {
	body.sscr-layout-repair #menu-header-main-menu > li > a {
		padding-right: 9px;
		padding-left: 9px;
		font-size: 12px;
	}
}

@media (max-width: 900px) {
	body.sscr-layout-repair #menu-header-main-menu > .sscr-menu-item > a {
		white-space: normal;
	}
}
