/* ============================================================
   The Market Terminal — ticker quick view (src/shared/ticker-card.js)

   One fixed card on --z-popover: above the watchlist, below ⌘K. Every
   block has a fixed height, so the skeleton and the filled card are the
   same size and nothing moves when the quote lands.
   ============================================================ */
.tmt-tcard {
  position: fixed;
  z-index: var(--z-popover);
  width: 320px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.tmt-tcard[data-side="above"] { transform: translateY(-3px); }
.tmt-tcard.is-in { opacity: 1; transform: none; }
.tmt-tcard.is-still { transition: none; }
.tmt-tcard[hidden], .tmt-tcard [hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .tmt-tcard { transition: none; transform: none; }
}

.tmt-tcard__sk { display: block; min-height: 10px; margin: 0; }

/* Symbol, name, session */
.tmt-tcard__hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  height: 18px;
  min-width: 0;
}
.tmt-tcard__sym {
  flex: none;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.tmt-tcard__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ink-2);
}
.tmt-tcard__tag {
  flex: none;
  padding: 0 5px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  font-size: 10px;
  color: var(--ink-3);
}
.tmt-tcard__sess {
  flex: none;
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.tmt-tcard__sess.is-stale { color: var(--warm); }

/* Price, change */
.tmt-tcard__px {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  min-width: 0;
}
.tmt-tcard__price { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.tmt-tcard__ccy { margin-left: -4px; font-size: 10.5px; color: var(--ink-3); align-self: flex-end; padding-bottom: 5px; }
.tmt-tcard__chg {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.tmt-tcard__none { color: var(--ink-3); }

/* The day's line and the 52-week range */
.tmt-tcard__cap {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  height: 14px;
  font-size: 10.5px;
  color: var(--ink-3);
}
.tmt-tcard__cap span:last-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tmt-tcard__spark { position: relative; height: 40px; margin-top: 2px; }
.tmt-tcard__nodata {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 11px;
  color: var(--ink-3);
}
.tmt-tcard__bar { height: 22px; margin-top: 4px; }
.tmt-tcard__bar .tmt-range.is-na { text-align: left; }

.tmt-tcard__asof {
  height: 15px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10.5px;
  color: var(--ink-3);
}

/* Actions */
.tmt-tcard__acts {
  display: flex;
  gap: 6px;
  height: 28px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 8px;
  box-sizing: content-box;
}
.tmt-tcard__act {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 28px;
  min-height: 0;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--t-color), var(--t-border);
}
.tmt-tcard__act:hover { border-color: var(--rule-strong); background: var(--paper-2); }
.tmt-tcard__act.is-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tmt-tcard__act.is-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.tmt-tcard__act:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.tmt-tcard__star {
  width: 12px;
  height: 12px;
  margin-right: 5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
}
.tmt-tcard__act[aria-pressed="true"] .tmt-tcard__star { fill: var(--warm); stroke: var(--warm); }

.tmt-tcard__kbd {
  height: 13px;
  margin-top: -2px;
  font-size: 10px;
  color: var(--ink-3);
}
