/* ---------- v1.10 نوار بلک‌فرایدی (parts/bfbar.css) — [jb_bf_bar] promo bar under the header ----------
   Full-bleed navy band, content in .jb-container (= Settings › container_width, 1740 on the live site), fixed height
   (52 / 48 px) so it never shifts the page. Motion only under .jb-bfb.is-live (set before first paint when
   prefers-reduced-motion is off; removed by parts/bfbar.js when Settings › motion is off) and paused under
   .is-paused (bar off-screen). Seconds are shown only while motion is allowed. Mobile = container queries. */

.jb.jb-ui.jb-ui.jb-ui.jb-bfb-root { display: block; width: 100%; }
.jb.jb-ui.jb-ui.jb-ui.jb-bfb-root[hidden] { display: none !important; }
.jb.jb-ui.jb-ui .jb-bfb { --jb-_amber: #ffc83d; --jb-_muted: #a9bcd8; container-type: inline-size; position: relative; overflow: hidden; overflow: clip; color: #fff; background: radial-gradient(600px 120px at 85% 0%, rgba(6, 95, 213, .45), transparent 70%), linear-gradient(90deg, #070f22, #0b1a3a 50%, #070f22); border-bottom: 1px solid rgba(255, 200, 61, .28); }
.jb.jb-ui.jb-ui .jb-bfb [hidden] { display: none !important; }
.jb.jb-ui.jb-ui .jb-bfb::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(100deg, transparent 35%, rgba(255, 200, 61, .16) 50%, transparent 65%); transform: translateX(100%); }
.jb.jb-ui.jb-ui .jb-bfb.is-live::before { animation: jb-bfb-sweep 6s ease-in-out infinite; }
.jb.jb-ui.jb-ui .jb-bfb__in { position: relative; z-index: 2; height: 52px; display: flex; align-items: center; gap: 8px; }
.jb.jb-ui.jb-ui .jb-bfb__link { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 14px; color: #fff !important; text-decoration: none !important; border-radius: 10px; }
.jb.jb-ui.jb-ui .jb-bfb__link:focus-visible, .jb.jb-ui.jb-ui .jb-bfb__x:focus-visible { outline: 3px solid var(--jb-_amber); outline-offset: -3px; }
.jb.jb-ui.jb-ui .jb-bfb__stamp { flex: none; display: inline-grid; place-items: center; height: 30px; padding: 0 9px; border-radius: 8px; background: var(--jb-_amber); color: #0a1428; font-size: 15px; font-weight: 900; line-height: 1; transform: rotate(-4deg); box-shadow: 0 0 0 3px rgba(255, 200, 61, .18); }
.jb.jb-ui.jb-ui .jb-bfb.is-live .jb-bfb__stamp { animation: jb-bfb-pulse 2.4s ease-in-out infinite; }
.jb.jb-ui.jb-ui .jb-bfb__tag { flex: none; color: var(--jb-_amber); font-size: 15px; font-weight: 900; }
.jb.jb-ui.jb-ui .jb-bfb__txt { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; font-weight: 700; }
.jb.jb-ui.jb-ui .jb-bfb__date { flex: none; color: var(--jb-_amber); font-size: 15px; font-weight: 800; white-space: nowrap; }
.jb.jb-ui.jb-ui .jb-bfb__cd { flex: none; display: inline-flex; align-items: center; gap: 9px; }
.jb.jb-ui.jb-ui .jb-bfb__u { display: inline-flex; align-items: center; gap: 4px; }
.jb.jb-ui.jb-ui .jb-bfb__u--s { display: none; }
.jb.jb-ui.jb-ui .jb-bfb.is-live .jb-bfb__u--s { display: inline-flex; }
.jb.jb-ui.jb-ui .jb-bfb__dg { display: inline-flex; gap: 2px; direction: ltr; perspective: 200px; }
.jb.jb-ui.jb-ui .jb-bfb__dg b { display: inline-grid; place-items: center; width: 19px; height: 28px; border-radius: 5px; color: #fff; font-size: 17px; font-weight: 900; line-height: 1; background: linear-gradient(#1f3260 0 49.5%, #132245 50.5%); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .5); }
.jb.jb-ui.jb-ui .jb-bfb__dg b.is-flip { animation: jb-bfb-flip .3s ease-out; }
.jb.jb-ui.jb-ui .jb-bfb__u small { color: var(--jb-_muted); font-size: 13px; font-weight: 700; }
.jb.jb-ui.jb-ui .jb-bfb__cta { flex: none; margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 10px; background: var(--jb-_amber); color: #0a1428; font-size: 14px; font-weight: 900; white-space: nowrap; transition: transform .18s, background-color .18s; }
.jb.jb-ui.jb-ui .jb-bfb__cta svg { flex: none; width: 16px; height: 16px; }
.jb.jb-ui.jb-ui .jb-bfb.is-live .jb-bfb__cta svg { animation: jb-bfb-nudge 1.8s ease-in-out infinite; }
.jb.jb-ui.jb-ui .jb-bfb__link:hover .jb-bfb__cta { background: #ffd666; transform: translateY(-1px); }
.jb.jb-ui.jb-ui .jb-bfb__short { display: none; }
.jb.jb-ui.jb-ui .jb-bfb__x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--jb-_muted); font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.jb.jb-ui.jb-ui .jb-bfb__x:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.jb.jb-ui.jb-ui .jb-bfb.is-paused::before, .jb.jb-ui.jb-ui .jb-bfb.is-paused .jb-bfb__stamp, .jb.jb-ui.jb-ui .jb-bfb.is-paused .jb-bfb__cta svg { animation-play-state: paused; }

@container (max-width: 760px) {
  .jb.jb-ui.jb-ui .jb-bfb__txt { display: none; }
}
@container (max-width: 680px) {
  .jb.jb-ui.jb-ui .jb-bfb.is-live .jb-bfb__u--s { display: none; }
}
@container (max-width: 600px) {
  .jb.jb-ui.jb-ui .jb-bfb__in { height: 48px; gap: 4px; }
  .jb.jb-ui.jb-ui .jb-bfb__link { gap: 10px; }
  .jb.jb-ui.jb-ui .jb-bfb__u--m, .jb.jb-ui.jb-ui .jb-bfb.is-live .jb-bfb__u--s { display: none; }
  .jb.jb-ui.jb-ui .jb-bfb__dg b { width: 16px; height: 24px; font-size: 14px; }
  .jb.jb-ui.jb-ui .jb-bfb__long { display: none; }
  .jb.jb-ui.jb-ui .jb-bfb__short { display: inline; }
  .jb.jb-ui.jb-ui .jb-bfb__cta { height: 34px; padding: 0 12px; }
  .jb.jb-ui.jb-ui .jb-bfb__stamp { height: 28px; font-size: 14px; }
}
@container (max-width: 420px) {
  .jb.jb-ui.jb-ui .jb-bfb__tag { display: none; }
}
@container (max-width: 360px) {
  .jb.jb-ui.jb-ui .jb-bfb__link { gap: 8px; }
  .jb.jb-ui.jb-ui .jb-bfb__cd { gap: 6px; }
  .jb.jb-ui.jb-ui .jb-bfb__cta { padding: 0 10px; }
}

@keyframes jb-bfb-sweep { 0% { transform: translateX(100%); } 60%, 100% { transform: translateX(-100%); } }
@keyframes jb-bfb-pulse { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(-4deg) scale(1.1); } }
@keyframes jb-bfb-flip { from { transform: rotateX(-82deg); } to { transform: rotateX(0); } }
@keyframes jb-bfb-nudge { 0%, 60%, 100% { transform: translateX(0); } 30% { transform: translateX(-4px); } }
@media (prefers-reduced-motion: reduce) { .jb.jb-ui.jb-ui .jb-bfb::before, .jb.jb-ui.jb-ui .jb-bfb * { animation: none !important; transition: none !important; } }
/* Restrict the native theme's typography overrides to this component. */
.jb.jb-ui.jb-bfb-root .jb-bfb :is(a, b, small, span, button) {
  font-family: "Vazirmatn JB", Tahoma, sans-serif !important;
}
.jb.jb-ui.jb-bfb-root .jb-bfb__in {
  width: 100%;
  max-width: var(--jb-container, 1740px);
}
.jb.jb-ui.jb-bfb-root .jb-bfb.is-paused .jb-bfb__dg b { animation-play-state: paused; }

/* The four choices share the same height, close button and destination. */
.jb-bfb__flight, .jb-bfb__tiles, .jb-bfb__roll, .jb-bfb__ticker { display: none; }
.jb-bfb[data-variant="board"] :is(.jb-bfb__txt,.jb-bfb__date),
.jb-bfb[data-variant="ticker"] :is(.jb-bfb__txt,.jb-bfb__date) { display: none; }
.jb-bfb[data-variant="board"] .jb-bfb__roll,
.jb-bfb[data-variant="ticker"] .jb-bfb__ticker { display: block; }
.jb-bfb__roll, .jb-bfb__ticker {
  flex: 1; position: relative; min-inline-size: 0; block-size: 30px;
  overflow: hidden; color: #f6f8ff; font-size: 15px; font-weight: 700; line-height: 30px;
}
.jb-bfb__roll { perspective: 300px; }
.jb-bfb__roll > span {
  position: absolute; inset: 0; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; opacity: 0;
}
.jb-bfb__roll > span:first-child { opacity: 1; }
.jb-bfb.is-live .jb-bfb__roll > span {
  animation: jb-bfb-board-roll 12s var(--roll-delay) linear infinite;
}
@keyframes jb-bfb-board-roll {
  0%, 22% { opacity: 1; transform: rotateX(0); }
  25%, 96% { opacity: 0; transform: rotateX(-85deg); }
  97% { opacity: 0; transform: rotateX(85deg); }
  100% { opacity: 1; transform: rotateX(0); }
}
.jb-bfb__ticker-track { position: absolute; inset-inline-start: 0; display: flex; inline-size: max-content; }
.jb-bfb__ticker-group { display: flex; flex: none; align-items: center; gap: 19px; padding-inline-end: 19px; white-space: nowrap; }
.jb-bfb__ticker-group > span::after { content: ""; display: inline-block; inline-size: 5px; block-size: 5px; margin-inline-start: 19px; border-radius: 50%; background: #ffc83d; vertical-align: middle; }
.jb-bfb.is-live .jb-bfb__ticker-track { animation: jb-bfb-ticker 32s linear infinite; }
@keyframes jb-bfb-ticker { from { transform: translateX(0); } to { transform: translateX(50%); } }
.jb-bfb[data-variant="plane"].is-live .jb-bfb__flight { display: block; }
.jb-bfb__flight {
  position: relative; container-type: inline-size; flex: 1; min-inline-size: 0;
  block-size: 30px; overflow: hidden; pointer-events: none;
}
.jb-bfb__tow {
  position: absolute; inset-block-start: 50%; inset-inline-start: 0; direction: ltr;
  display: flex; align-items: center; transform: translate(110%,-50%);
  animation: jb-bfb-tow 11s linear infinite;
}
.jb-bfb__tow svg { inline-size: 34px; block-size: 22px; transform: scaleX(-1); }
.jb-bfb__tow i { inline-size: 24px; block-size: 1.5px; background: #b7c7e0; }
.jb-bfb__tow span { white-space: nowrap; padding-inline: 11px; border-radius: 4px 12px 12px 4px; background: #ffc83d; color: #0a1428; font-size: 14px; font-weight: 900; }
@keyframes jb-bfb-tow {
  0% { transform: translate(110%,-50%); }
  55%, 100% { transform: translate(calc(-100cqw - 140%),-50%); }
}
.jb-bfb[data-variant="plane"] .jb-bfb__cta { position: relative; overflow: hidden; }
.jb-bfb[data-variant="plane"].is-live .jb-bfb__cta::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 35%;
  pointer-events: none; background: linear-gradient(90deg,transparent,#ffffff90,transparent);
  animation: jb-bfb-cta-shine 3.6s ease-in-out infinite;
}
@keyframes jb-bfb-cta-shine {
  0%, 60% { transform: translateX(165%) skewX(-20deg); }
  85%, 100% { transform: translateX(-450%) skewX(-20deg); }
}
.jb-bfb:is(.is-paused,:focus-within,:hover) :is(.jb-bfb__roll > span,.jb-bfb__ticker-track,.jb-bfb__tow),
.jb-bfb:is(.is-paused,:focus-within,:hover) .jb-bfb__cta::after { animation-play-state: paused; }
@container (min-width: 901px) {
  .jb-bfb:not([data-variant="countdown"]) :is(.jb-bfb__stamp,.jb-bfb__tag) { display: none; }
  .jb-bfb:not([data-variant="countdown"]) .jb-bfb__tiles { display: inline-flex; flex: none; gap: 2px; direction: ltr; }
  .jb-bfb__tiles b { display: inline-grid; place-items: center; min-inline-size: 15px; block-size: 22px; border-radius: 4px; background: linear-gradient(#1f3260 49%,#132245 50%); color: #ffc83d; font-size: 14px; }
  .jb-bfb__tiles i { inline-size: 4px; }
}
.jb.jb-ui.jb-ui .jb-bfb.is-live .jb-bfb__u--s { display: inline-flex; }
@container (max-width: 760px) {
  .jb-bfb[data-variant="plane"].is-live .jb-bfb__date { display: none; }
}
@container (max-width: 680px) {
  .jb.jb-ui.jb-ui .jb-bfb__cd { gap: 5px; }
  .jb.jb-ui.jb-ui .jb-bfb__u { flex-direction: column; gap: 0; min-inline-size: 31px; }
  .jb.jb-ui.jb-ui .jb-bfb__u--m { display: inline-flex; }
  .jb.jb-ui.jb-ui .jb-bfb__dg b { width: 14px; height: 21px; font-size: 14px; }
  .jb.jb-ui.jb-ui .jb-bfb__u small { font-size: 11px; line-height: 1.4; }
}
@container (max-width: 600px) {
  .jb-bfb__roll, .jb-bfb__ticker-group { font-size: 13px; }
  .jb.jb-ui.jb-ui .jb-bfb__cd { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .jb-bfb[data-variant="plane"] .jb-bfb__flight { display: none !important; }
  .jb-bfb.is-live .jb-bfb__roll > span:not(:first-child) { opacity: 0; }
}

