/*------------------------------------------------------------------------
# mod_header_bar - Header Notification Bar
# ------------------------------------------------------------------------
# author    Infyways Solutions / JoomlaX
# copyright Copyright (C) 2026 JoomlaX. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
-------------------------------------------------------------------------*/

:root {
	--jx-hnb-font: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system,
		"Helvetica Neue", Arial, sans-serif;
	--jx-hnb-radius-btn: 999px;
	--jx-hnb-radius-close: 999px;
	--jx-hnb-close-size: 2rem;
	--jx-hnb-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--jx-hnb-speed: 220ms;
	--jx-hnb-close-ms: 420ms;
	--jx-hnb-gap: 0.85rem;
	--jx-hnb-pad-y: 0.7rem;
	--jx-hnb-pad-x: 1.25rem;
}

.jx-header-notification {
	box-sizing: border-box;
	position: fixed;
	left: 0;
	z-index: 10500;
	width: 100%;
	display: none;
	padding: var(--jx-hnb-pad-y) var(--jx-hnb-pad-x);
	font-family: var(--jx-hnb-font);
	font-size: 0.9375rem;
	line-height: 1.45;
	letter-spacing: -0.01em;
	-webkit-font-smoothing: antialiased;
	text-shadow: none;
	will-change: opacity, transform, max-height;
	transition:
		opacity var(--jx-hnb-close-ms) var(--jx-hnb-ease),
		transform var(--jx-hnb-close-ms) var(--jx-hnb-ease),
		max-height var(--jx-hnb-close-ms) var(--jx-hnb-ease),
		padding var(--jx-hnb-close-ms) var(--jx-hnb-ease),
		margin var(--jx-hnb-close-ms) var(--jx-hnb-ease),
		box-shadow var(--jx-hnb-close-ms) ease;
}

.jx-header-notification.is-visible {
	display: block;
}

.jx-header-notification.is-closing {
	pointer-events: none !important;
}

.jx-header-notification * {
	box-sizing: border-box;
}

.jx-headerTop {
	top: 0;
}

.jx-headerBottom {
	bottom: 0;
}

.jx-hnb_content {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: var(--jx-hnb-gap);
	width: 100%;
	max-width: 72rem;
	margin: 0 auto;
	min-height: 2rem;
}

.jx-hnb_message {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 500;
}

.jx-hnb_message a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: 1px;
}

.jx-hnb_button {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

.jx-hnb_close {
	margin-left: 0;
	flex: 0 0 auto;
}

/* Close — modern circular control with SVG */
a.jx-close-notify {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--jx-hnb-close-size);
	height: var(--jx-hnb-close-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--jx-hnb-radius-close);
	background: rgba(255, 255, 255, 0.14);
	color: inherit !important;
	font-size: 0;
	line-height: 0;
	text-decoration: none !important;
	cursor: pointer;
	opacity: 0.92;
	transition:
		background-color var(--jx-hnb-speed) ease,
		opacity var(--jx-hnb-speed) ease,
		transform var(--jx-hnb-speed) var(--jx-hnb-ease),
		box-shadow var(--jx-hnb-speed) ease;
}

a.jx-close-notify svg {
	display: block;
	width: 0.85rem;
	height: 0.85rem;
	pointer-events: none;
	flex-shrink: 0;
}

a.jx-close-notify:hover,
a.jx-close-notify:focus-visible {
	background: rgba(255, 255, 255, 0.26);
	opacity: 1;
	text-decoration: none !important;
	transform: scale(1.06);
	outline: none;
}

a.jx-close-notify:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* CTA */
a.jx-hnbc_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.45rem 1.1rem;
	min-height: 2.15rem;
	line-height: 1.2;
	border: 0;
	border-radius: var(--jx-hnb-radius-btn);
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none !important;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
	transition:
		background-color var(--jx-hnb-speed) ease,
		color var(--jx-hnb-speed) ease,
		transform var(--jx-hnb-speed) var(--jx-hnb-ease),
		box-shadow var(--jx-hnb-speed) ease;
}

a.jx-hnbc_button:hover {
	text-decoration: none !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.35);
}

a.jx-hnbc_button:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

a.jx-hnbc_button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* Icon / badge / countdown / coupon / secondary */
.jx-hnb_icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	color: inherit;
	line-height: 0;
}

.jx-hnb_icon svg {
	width: 1.05rem;
	height: 1.05rem;
	display: block;
	overflow: visible;
	flex-shrink: 0;
}

.jx-hnb_badge {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	color: inherit;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
}

.jx-hnb_countdown {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	flex: 0 0 auto;
	padding: 0.35rem 0.65rem;
	border-radius: 0.65rem;
	background: rgba(0, 0, 0, 0.18);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.jx-hnb_countdown-label {
	opacity: 0.85;
	font-size: 0.75rem;
	font-weight: 500;
}

.jx-hnb_countdown-value {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.jx-hnb_coupon {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	flex: 0 0 auto;
	margin: 0;
	padding: 0.4rem 0.75rem;
	border: 1px dashed rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: inherit;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color var(--jx-hnb-speed) ease, transform var(--jx-hnb-speed) var(--jx-hnb-ease);
}

.jx-hnb_coupon:hover,
.jx-hnb_coupon:focus-visible {
	background: rgba(255, 255, 255, 0.22);
	outline: none;
	transform: translateY(-1px);
}

.jx-hnb_coupon-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.jx-hnb_coupon.is-copied {
	background: rgba(255, 255, 255, 0.28);
}

.jx-hnb_secondary {
	flex: 0 0 auto;
	color: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.18em;
	opacity: 0.92;
	white-space: nowrap;
}

.jx-hnb_secondary:hover,
.jx-hnb_secondary:focus-visible {
	opacity: 1;
	outline: none;
}

.jx-hnb_progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	overflow: hidden;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.18);
}

.jx-hnb_progress-bar {
	display: block;
	width: 100%;
	height: 100%;
	transform-origin: left center;
	background: rgba(255, 255, 255, 0.85);
	transform: scaleX(1);
}

.jx-hnb-floating .jx-hnb_progress {
	border-radius: 0 0 1rem 1rem;
}

/* Light themes — readable chrome */
.header-theme-minimal .jx-hnb_icon,
.header-theme-promo .jx-hnb_icon,
.header-theme-frosted-glass .jx-hnb_icon {
	background: rgba(15, 23, 42, 0.06);
}

.header-theme-minimal .jx-hnb_badge,
.header-theme-promo .jx-hnb_badge {
	background: rgba(15, 23, 42, 0.08);
}

.header-theme-minimal .jx-hnb_countdown,
.header-theme-promo .jx-hnb_countdown {
	background: rgba(15, 23, 42, 0.08);
}

.header-theme-minimal .jx-hnb_coupon,
.header-theme-promo .jx-hnb_coupon {
	border-color: rgba(15, 23, 42, 0.25);
	background: rgba(15, 23, 42, 0.05);
}

.header-theme-minimal .jx-hnb_progress,
.header-theme-promo .jx-hnb_progress {
	background: rgba(15, 23, 42, 0.1);
}

.header-theme-minimal .jx-hnb_progress-bar,
.header-theme-promo .jx-hnb_progress-bar {
	background: #1819ed;
}

.header-theme-promo .jx-hnb_progress-bar {
	background: #0f172a;
}

/* Position modifiers */
.jx-header-notification.jx-headerPushed {
	position: relative;
	display: block;
}

.jx-header-notification.jx-headerPushed.is-closing {
	display: block !important;
}

/* Responsive */
@media only screen and (max-width: 767px) {
	:root {
		--jx-hnb-pad-y: 0.85rem;
		--jx-hnb-pad-x: 2.75rem 0.85rem 0.85rem;
	}

	.jx-header-notification {
		padding: 0.85rem 2.75rem 0.85rem 0.85rem;
	}

	.jx-hnb_content {
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 0.65rem;
		text-align: left;
	}

	.jx-hnb_message {
		flex: 1 1 calc(100% - 2.5rem);
		padding-right: 0.25rem;
	}

	.jx-hnb_button:not(.jx-hnb_close) {
		width: 100%;
		justify-content: stretch;
	}

	a.jx-hnbc_button {
		width: 100%;
	}

	.jx-hnb_close {
		position: absolute;
		top: 0.55rem;
		right: 0.55rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jx-header-notification,
	.jx-header-notification.is-closing,
	a.jx-close-notify,
	a.jx-hnbc_button {
		transition: none !important;
		animation: none !important;
		transform: none !important;
	}
}

/* Animation keyframes (used by optional JS / themes) */
@keyframes jx-bounce-in {
	0% { transform: translateY(-20px); opacity: 0; }
	60% { transform: translateY(5px); opacity: 1; }
	100% { transform: translateY(0); opacity: 1; }
}

@keyframes jx-slide-down {
	0% { transform: translateY(-100%); }
	100% { transform: translateY(0); }
}

@keyframes jx-slide-up {
	0% { transform: translateY(100%); }
	100% { transform: translateY(0); }
}
