/* BrooklynFM — бегущая строка новостей. Цвета и размеры — из настроек (CSS-переменные --tk-*). */

.bfm-tk {
	position: relative; z-index: 30; display: flex; align-items: stretch;
	height: var(--tk-h, 40px); background: var(--tk-bg, #fff); color: var(--tk-fg, #011a33);
	font-size: var(--tk-size, 15px); font-weight: var(--tk-weight, 700); line-height: 1;
	overflow: hidden; box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.bfm-tk[hidden] { display: none !important; }

.bfm-tk__label {
	position: relative; z-index: 2; flex: none; display: flex; align-items: center; padding: 0 16px 0 14px;
	background: var(--tk-lbg, #cf0f74); color: var(--tk-lfg, #fff); text-decoration: none;
	font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
/* Скос справа у плашки, как на новостных каналах. */
.bfm-tk__label::after {
	content: ""; position: absolute; top: 0; right: -10px; width: 20px; height: 100%;
	background: inherit; transform: skewX(-14deg);
}
.bfm-tk__label:hover, .bfm-tk__label:focus-visible { filter: brightness(1.12); color: var(--tk-lfg, #fff); }

.bfm-tk__view { position: relative; flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.bfm-tk__track {
	display: flex; align-items: center; white-space: nowrap; will-change: transform;
	padding-left: 18px;
	animation: bfm-tk-run var(--tk-dur, 60s) linear infinite;
}
.bfm-tk:hover .bfm-tk__track, .bfm-tk:focus-within .bfm-tk__track { animation-play-state: paused; }
@keyframes bfm-tk-run { from { transform: translateX(0); } to { transform: translateX(calc(var(--tk-shift, 1000px) * -1)); } }

.bfm-tk__item { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.bfm-tk__item:hover, .bfm-tk__item:focus-visible { text-decoration: underline; text-underline-offset: 3px; color: inherit; }
.bfm-tk__sep {
	color: var(--tk-sep, #cf0f74); padding: 0 18px; font-weight: 800;
	display: inline-flex; align-items: center; align-self: stretch; line-height: 1; font-size: .8em;
	font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", system-ui, sans-serif;
}
.bfm-tk__icon { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", system-ui, sans-serif; }
/* Если WordPress всё же заменил значок картинкой — показать её размером с букву. */
.bfm-tk img.emoji { display: inline-block !important; width: 1.1em !important; height: 1.1em !important; max-width: none !important; margin: 0 !important; vertical-align: middle !important; }

/* Под шапкой и прилипает к ней. */
.bfm-tk.is-sticky { position: sticky; top: var(--bfm-header-h, 68px); }
.admin-bar .bfm-tk.is-sticky { top: calc(var(--bfm-header-h, 68px) + 32px); }
@media (max-width: 782px) { .admin-bar .bfm-tk.is-sticky { top: var(--bfm-header-h, 68px); } }

/* Над нижним плеером. */
.bfm-tk.is-bottom {
	position: fixed; left: 0; right: 0; z-index: 49;
	bottom: calc(var(--bfm-player-h, 72px) + env(safe-area-inset-bottom));
	box-shadow: 0 -1px 0 rgba(0, 0, 0, .12);
}
body.bfm-tk-bottom { padding-bottom: calc(var(--bfm-player-h, 72px) + var(--tk-h, 40px) + env(safe-area-inset-bottom)); }

/* Предпросмотр в настройках. */
.bfm-tk.is-preview { border-radius: 6px; max-width: 900px; }

/* Галочка «Не двигать, если в системе выключена анимация» — строка стоит, её можно листать пальцем. */
@media (prefers-reduced-motion: reduce) {
	/* Тема BrooklynFM в этом режиме гасит все анимации — строку возвращаем, как и строки «Отзвучали» в теме. */
	.bfm-tk:not(.is-calm) .bfm-tk__track { animation-duration: var(--tk-dur, 60s) !important; animation-iteration-count: infinite !important; }
	.bfm-tk.is-calm .bfm-tk__track { animation: none; }
	.bfm-tk.is-calm .bfm-tk__view { overflow-x: auto; scrollbar-width: none; }
}

@media (max-width: 600px) {
	.bfm-tk__label { padding: 0 12px 0 10px; letter-spacing: .03em; }
	.bfm-tk__sep { padding: 0 12px; }
}
