/* ==========================================================================
   FUNDER — TA125 market ticker — quiet header footer
   --------------------------------------------------------------------------
   Sits under secondary nav (Ta125MarqueePlaceHolder in Site1.Master container).
   Visual shell only. Data / marquee / refresh unchanged.
   Requires fn/01-tokens.css. Scoped under .fn-ui .fn-ticker.
   ========================================================================== */

.fn-ui .fn-ticker {
  box-sizing: border-box;
  display: block;
  width: 100%;
  float: none;
  clear: both;
  margin: 6px 0 0;
  padding: 0;
  /* Nearly merges with page canvas — not a heavy bar */
  background-color: transparent;
  border: 0;
  color: var(--fn-text-1);
}

.fn-ui .fn-ticker__row {
  display: flex;
  align-items: center;
  gap: 0;
  height: 29px;
  margin: 0;
  padding: 0;
  /* The indices plate under this row is the divider now. */
  border-bottom: 0;
  background-color: transparent;
}

.fn-ui .fn-ticker__track {
  flex: 1 1 auto;
  min-width: 0;
  height: 29px;
  overflow: hidden;
}

.fn-ui .fn-ticker .marquee {
  width: 100%;
  height: 29px;
  overflow: hidden;
  direction: ltr;
}

.fn-ui .fn-ticker .marquee .js-marquee a,
.fn-ui .fn-ticker .marquee a.fn-ticker__item,
.fn-ui .fn-ticker .marquee a.ticker-stock-item {
  float: right;
  width: auto;
  direction: rtl;
}

.fn-ui .fn-ticker .fn-ticker__item,
.fn-ui .fn-ticker a.ticker-stock-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  height: 29px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-regular);
  line-height: 29px;
  color: var(--fn-neutral);
  text-decoration: none;
  background: transparent;
  box-shadow: none;
  transition: color var(--fn-dur-fast) var(--fn-ease);
}

/* Soft middot separators — not table cells */
.fn-ui .fn-ticker .fn-ticker__item::after,
.fn-ui .fn-ticker a.ticker-stock-item::after {
  content: "·";
  /* The item already carries 12px of padding on each side, so the dot sat
     24px from the item before it and 12px from the one after — a rhythm
     that looks like a mistake once you see it. The dot owns no margin; the
     padding is the whole gutter. */
  margin-inline-start: 0;
  color: var(--fn-border-strong);
  opacity: 0.55;
  font-weight: var(--fn-fw-regular);
  pointer-events: none;
}

.fn-ui .fn-ticker .fn-ticker__item:hover,
.fn-ui .fn-ticker .fn-ticker__item:focus,
.fn-ui .fn-ticker a.ticker-stock-item:hover,
.fn-ui .fn-ticker a.ticker-stock-item:focus {
  color: var(--fn-text-1);
  text-decoration: none;
  background: transparent;
  box-shadow: none;
}

/* The name takes the interaction ink and the rule under it takes the
   approved green — same gesture as a headline, a tab or a rail chip. The
   CHANGE keeps its market colour: up and down are data, not interaction,
   and tinting them on hover would say the number had changed. */
.fn-ui .fn-ticker .fn-ticker__item:hover .fn-ticker__name,
.fn-ui .fn-ticker .fn-ticker__item:focus .fn-ticker__name,
.fn-ui .fn-ticker a.ticker-stock-item:hover .ticker-stock-name,
.fn-ui .fn-ticker a.ticker-stock-item:focus .ticker-stock-name {
  color: var(--fn-interactive-ink);
  text-decoration: underline;
  text-decoration-color: var(--fn-interactive);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.fn-ui .fn-ticker .fn-ticker__name,
.fn-ui .fn-ticker .ticker-stock-name {
  color: inherit;
  font-weight: var(--fn-fw-regular);
}

.fn-ui .fn-ticker .fn-ticker__cng,
.fn-ui .fn-ticker .ticker-stock-change {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--fn-font-num);
  font-size: var(--fn-fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--fn-track-tight);
  color: var(--fn-text-3);
}

.fn-ui .fn-ticker .fn-ticker__cng--up,
.fn-ui .fn-ticker .ticker-stock-change.fn-ticker__cng--up {
  color: var(--fn-market-up);
}

.fn-ui .fn-ticker .fn-ticker__cng--down,
.fn-ui .fn-ticker .ticker-stock-change.fn-ticker__cng--down {
  color: var(--fn-market-down);
}

.fn-ui .fn-ticker a.ticker-stock-item.text-primary,
.fn-ui .fn-ticker a.ticker-stock-item.text-primary:hover {
  color: var(--fn-neutral);
}

.fn-ui .fn-ticker .ticker-stock-change.text-success {
  color: var(--fn-market-up);
}

.fn-ui .fn-ticker .ticker-stock-change.text-danger {
  color: var(--fn-market-down);
}

@media (prefers-reduced-motion: reduce) {
  .fn-ui .fn-ticker .fn-ticker__item,
  .fn-ui .fn-ticker a.ticker-stock-item {
    transition: none;
  }
}


/* --------------------------------------------------------------------------
   Phone
   --------------------------------------------------------------------------
   The ticker already ran here; it had simply never been sized for a phone,
   so it inherited the desktop row wholesale. Three changes, appearance only
   — the marquee, the data source and the refresh are untouched:

     1. The row loses 3px and the item loses 4px of side padding, which puts
        roughly one more stock on screen at 390px.
     2. The NAME gets weight 500. At 12px, a regular-weight Hebrew name and
        a semibold tabular figure sitting 6px apart read as one run of text;
        the extra step is what separates "טבע" from "+1.24%" without a rule
        or a chip between them.
     3. The row is centred on its own line box rather than baseline-aligned.
        Baseline is right when two runs share a size; here the name is 12px
        regular and the figure 12px semibold tabular, whose baselines sit a
        fraction apart, and on a 26px row that fraction is visible.
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .fn-ui .fn-ticker {
    margin-top: 4px;
  }

  .fn-ui .fn-ticker__row,
  .fn-ui .fn-ticker__track,
  .fn-ui .fn-ticker .marquee {
    height: 26px;
  }

  .fn-ui .fn-ticker .fn-ticker__item,
  .fn-ui .fn-ticker a.ticker-stock-item {
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 8px;
    line-height: 26px;
  }

  .fn-ui .fn-ticker .fn-ticker__name,
  .fn-ui .fn-ticker .ticker-stock-name {
    font-weight: var(--fn-fw-emphasis);
    color: var(--fn-text-1);
  }

  .fn-ui .fn-ticker .fn-ticker__cng,
  .fn-ui .fn-ticker .ticker-stock-change {
    font-size: var(--fn-fs-sm);
  }

  /* A touch device has no hover, so the only thing that marks a stock as a
     link is the press. */
  .fn-ui .fn-ticker .fn-ticker__item:active,
  .fn-ui .fn-ticker a.ticker-stock-item:active {
    color: var(--fn-interactive-ink);
  }

  /* Phone: native overflow so a fling has momentum. Auto-crawl is a rAF
     on scrollLeft (index.js), not a second marquee plugin. */
  .fn-ui .fn-ticker__track {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .fn-ui .fn-ticker__track::-webkit-scrollbar {
    height: 0;
    display: none;
  }

  .fn-ui .fn-ticker .marquee {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    min-width: 100%;
    max-width: none;
    overflow: visible;
    direction: rtl;
  }

  .fn-ui .fn-ticker .marquee .fn-ticker__item,
  .fn-ui .fn-ticker .marquee a.ticker-stock-item {
    float: none;
  }
}
