/* EQUIRA — papan saham live. Hanya memakai variabel dari tokens.css. */

.eqb {
  --eqb-cols: minmax(210px, 2.3fr) minmax(108px, 1fr) minmax(108px, 1fr) minmax(84px, .8fr) minmax(88px, .9fr) minmax(88px, .9fr) 76px;
  color: var(--ink);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}
.eqb button { font: inherit; color: inherit; }

/* ---------- kepala ---------- */
.eqb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eqb-title h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); font-weight: 400; letter-spacing: -.025em; line-height: 1.15; }
.eqb-title p { margin: 0; max-width: 620px; color: var(--mute); font-size: 14px; line-height: 1.6; }
.eqb-stamp { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--mute); font-size: 12.5px; white-space: nowrap; }
.eqb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); opacity: .9; }
.eqb-stamp.busy .eqb-dot { animation: eqb-pulse 1.2s ease-in-out infinite; }
.eqb-stamp.warn .eqb-dot { background: var(--warn); }
@keyframes eqb-pulse { 50% { opacity: .25; } }

/* ---------- alat: filter + cari ---------- */
.eqb-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.eqb-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.eqb-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line2); background: transparent;
  color: var(--ink2); font-size: 13px; cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.eqb-chip:hover { background: var(--field); color: var(--ink); }
.eqb-chip.on { background: var(--field-hover); border-color: var(--line); color: var(--ink); }
.eqb-n { color: var(--faint); font-size: 12px; }
.eqb-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; min-width: 260px;
  border-radius: var(--r-sm); background: var(--field); border: 1px solid var(--line2); transition: border-color .2s;
}
.eqb-search:focus-within { border-color: var(--line); }
.eqb-search svg { width: 16px; height: 16px; fill: none; stroke: var(--mute); stroke-width: 1.6; stroke-linecap: round; flex-shrink: 0; }
.eqb-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 400 13.5px var(--font); }
.eqb-search input::placeholder { color: var(--mute); }
.eqb-search input::-webkit-search-cancel-button { filter: invert(.7); }

/* ---------- tabel ---------- */
.eqb-table {
  border: 1px solid var(--line2); border-radius: var(--r-lg); background: var(--panel);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); overflow: hidden;
}
.eqb-row {
  display: grid; grid-template-columns: var(--eqb-cols); align-items: center; column-gap: 12px;
  min-height: 64px; padding: 0 20px; border-top: 1px solid var(--line2); transition: background .2s;
}
.eqb-body > .eqb-row:first-child { border-top: 0; }
.eqb-body > .eqb-row:hover, .eqb-thin > .eqb-row:hover { background: var(--field); }
.eqb-hrow { min-height: 44px; border-top: 0; border-bottom: 1px solid var(--line2); }
.eqb-hrow [role="columnheader"] button {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  color: var(--mute); font-size: 12px; letter-spacing: .02em; cursor: pointer; white-space: nowrap;
}
.eqb-hrow button:hover, .eqb-hrow button.on { color: var(--ink); }
.eqb-arrow { font-style: normal; font-size: 11px; width: 8px; }
.eqb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.c-num { text-align: right; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; }
.eqb-hrow .c-num { flex-direction: row; justify-content: flex-end; }
.c-act { display: flex; justify-content: flex-end; }

/* sel aset */
.c-asset { display: flex; align-items: center; gap: 12px; min-width: 0; }
.eqb-logo {
  position: relative; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: var(--panel-solid); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
}
.eqb-logo[data-tint="0"] { background: color-mix(in srgb, var(--teal) 12%, var(--panel-solid)); }
.eqb-logo[data-tint="1"] { background: color-mix(in srgb, var(--violet) 14%, var(--panel-solid)); }
.eqb-logo[data-tint="2"] { background: color-mix(in srgb, var(--rose) 11%, var(--panel-solid)); }
.eqb-mono { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink2); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.eqb-mono.sm { font-size: 9px; letter-spacing: 0; }
.eqb-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.eqb-logo.has-img img { opacity: 1; }
.eqb-logo.has-img .eqb-mono { visibility: hidden; }
.eqb-id { display: flex; flex-direction: column; min-width: 0; }
.eqb-id b { font-weight: 500; font-size: 14.5px; letter-spacing: .01em; }
.eqb-id small { color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eqb-tag {
  flex-shrink: 0; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line);
  color: var(--tag); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
}

/* angka */
.c-num .v { font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.c-num .s { font-size: 11.5px; color: var(--mute); white-space: nowrap; min-height: 1em; }
.c-num .s.up { color: var(--up); }
.c-num .s.down { color: var(--down); }
.c-num .s.live::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--up); vertical-align: 1px; }
.c-vol .v, .c-liq .v { color: var(--ink2); }
.c-liq .v.thin { color: var(--warn); }
.eqb-m-prem { display: none; }
.eqb-m-prem.pos { color: var(--warn); }
.eqb-m-prem.neg { color: var(--tag); }
.eqb-prem { font-size: 13.5px; color: var(--ink2); padding: 3px 8px; border-radius: 8px; border: 1px solid transparent; white-space: nowrap; }
.eqb-prem.hi { border-color: var(--line); background: var(--field); }
.eqb-prem.pos { color: var(--warn); }
.eqb-prem.neg { color: var(--tag); }
.eqb-prem.thinp { color: var(--faint); text-decoration: underline dotted var(--line); text-underline-offset: 3px; cursor: help; }

.eqb-buy {
  height: 34px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.eqb-buy:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.eqb-buy:focus-visible, .eqb-chip:focus-visible, .eqb-hrow button:focus-visible, .eqb-thin-toggle:focus-visible { outline: 1px solid var(--teal); outline-offset: 2px; }

/* baris sedang dimuat / tanpa kolam */
.eqb-thin .eqb-row { opacity: .55; }
.eqb-thin .eqb-row:hover { opacity: .85; }
.eqb-thin-toggle {
  display: block; width: 100%; padding: 15px 20px; border: 0; border-top: 1px solid var(--line2);
  background: none; color: var(--mute); font-size: 13px; text-align: center; cursor: pointer; transition: color .2s, background .2s;
}
.eqb-thin-toggle:hover { color: var(--ink); background: var(--field); }
.eqb-thin-toggle[hidden], .eqb-thin[hidden], .eqb-empty[hidden] { display: none; }
.eqb-thin > .eqb-row:first-child { border-top: 1px solid var(--line2); }
.eqb-empty { padding: 36px 20px; color: var(--mute); text-align: center; font-size: 14px; }
.eqb-more { display: flex; justify-content: center; margin-top: 18px; }
.eqb-more[hidden] { display: none; }
.eqb-more-btn {
  height: 42px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.eqb-more-btn:hover { background: var(--field-hover); border-color: var(--faint); }
.eqb-more-btn:focus-visible { outline: 1px solid var(--teal); outline-offset: 2px; }

/* kerangka berkilau untuk angka yang belum datang */
.eqb .sk {
  min-width: 62px; height: 13px; border-radius: 6px; border-color: transparent;
  color: transparent !important; text-decoration: none; overflow: hidden;
  background: linear-gradient(90deg, var(--field) 25%, var(--field-hover) 50%, var(--field) 75%) 0 0 / 200% 100%;
  animation: eqb-shimmer 1.4s linear infinite;
}
.eqb .eqb-prem.sk { min-width: 54px; padding: 0; }
.eqb .c-vol .sk, .eqb .c-liq .sk { min-width: 48px; }
.eqb-row:has(.c-dex .v.sk) .c-dex .s[data-k="chg"], .eqb-row .c-oracle .v.sk + .s { visibility: hidden; }
@keyframes eqb-shimmer { to { background-position: -200% 0; } }

.eqb-foot { margin: 14px 4px 0; color: var(--mute); font-size: 12px; line-height: 1.6; }
.eqb-foot a { color: var(--ink2); text-decoration: none; border-bottom: 1px solid var(--line); }
.eqb-foot a:hover { color: var(--ink); }

/* animasi masuk + kedip angka */
.eqb-row.enter { animation: eqb-in .7s var(--ease) both; }
@keyframes eqb-in { from { opacity: 0; transform: translateY(6px); } }
.flash { animation: eqb-flash 1.4s ease-out; }
.flash-up { animation: eqb-flash-up 1.4s ease-out; }
.flash-down { animation: eqb-flash-down 1.4s ease-out; }
@keyframes eqb-flash { from { color: var(--teal); } }
@keyframes eqb-flash-up { from { color: var(--up); } }
@keyframes eqb-flash-down { from { color: var(--down); } }
@media (prefers-reduced-motion: reduce) {
  .eqb-row.enter, .flash, .flash-up, .flash-down, .eqb-stamp.busy .eqb-dot, .eqb .sk { animation: none; }
}

/* ---------- layar sedang: buang kolom likuiditas ---------- */
@media (max-width: 1020px) {
  .eqb { --eqb-cols: minmax(180px, 2fr) minmax(100px, 1fr) minmax(100px, 1fr) minmax(80px, .8fr) minmax(80px, .9fr) 70px; }
  .c-liq { display: none; }
}
@media (max-width: 820px) {
  .eqb { --eqb-cols: minmax(150px, 2fr) minmax(96px, 1fr) minmax(96px, 1fr) minmax(76px, .8fr) 64px; }
  .c-vol { display: none; }
  .eqb-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .eqb-row { padding: 0 14px; }
}

/* ---------- HP (≤600): baris ringkas — tiker, harga, premium, Buy ---------- */
@media (max-width: 600px) {
  .eqb { --eqb-cols: minmax(0, 1fr) auto 58px; }
  .eqb-title h2 { font-size: 24px; }
  .eqb-title p { font-size: 13px; }
  .eqb-tools { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
  .eqb-filters { min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 0 2px; }
  .eqb-filters::-webkit-scrollbar { display: none; }
  .eqb-chip { height: 34px; padding: 0 13px; flex-shrink: 0; }
  .eqb-n { display: none; }
  .eqb-search { min-width: 0; }
  .eqb-table { border-radius: var(--r-md); }
  .eqb-row { column-gap: 10px; min-height: 66px; padding: 10px 12px; }
  .c-oracle, .c-vol, .c-liq { display: none; }
  /* sel harga DEX memuat premium di bawahnya */
  .c-prem { display: none; }
  .eqb-row .c-dex .s[data-k="chg"] { display: none; }
  .eqb-row .c-dex .eqb-m-prem { display: block; }
  .eqb-hrow { min-height: 38px; }
  .eqb-logo { width: 30px; height: 30px; }
  .eqb-id b { font-size: 14px; }
  .eqb-id small { font-size: 11.5px; }
  .eqb-tag { display: none; }
  .eqb-buy { height: 32px; padding: 0 12px; font-size: 12.5px; }
}
