/* What only the data course needs, on top of learn-python.cloud's stylesheets (kept unchanged):
   each column's type in result tables, Altair / Vega-Lite charts, and the Parquet line on the data page. */

/* Each column's type under its name: int64, String, VARCHAR… (scrolls away; only the names stick). */
.result-table thead tr.dtype-row th {
  position: static;
  padding-block: 2px 5px;
  color: var(--ink-3);
  font-size: 0.7rem;
  font-weight: 500;
}

/* ---------------------------------------------------------------- charts (Altair / Vega-Lite) */

.vega-charts {
  display: grid;
}

.vega-area {
  padding: 8px 14px 12px;
  background: var(--surface);
}

.vega-chart {
  max-width: 100%;
  overflow-x: auto;
}

/* vega-embed's own stylesheet is off (the CSP forbids injected styles): a wide chart scales down to fit. */
.vega-chart svg.marks {
  display: block;
  max-width: 100%;
  height: auto;
}

.vega-error {
  display: grid;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--warn);
}

.vega-error pre {
  max-height: 240px;
}

/* vega-tooltip, styled here instead of by the <style> element it would inject. */
#vg-tooltip-element {
  visibility: hidden;
  position: fixed;
  z-index: 1000;
  max-width: 320px;
  padding: 8px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  direction: ltr;
  pointer-events: none;
}

#vg-tooltip-element.visible {
  visibility: visible;
}

#vg-tooltip-element h2 {
  margin: 0 0 6px;
  font-size: 0.8rem;
}

#vg-tooltip-element table {
  border-spacing: 0;
}

#vg-tooltip-element td {
  padding: 1px 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#vg-tooltip-element td.key {
  padding-inline-end: 8px;
  color: var(--ink-3);
  text-align: start;
}

#vg-tooltip-element td.value {
  text-align: start;
}

.dataset-parquet {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

.dataset-parquet .schema-column-name {
  display: inline;
}
