/* Announcement ticker – between the header and the content */
.bcc-ticker {
	--bcc-t-bg: #bf565a;
	--bcc-t-title: #fff;
	--bcc-t-text: #fff;
	background: var(--bcc-t-bg);
	position: relative;
	z-index: 1;
	font-size: 16px;
	line-height: 1.4;
	overflow: hidden;
}
.bcc-ticker *,
.bcc-ticker *::before,
.bcc-ticker *::after { box-sizing: border-box; }

.bcc-ticker__inner {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 46px;
	padding: 8px 20px;
}
.bcc-ticker--static .bcc-ticker__inner { max-width: 1180px; margin: 0 auto; justify-content: center; }
.bcc-ticker--btn-only .bcc-ticker__inner { justify-content: center; }

.bcc-ticker__msg { min-width: 0; }
.bcc-ticker--scroll .bcc-ticker__msg {
	flex: 1;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to left, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
	mask-image: linear-gradient(to left, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.bcc-ticker__track {
	display: flex;
	width: max-content;
	animation: bcc-ticker-move var(--bcc-t-dur, 20s) linear infinite;
	will-change: transform;
}
.bcc-ticker--scroll:hover .bcc-ticker__track,
.bcc-ticker--scroll:focus-within .bcc-ticker__track { animation-play-state: paused; }

/* Hebrew reads right-to-left, so the text travels to the right */
@keyframes bcc-ticker-move {
	from { transform: translateX(0); }
	to { transform: translateX(var(--bcc-t-shift, 25%)); }
}
[dir="ltr"] .bcc-ticker__track,
body:not(.rtl) .bcc-ticker__track { animation-name: bcc-ticker-move-ltr; }
@keyframes bcc-ticker-move-ltr {
	from { transform: translateX(0); }
	to { transform: translateX(calc(-1 * var(--bcc-t-shift, 25%))); }
}

.bcc-ticker__set { display: flex; flex: none; }
.bcc-ticker__item { display: inline-flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.bcc-ticker--scroll .bcc-ticker__item { padding-inline-end: 64px; }
.bcc-ticker--scroll .bcc-ticker__item::after {
	content: "";
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--bcc-t-text); opacity: .55;
	align-self: center;
	margin-inline-start: 22px;
}
.bcc-ticker--static .bcc-ticker__item { white-space: normal; flex-wrap: wrap; justify-content: center; text-align: center; column-gap: 10px; row-gap: 2px; }

.bcc-ticker__title { color: var(--bcc-t-title); font-weight: 700; }
.bcc-ticker__text { color: var(--bcc-t-text); }
.bcc-ticker__msglink,
.bcc-ticker__msglink:hover { display: inline-flex; align-items: baseline; gap: 10px; color: inherit; text-decoration: none; }
.bcc-ticker__msglink:hover .bcc-ticker__text { text-decoration: underline; text-underline-offset: 3px; }

.bcc-ticker__btn,
.bcc-ticker__btn:visited {
	flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 34px; padding: 6px 18px;
	font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap;
	color: var(--bcc-t-btn-text, #fff) !important;
	background: var(--bcc-t-btn, #1f1d1d);
	border-radius: 999px;
	text-decoration: none !important;
	transition: filter .15s, transform .15s;
}
.bcc-ticker__btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.bcc-ticker a:focus-visible { outline: 2px solid var(--bcc-t-title); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 767px) {
	.bcc-ticker { font-size: 14.5px; }
	.bcc-ticker__inner { gap: 10px; min-height: 42px; padding: 7px 12px; }
	.bcc-ticker__btn { min-height: 30px; padding: 5px 14px; font-size: 14px; }
	.bcc-ticker--scroll .bcc-ticker__item { padding-inline-end: 40px; }
	.bcc-ticker--scroll .bcc-ticker__item::after { margin-inline-start: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.bcc-ticker__track { animation: none; width: auto; }
	.bcc-ticker__set[aria-hidden="true"] { display: none; }
	.bcc-ticker--scroll .bcc-ticker__set { flex-direction: column; gap: 4px; }
	.bcc-ticker__slide { transition: none; transform: none; }
	.bcc-ticker--scroll .bcc-ticker__msg { -webkit-mask-image: none; mask-image: none; }
	.bcc-ticker--scroll .bcc-ticker__item { white-space: normal; flex-wrap: wrap; padding: 0; }
	.bcc-ticker--scroll .bcc-ticker__item::after { display: none; }
}

/* Several messages running in a row: each button travels with its message */
.bcc-ticker--multi .bcc-ticker__item { align-items: center; }
.bcc-ticker--multi .bcc-ticker__item .bcc-ticker__btn { min-height: 30px; padding: 4px 14px; font-size: 14px; margin-inline-start: 4px; }

/* Rotating messages: one at a time, stacked in the same cell */
.bcc-ticker--rotate .bcc-ticker__inner { display: block; }
.bcc-ticker__slides { display: grid; width: 100%; max-width: 1180px; margin: 0 auto; }
.bcc-ticker__slide {
	grid-area: 1 / 1;
	display: flex; align-items: center; justify-content: center; gap: 18px;
	min-width: 0;
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .45s ease, transform .5s cubic-bezier(.2,.7,.3,1), visibility 0s linear .5s;
}
.bcc-ticker__slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease .1s, transform .5s cubic-bezier(.2,.7,.3,1) .1s, visibility 0s; }
.bcc-ticker__slide .bcc-ticker__msg { min-width: 0; }

@media (max-width: 767px) {
	.bcc-ticker__slide { gap: 10px; }
	.bcc-ticker--multi .bcc-ticker__item .bcc-ticker__btn { min-height: 28px; padding: 4px 12px; font-size: 13.5px; }
}

/* Stuck under a sticky header (class + top set by the inline script) */
.bcc-ticker.is-stuck { position: sticky; top: var(--bcc-hdr-h, 0px); z-index: 98; }

/* Admin preview */
.bcc-ticker-preview { margin: 0 0 20px; border: 1px solid #dcdcde; border-radius: 8px; overflow: hidden; background: #fff; min-height: 46px; }
.bcc-t-messages { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.bcc-t-msg { border: 1px solid #dcdcde; border-radius: 8px; padding: 12px 14px 4px; background: #f9f9f9; }
.bcc-t-msg p { margin: 0 0 10px; }
.bcc-t-msg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bcc-t-msg-tools { display: flex; gap: 12px; align-items: center; }
.bcc-t-msg-tools .button-link { text-decoration: none; }
.bcc-t-msg:first-child .bcc-t-up, .bcc-t-msg:last-child .bcc-t-down { visibility: hidden; }
.bcc-t-msg:only-child .bcc-t-del { display: none; }
.bcc-t-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bcc-t-row .regular-text { width: 100%; }
.bcc-ticker-preview:empty::before { content: "אין מה להציג – כל השדות ריקים."; display: block; padding: 13px 16px; color: #787c82; }
