/**
 * Maha Promo Center — promo bar styles.
 */

.mpc-bar {
	position: relative;
	z-index: 99999;
	width: 100%;
	overflow: hidden;
	background: var(--mpc-bar-bg, #10251d);
	color: var(--mpc-bar-text, #fff);
	/* Set individually rather than with the font shorthand: the shorthand needs a
	   real font-family, and `inherit` there invalidates the whole declaration —
	   which silently killed the size and weight controls. */
	font-size: var(--mpc-bar-size, 15px);
	font-weight: var(--mpc-bar-weight, 500);
	line-height: 1.35;
	transition: transform 0.28s ease;
}

.mpc-bar *,
.mpc-bar *::before,
.mpc-bar *::after {
	box-sizing: border-box;
}

.mpc-bar--sticky.mpc-bar--top {
	position: sticky;
	top: 0;
}

.mpc-bar--sticky.mpc-bar--bottom {
	position: fixed;
	bottom: 0;
	left: 0;
}

/* Accent line ------------------------------------------------------------ */

.mpc-bar--accent-bottom,
.mpc-bar--accent-both {
	border-bottom: var(--mpc-accent-size, 3px) solid var(--mpc-accent, #e8967a);
}

.mpc-bar--accent-top,
.mpc-bar--accent-both {
	border-top: var(--mpc-accent-size, 3px) solid var(--mpc-accent, #e8967a);
}

/* Background image ------------------------------------------------------- */

.mpc-bar--bg-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--mpc-bar-image);
	background-position: var(--mpc-bar-bg-pos, center center);
	background-size: var(--mpc-bar-bg-size, cover);
	background-repeat: var(--mpc-bar-bg-repeat, no-repeat);
	opacity: var(--mpc-bar-opacity, 1);
	pointer-events: none;
}

.mpc-bar__bg-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Layout ----------------------------------------------------------------- */

.mpc-bar__inner {
	position: relative;
	z-index: 2;
	display: flex;
	/* align-items keeps every child vertically centred, so a tall bar leaves an
	   equal gap above and below the content rather than pinning it to the top. */
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 14px;
	min-height: var(--mpc-bar-height, 0px);
	max-width: 1440px;
	margin: 0 auto;
	padding: 11px 20px;
}

/* Explicit order values give the countdown alignment something real to move. */
.mpc-bar__badge { order: 2; }
.mpc-bar__text { order: 3; }
.mpc-bar .mpc-button { order: 5; }
.mpc-bar__close { order: 6; }

.mpc-bar__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 13px;
	border-radius: 999px;
	background: var(--mpc-badge-bg, #f3c94f);
	color: var(--mpc-badge-text, #10251d);
	font-size: 0.8em;
	font-weight: 800;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.mpc-bar__badge-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
}

.mpc-bar__text {
	flex: 1 1 260px;
	min-width: 0;
	text-align: var(--mpc-bar-align, center);
}

.mpc-bar__text p {
	margin: 0;
}

.mpc-bar__text strong,
.mpc-bar__text b {
	color: var(--mpc-bar-highlight, #f3c94f);
	font-weight: 800;
}

.mpc-bar__text a {
	color: var(--mpc-bar-highlight, #f3c94f);
}

/* Countdown horizontal position ------------------------------------------ */

/* Left: the timer jumps ahead of the message, right after the badge. */
.mpc-bar.mpc-bar--cd-left .mpc-countdown--bar {
	order: 1;
}

/* Center: the message stops growing so the auto margins have space to split. */
.mpc-bar.mpc-bar--cd-center .mpc-countdown--bar {
	order: 4;
	margin-left: auto;
	margin-right: auto;
}

.mpc-bar.mpc-bar--cd-center .mpc-bar__text {
	flex: 0 1 auto;
}

/* Right: the free space collects before the timer, pushing it to the end. */
.mpc-bar.mpc-bar--cd-right .mpc-countdown--bar {
	order: 4;
	margin-left: auto;
}

.mpc-bar.mpc-bar--cd-right .mpc-bar__text {
	flex: 0 1 auto;
}

/* Every countdown rule is scoped to the bar. The popup stylesheet describes the
   same block, and when both files load — any page with a bar and a popup, or the
   admin screens, which load both for their previews — two unscoped rules of equal
   specificity would collide and the later file would silently win. That is what
   made the digit size control look like it did nothing. */
.mpc-bar .mpc-countdown {
	display: flex;
	gap: 5px;
}

.mpc-bar .mpc-countdown__unit {
	display: grid;
	gap: 1px;
	min-width: calc(var(--mpc-cd-size, 16px) * 2.9);
	padding: calc(var(--mpc-cd-size, 16px) * 0.32) calc(var(--mpc-cd-size, 16px) * 0.38);
	border-radius: 8px;
	background: var(--mpc-cd-box, rgba(255, 255, 255, 0.08));
	text-align: center;
}

.mpc-bar .mpc-countdown__value {
	color: var(--mpc-cd-digit, #fff);
	font-size: var(--mpc-cd-size, 16px);
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.mpc-bar .mpc-countdown__label {
	color: var(--mpc-cd-label, #f3c94f);
	/* Scales with the digit size so the two never drift apart. */
	font-size: calc(var(--mpc-cd-size, 16px) * 0.56);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mpc-bar .mpc-countdown--expired {
	display: block;
	color: var(--mpc-cd-label, #f3c94f);
	font-size: var(--mpc-cd-size, 16px);
	font-weight: 700;
}

/* Button ----------------------------------------------------------------- */

.mpc-bar .mpc-button {
	position: relative;
	display: inline-flex !important;
	box-sizing: border-box !important;
	min-width: 0 !important;
	text-transform: none !important;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: var(--mpc-btn-radius, 9px);
	font-weight: 800;
	font-size: inherit;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Resting state: a thin glass rim and a close, soft glow rather than a wide halo. */
.mpc-bar .mpc-button--solid {
	background: var(--mpc-btn-bg, #f3c94f);
	color: var(--mpc-btn-text, #10251d);
	border-color: rgba(255, 255, 255, 0.55);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.45),
		0 1px 2px rgba(0, 0, 0, 0.25),
		0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mpc-bar .mpc-button--outline {
	background: rgba(255, 255, 255, 0.06);
	border-color: var(--mpc-btn-border, #f3c94f);
	color: var(--mpc-btn-border, #f3c94f);
	backdrop-filter: blur(2px);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.14),
		0 0 8px -2px var(--mpc-btn-border, #f3c94f);
}

.mpc-bar .mpc-button:hover,
.mpc-bar .mpc-button:focus-visible {
	transform: translateY(-1px);
	outline: none;
}

.mpc-bar .mpc-button--solid:hover,
.mpc-bar .mpc-button--solid:focus-visible {
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.5),
		0 3px 10px -2px rgba(0, 0, 0, 0.4),
		0 0 14px -3px var(--mpc-btn-border, #f3c94f);
}

.mpc-bar .mpc-button--outline:hover,
.mpc-bar .mpc-button--outline:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.2),
		0 0 14px -2px var(--mpc-btn-border, #f3c94f);
}

.mpc-bar .mpc-button:focus-visible {
	outline: 2px solid var(--mpc-btn-border, #f3c94f);
	outline-offset: 3px;
}

/* Close button ----------------------------------------------------------- */

/* Every property a theme's bare-`button` reset touches is declared here, in both
   the resting and hover states. Hello Elementor's reset sets padding, a border,
   `width: auto` and a `button:hover` background — which is what stretched this
   control into an ellipse and turned it crimson on the live site while the admin
   preview, which has no such rule, looked fine. */
.mpc-bar .mpc-bar__close {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-sizing: border-box !important;
	width: var(--mpc-close-size, 32px) !important;
	height: var(--mpc-close-size, 32px) !important;
	min-width: 0 !important;
	max-width: none !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	background-color: var(--mpc-close-bg, rgba(255, 255, 255, 0.14)) !important;
	background-image: none !important;
	color: var(--mpc-close-color, #fff) !important;
	font-family: inherit !important;
	line-height: 1 !important;
	text-transform: none !important;
	text-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	cursor: pointer;
	transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.mpc-bar .mpc-bar__close svg {
	display: block;
	width: 55%;
	height: 55%;
}

.mpc-bar.mpc-bar--close-circle .mpc-bar__close { border-radius: 50% !important; }
.mpc-bar.mpc-bar--close-square .mpc-bar__close { border-radius: 8px !important; }

.mpc-bar.mpc-bar--close-plain .mpc-bar__close {
	background-color: transparent !important;
	border-radius: 4px !important;
}

.mpc-bar.mpc-bar--close-pinned .mpc-bar__close {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
}

/* Keep the content clear of a pinned close button. */
.mpc-bar--close-pinned .mpc-bar__inner {
	padding-right: calc(var(--mpc-close-size, 32px) + 28px);
}

.mpc-bar .mpc-bar__close:hover,
.mpc-bar .mpc-bar__close:focus-visible {
	background-color: var(--mpc-close-bg, rgba(255, 255, 255, 0.14)) !important;
	color: var(--mpc-close-color, #fff) !important;
	/* The wide inset spread lightens whatever background is configured, so the
	   hover reads the same against a dark or a light bar. */
	box-shadow:
		inset 0 0 0 999px rgba(255, 255, 255, 0.18),
		0 0 0 3px rgba(255, 255, 255, 0.14);
	outline: none;
}

.mpc-bar.mpc-bar--close-plain .mpc-bar__close:hover,
.mpc-bar.mpc-bar--close-plain .mpc-bar__close:focus-visible {
	background-color: transparent !important;
}

.mpc-bar.mpc-bar--close-pinned .mpc-bar__close:hover,
.mpc-bar.mpc-bar--close-pinned .mpc-bar__close:focus-visible {
	transform: translateY(-50%) scale(1.06);
}

.mpc-bar.mpc-bar--close-inline .mpc-bar__close:hover,
.mpc-bar.mpc-bar--close-inline .mpc-bar__close:focus-visible {
	transform: scale(1.06);
}

/* Hide on scroll --------------------------------------------------------- */

.mpc-bar--top.is-hidden {
	transform: translateY(-100%);
}

.mpc-bar--bottom.is-hidden {
	transform: translateY(100%);
}

.mpc-bar.is-dismissed {
	display: none !important;
}

/* Admin preview ---------------------------------------------------------- */

.mpc-bar--preview {
	position: relative;
	border-radius: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 782px) {
	.mpc-bar__inner {
		gap: 9px;
		padding: 10px 14px;
	}

	.mpc-bar__text {
		flex-basis: 100%;
		order: 3;
	}

	/* On a narrow bar every alignment collapses to a centred row; the ordering
	   games above only make sense when the items share one line. */
	.mpc-bar.mpc-bar--cd-left .mpc-countdown--bar,
	.mpc-bar.mpc-bar--cd-center .mpc-countdown--bar,
	.mpc-bar.mpc-bar--cd-right .mpc-countdown--bar {
		order: 4;
		margin-left: auto;
		margin-right: auto;
	}

	.mpc-bar .mpc-countdown__unit {
		min-width: 0;
	}

	.mpc-bar--close-pinned .mpc-bar__inner {
		padding-right: calc(var(--mpc-close-size, 32px) + 20px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mpc-bar,
	.mpc-bar .mpc-button,
	.mpc-bar__close {
		transition: none;
	}
}
