/* Silo — "Top movers" carousel above the Markets card on Discover.
   Compact grey squircle chips on the page itself — no panel behind them —
   matching the toolbar chip language. Logo, name, price, change, one line.
   Markup is built by js/silo-carousel.js. */

.sc-block {
  --sc-page: #f4f4f2;
  --sc-chip: #ededec;
  --sc-chip-hover: #e4e4e1;
  --sc-text: #17181a;
  --sc-sub: #7c848c;
  --sc-label: #55606e;
  --sc-info: #b0b6bd;
  position: relative;
  z-index: 5;
  margin-top: 4px;
}

/* ===== section label, above and to the left ===== */
.sc-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 10px 2px;
}
.sc-head-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.014em;
  color: #17181a;
}
.sc-info {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sc-info);
  cursor: help;
  border-radius: 999px;
  transition: color 0.15s ease;
}
.sc-info:hover,
.sc-info:focus-visible { color: #55606e; }
.sc-info:focus-visible {
  outline: 2px solid #ff80ab;
  outline-offset: 1px;
}
.sc-info svg { width: 14px; height: 14px; }

.sc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===== tooltip ===== */
.sc-tip {
  position: absolute;
  z-index: 40;
  top: calc(100% - 5px);
  left: 0;
  width: 254px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #24262b;
  color: #e7e8ea;
  font-size: 11.5px;
  font-weight: 450;
  line-height: 1.5;
  box-shadow: 0 10px 28px -8px rgba(15, 23, 42, 0.4);
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.25, 1, 0.4, 1);
}
.sc-tip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 22px;
  border: 5px solid transparent;
  border-bottom-color: #24262b;
}
.sc-tip b { color: #fff; font-weight: 600; }
.sc-info:hover + .sc-tip,
.sc-info:focus-visible + .sc-tip {
  opacity: 1;
  transform: none;
}

/* ===== the strip: no panel, chips sit straight on the page ===== */
.sc-body {
  position: relative;
  user-select: none;
}
/* chips dissolve into the page at both ends instead of cutting off */
.sc-body::before,
.sc-body::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: -2px;
  bottom: -2px;
  width: 40px;
  pointer-events: none;
}
.sc-body::before {
  left: -1px;
  background: linear-gradient(to right, var(--sc-page) 20%, rgba(244, 244, 242, 0));
}
.sc-body::after {
  right: -1px;
  background: linear-gradient(to left, var(--sc-page) 20%, rgba(244, 244, 242, 0));
}

.sc-view {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}
.sc-view.is-drag { cursor: grabbing; }
.sc-track {
  display: flex;
  align-items: center;
  gap: 8px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}
.sc-view.is-drag .sc-item { pointer-events: none; }

/* ===== one pool: grey squircle chip ===== */
.sc-item {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  width: auto;
  max-width: 340px;
  height: 44px;
  padding: 0 11px;
  border: 0;
  border-radius: 12px;
  corner-shape: squircle;
  background: var(--sc-chip);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease;
}
.sc-item:hover,
.sc-item:focus-within { background: var(--sc-chip-hover); }

/* the open-market arrow: its slot is always reserved, so revealing it never
   changes the chip's width */
.sc-open {
  flex: none;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: -2px;
  color: #8b9299;
  opacity: 0;
  transition: opacity 0.16s ease, color 0.15s ease;
}
.sc-item:hover .sc-open,
.sc-item:focus-within .sc-open { opacity: 1; }
.sc-open:hover { color: #17181a; }
.sc-open:focus-visible {
  opacity: 1;
  outline: 2px solid #ff80ab;
  outline-offset: 3px;
  border-radius: 3px;
}
.sc-open svg { width: 15px; height: 15px; }

/* logo, with the monogram showing through if the image never loads */
.sc-logo {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
}
.sc-coin {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--cbg);
  color: var(--cfg);
}
.sc-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  background: var(--sc-chip);
}

.sc-name {
  flex: 0 1 auto;
  min-width: 34px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.012em;
  color: var(--sc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-name i {
  font-style: normal;
  color: #b9bcbf;
  margin: 0 1px;
}

.sc-price {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sc-sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-d {
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sc-d.up { color: #1a7f57; }
.sc-d.down { color: #c0453f; }
.sc-d.flat { color: #8a929b; }

/* ===== small screens ===== */
@media (max-width: 767px) {
  .sc-head { padding: 0 16px 8px; }
  .sc-track { padding: 0 14px; }
  .sc-body::before,
  .sc-body::after { width: 20px; }
  /* 280px left the pair name to be ellipsed on a phone ("FRONG/E…"); the
     card takes the width it needs to say what it is */
  .sc-item { max-width: min(86vw, 320px); }
}

@media (prefers-reduced-motion: reduce) {
  .sc-tip { transition: opacity 0.16s ease; }
}

/* ===== dark theme (html[data-silo-theme="dark"], see css/silo-theme.css) ===== */
html[data-silo-theme="dark"] .sc-block {
  --sc-text: #f2f3f5;
  --sc-sub: #9aa1ab;
  --sc-label: #e8eaed;
  --sc-info: #70767f;
}
html[data-silo-theme="dark"] .sc-tip {
  background: #2a2d31;
  color: #e8eaed;
}
html[data-silo-theme="dark"] .sc-tip::before { border-bottom-color: #2a2d31; }
html[data-silo-theme="dark"] .sc-tip b { color: #fff; }
