/*!
 * UltraPress Breaking News Ticker
 */
/* Fixed Bottom Ticker with Reserved Layout Space.
   The bar is pinned to the viewport bottom (position:fixed). To prevent
   it covering the footer, ticker.js mirrors the bar's measured height to
   `body { padding-bottom }` via a ResizeObserver — same model WP core
   uses for the admin bar (`html { padding-top:32px }`). Footer therefore
   ends *above* the ticker, in normal flow, and is always fully visible. */
.upbn-wrap{
	position:fixed;
	left:0;right:0;bottom:0;
	z-index:99990;
	display:flex;
	flex-direction:row;
	align-items:stretch;
	width:100%;
	box-sizing:border-box;
	height:var(--upbn-height,44px);
	background:var(--upbn-bg,#b00020);
	color:var(--upbn-text,#fff);
	font-family:inherit;
	font-size:var(--upbn-font-size,15px);
	line-height:1.2;
	box-shadow:0 -2px 12px rgba(0,0,0,.18);
	overflow:hidden;
	contain:content;
}
.upbn-label{
	flex:0 0 auto;
	display:flex;align-items:center;justify-content:center;
	padding:0 18px;
	background:var(--upbn-label-bg,#000);
	color:var(--upbn-label-text,#fff);
	font-weight:800;
	letter-spacing:.3px;
	text-transform:uppercase;
	position:relative;
	z-index:2;
}
.upbn-label::after{
	content:"";
	position:absolute;
	top:0;bottom:0;
	right:-12px;
	width:0;height:0;
	border-top:calc(var(--upbn-height,44px)/2) solid transparent;
	border-bottom:calc(var(--upbn-height,44px)/2) solid transparent;
	border-left:12px solid var(--upbn-label-bg,#000);
}
/* RTL — DOM-order solution.
   We swap visual order with flex-direction:row-reverse so the label sits on
   the right regardless of any inherited `direction` value from theme CSS.
   The wrap itself stays LTR so the scroll animation (translate -50%) keeps
   moving content right-to-left, matching how real Arabic TV tickers behave. */
.upbn-wrap.upbn-rtl{
	flex-direction:row-reverse;
	direction:ltr;
}
/* Arrow on the label points into the track (toward the LEFT in RTL). */
.upbn-wrap.upbn-rtl .upbn-label::after{
	right:auto;left:-12px;
	border-left:0;
	border-right:12px solid var(--upbn-label-bg,#000);
}
/* Each Arabic title gets its own RTL bidi context so the text reads correctly
   while the surrounding flex layout/animation remain in LTR coordinates. */
.upbn-wrap.upbn-rtl .upbn-title{ direction:rtl; unicode-bidi:isolate; }

.upbn-track-mask{
	flex:1 1 auto;
	overflow:hidden;
	position:relative;
	display:flex;
	align-items:center;
}
.upbn-track{
	display:flex;
	width:max-content;
	will-change:transform;
	transform:translate3d(0,0,0);
	backface-visibility:hidden;
	animation:upbn-scroll var(--upbn-duration,40s) linear infinite;
}
.upbn-wrap.is-paused .upbn-track{ animation-play-state:paused; }
/* Each title keeps its own natural direction so Arabic reads correctly. */
.upbn-wrap.upbn-rtl .upbn-title{ direction:rtl; unicode-bidi:isolate; }

.upbn-list{
	list-style:none;
	margin:0;padding:0 0 0 var(--upbn-gap,40px);
	display:flex;
	align-items:center;
	gap:var(--upbn-gap,40px);
}
.upbn-item{
	display:flex;
	align-items:center;
	gap:calc(var(--upbn-gap,40px) / 2);
	white-space:nowrap;
}
.upbn-link{
	color:inherit;
	text-decoration:none;
	display:inline-flex;
	align-items:center;
	gap:8px;
	transition:opacity .2s ease, transform .2s ease, color .2s ease;
}
.upbn-link:hover{ opacity:.92; }
.upbn-label{
	background:linear-gradient(180deg, var(--upbn-label-bg,#000) 0%, color-mix(in srgb, var(--upbn-label-bg,#000) 80%, #fff) 100%);
}
.upbn-thumb{
	width:calc(var(--upbn-height,44px) - 14px);
	height:calc(var(--upbn-height,44px) - 14px);
	object-fit:cover;
	border-radius:3px;
	flex:0 0 auto;
}
/* Separator wrapper + image — explicit sizing & flex-shrink:0 so the icon is
   never collapsed by the parent flex layout (`.upbn-item` is display:flex).
   Without flex-shrink:0 some themes that set a global `img{max-width:100%}`
   plus a narrow viewport caused the icon to shrink to 0×0 and disappear. */
.upbn-sep{
	flex:0 0 auto;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-width:var(--upbn-sep-size,14px);
}
.upbn-sep-img{
	flex:0 0 auto;
	display:inline-block;
	width:var(--upbn-sep-size,14px);height:var(--upbn-sep-size,14px);
	max-width:var(--upbn-sep-size,14px);max-height:var(--upbn-sep-size,14px);
	object-fit:contain;
	opacity:.85;
	vertical-align:middle;
}
.upbn-sep-dot{opacity:.7;font-size:var(--upbn-sep-size,14px);line-height:1}
.upbn-sep-line{
	display:inline-block;
	width:1px;height:55%;
	background:currentColor;
	opacity:.4;
}

@keyframes upbn-scroll{
	from{ transform:translate3d(0,0,0); }
	to  { transform:translate3d(-50%,0,0); }
}

@keyframes upbn-scroll-ltr{
	from{ transform:translate3d(-50%,0,0); }
	to  { transform:translate3d(0,0,0); }
}

@media (max-width:768px){
	.upbn-wrap{ height:calc(var(--upbn-height,44px) - 4px); }
	.upbn-label{ padding:0 12px; font-size:.92em; }
}
@media (prefers-reduced-motion: reduce){
	.upbn-track{ animation-duration: calc(var(--upbn-duration,40s) * 2); }
}
