/* Alert bar — Figma node 4026:1137. Decorations are pseudo-elements and background layers, all vector:
   bolt.svg (the media «Lightning 1 / 2» shape redrawn as a path — those files only wrap a PNG), sale.svg, glow.svg. */
.topbar {
	--bolt-gap: var(--sp-32);
	--close-size: 32px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--bolt-gap);
	min-height: 48px; /* was 60: slimmer bar */
	padding: 6px calc(var(--close-size) + var(--sp-24));
	overflow: hidden;
	direction: ltr; /* decoration and close-button sides are physical; text keeps its own direction */
	color: var(--n-100);
	background:
		url("../../img/topbar/sale.svg") calc(50% - 300px) -34px / 72px 72px no-repeat,
		url("../../img/topbar/sale.svg") calc(50% + 311px) 6px / 72px 72px no-repeat,
		url("../../img/topbar/glow.svg") calc(50% - 10px) -92px / 876px 294px no-repeat,
		var(--blue);
}
.topbar[hidden] { display: none; }

.topbar__text {
	direction: rtl;
	text-align: center;
	text-wrap: balance;
	font-size: 18px;
	line-height: 28px;
	font-weight: 600;
}
.topbar__text a:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Bright bolts beside the text */
.topbar::before,
.topbar::after {
	content: "";
	flex: none;
	width: 18px;
	height: 32px;
	background: var(--n-100);
	mask: url("../../img/topbar/bolt.svg") center / contain no-repeat;
}
.topbar::before { transform: rotate(15deg); }
.topbar::after  { transform: rotate(165deg) scaleY(-1); }

/* Small faded bolts, clipped by the bar edges */
.topbar__text::before,
.topbar__text::after {
	content: "";
	position: absolute;
	width: 14px;
	height: 26px;
	opacity: .5;
	background: var(--n-100);
	mask: url("../../img/topbar/bolt.svg") center / contain no-repeat;
	transform: rotate(180deg) scaleY(-1);
}
.topbar__text::before { left: calc(50% + 230px); top: -9px; }
.topbar__text::after  { left: calc(50% - 246px); bottom: -11px; }

.topbar__close {
	position: absolute;
	right: var(--sp-16);
	top: 50%;
	translate: 0 -50%;
	display: grid;
	place-items: center;
	width: var(--close-size);
	height: var(--close-size);
	padding: 0;
	border: 0;
	border-radius: var(--r-pill);
	color: var(--n-100);
	background: transparent;
	opacity: .7;
	cursor: pointer;
	transition: opacity .15s, background-color .15s;
}
.topbar__close:hover,
.topbar__close:focus-visible { opacity: 1; background: rgb(255 255 255 / .15); }
.topbar__close:focus-visible { outline: 2px solid var(--n-100); outline-offset: 2px; }
.topbar__close .icon { font-size: 20px; }

@media (max-width: 769px) {
	.topbar { --bolt-gap: var(--sp-8); --close-size: 28px; min-height: 38px; padding-block: 4px; padding-inline: calc(var(--close-size) + var(--sp-12)); }
	.topbar__text { font-size: var(--fs-title-s); line-height: var(--lh-title-s); }
	.topbar::before, .topbar::after { width: 14px; height: 24px; }
	.topbar__close { right: var(--sp-8); }
}
