/* Site notification bar — Back Office (top of header) */

.ipc-site-notice-widget {
	--ipc-notice-bg: #0a2e4f;
	--ipc-notice-text: #ffffff;
	--ipc-notice-height: 40px;
	--ipc-page-max: 1400px;
	--ipc-page-gutter: clamp(24px, 3.5vw, 40px);
	width: 100%;
}

.ipc-site-notice {
	background: var(--ipc-notice-bg, #0a2e4f);
	color: var(--ipc-notice-text, #ffffff);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ipc-site-notice--fixed {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1001;
}

.ipc-site-notice__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: var(--ipc-page-max, 1400px);
	margin: 0 auto;
	padding: 10px var(--ipc-page-gutter, clamp(24px, 3.5vw, 40px));
}

.ipc-site-notice__text {
	margin: 0;
	padding: 0;
	font-family: 'Outfit', sans-serif;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0.01em;
	text-align: center;
	color: inherit;
}

/* Push fixed header down only when the notice bar is present */
body:has(.ipc-site-notice--fixed) {
	--ipc-notice-height: 40px;
}

body:has(.ipc-site-notice--fixed) .ipc-header-widget .ipc-header,
body:has(.ipc-site-notice--fixed) .elementor .ipc-header-widget .ipc-header {
	top: var(--ipc-notice-height);
}

body:has(.ipc-site-notice--fixed) .ipc-header-widget .ipc-header__spacer,
body:has(.ipc-site-notice--fixed) .elementor .ipc-header-widget .ipc-header__spacer {
	height: calc(72px + var(--ipc-notice-height));
	min-height: calc(72px + var(--ipc-notice-height));
}

body.admin-bar:has(.ipc-site-notice--fixed) .ipc-site-notice--fixed,
body.admin-bar:has(.ipc-site-notice--fixed) .elementor .ipc-site-notice--fixed {
	top: 32px;
}

body.admin-bar:has(.ipc-site-notice--fixed) .ipc-header-widget .ipc-header,
body.admin-bar:has(.ipc-site-notice--fixed) .elementor .ipc-header-widget .ipc-header {
	top: calc(32px + var(--ipc-notice-height)) !important;
}

@media screen and (max-width: 782px) {
	body.admin-bar:has(.ipc-site-notice--fixed) .ipc-site-notice--fixed,
	body.admin-bar:has(.ipc-site-notice--fixed) .elementor .ipc-site-notice--fixed {
		top: 46px;
	}

	body.admin-bar:has(.ipc-site-notice--fixed) .ipc-header-widget .ipc-header,
	body.admin-bar:has(.ipc-site-notice--fixed) .elementor .ipc-header-widget .ipc-header {
		top: calc(46px + var(--ipc-notice-height)) !important;
	}
}

@media (max-width: 640px) {
	.ipc-site-notice__inner {
		padding-top: 9px;
		padding-bottom: 9px;
	}

	.ipc-site-notice__text {
		font-size: 12.5px;
	}

	body:has(.ipc-site-notice--fixed) {
		--ipc-notice-height: 44px;
	}
}

/* Elementor editor placeholder */
.ipc-site-notice--editor {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	z-index: 1;
}

/*
 * Elementor editor / preview: keep notice in document flow.
 * Fixed positioning causes the bar to overlap the IPC Header canvas.
 */
.elementor-editor-active .ipc-site-notice,
.elementor-editor-active .ipc-site-notice--fixed,
.elementor-editor-preview .ipc-site-notice,
.elementor-editor-preview .ipc-site-notice--fixed {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	z-index: 1;
}

.elementor-editor-active .ipc-site-notice-widget,
.elementor-editor-preview .ipc-site-notice-widget {
	position: relative;
	z-index: 1;
	width: 100%;
}

/* Stack header under the notice in the editor (no fixed + spacer gap) */
.elementor-editor-active .ipc-header-widget .ipc-header,
.elementor-editor-preview .ipc-header-widget .ipc-header {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
}

.elementor-editor-active .ipc-header-widget .ipc-header__spacer,
.elementor-editor-preview .ipc-header-widget .ipc-header__spacer {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

.elementor-editor-active .ipc-header-widget,
.elementor-editor-preview .ipc-header-widget {
	--ipc-notice-height: 0px;
}
