/* data.css -- the "this is a data catalog" layer:
   kind markers + pills on cards and dataset headers (snippets/sp_dataset_badges.html)
   and the hosted dataset's data panel (package/snippets/sp_data_panel.html).
   Topic-directory mockup C: .kind / .tbl / .cols / .code. */

/* ---- Kind marker: filled teal dot = Spark project, hollow ring = external ---- */
.sp-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
/* .sp-kind (dot / ring) lives in directory.css. */

/* Pills (Atlas StatePill shape): only for restricted access and pending files. */
.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 1px 7px;
  border: 1px solid var(--sp-line);
  border-radius: 999px;
  font: 600 10px/1.4 var(--sp-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--sp-sec);
  background: var(--sp-bg);
}
.sp-badge-lock { color: var(--sp-ink); border-color: var(--sp-field); background: var(--sp-bg-soft); }
.sp-lock { flex-shrink: 0; }
.sp-badge-pending { color: var(--sp-faint); border-style: dashed; border-color: var(--sp-field); }

.sp-dcard .sp-badges { gap: 4px 8px; margin: 0 0 8px; }
.sp-detail-wrap .sp-badges { margin: 0 0 16px; }

/* ---- Data panel (hosted dataset) ---- */
.sp-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 22px 0; }
.sp-detail-wrap .sp-data-note { margin: 0 0 22px; font-size: 15px; color: var(--sp-ink2); max-width: 62ch; }

.sp-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 14px;
  padding: 10px 14px;
  font-size: 14px;
  background: #fff7e0;
  border: 1px solid #e6cf85;
  border-radius: 5px;
}
.sp-notice b { font: 600 12px/1.6 var(--sp-mono); letter-spacing: 0.05em; color: #6b5000; white-space: nowrap; }

/* The table scrolls inside its own frame; the page never does. The `local`
   gradients cover the `scroll` shadows until there is more to scroll to, so a
   cut-off last column always shows an edge shadow. */
.sp-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--sp-rule);
  border-radius: 5px;
  background:
    linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left / 40px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.14), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.14), transparent) right / 14px 100% no-repeat scroll,
    #fff;
}
.sp-table-wrap:focus-visible { outline: 2px solid var(--sp-accent); outline-offset: 2px; }
.sp-table { width: 100%; border-collapse: collapse; font: 13.5px/1.4 var(--sp-mono); color: var(--sp-ink); }
.sp-table th,
.sp-table td { padding: 9px 12px; border-bottom: 1px solid var(--sp-rule2); text-align: left; white-space: nowrap; }
.sp-table th { background: #f2efe8; font-weight: 600; color: var(--sp-ink); vertical-align: bottom; }
.sp-table th span { display: block; font-weight: 400; font-size: 11px; color: var(--sp-ink2); }
.sp-table tbody tr:last-child td { border-bottom: 0; }
.sp-table tbody tr:hover { background: rgba(242, 239, 232, 0.6); }
.sp-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }

.sp-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp-cols li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--sp-rule2);
  font: 14px var(--sp-mono);
}
.sp-cols code { padding: 0; background: none; color: var(--sp-ink); font: inherit; overflow-wrap: anywhere; }
.sp-cols span { color: var(--sp-ink2); font-size: 12.5px; }

/* Dark code card with a pandas / curl toggle (mockup .code). */
.sp-code { background: #16191c; color: #e9e6df; border-radius: 6px; overflow: hidden; }
.sp-code-bar { display: flex; align-items: center; border-bottom: 1px solid #353a40; }
.sp-code-bar[hidden] { display: none; }
.sp-code-bar button {
  background: none;
  border: 0;
  color: #b8bcc2;                           /* 9.6:1 on #16191c */
  font: 500 13px var(--sp-mono);
  padding: 11px 16px;
  cursor: pointer;
}
.sp-code-bar button:hover { color: #fff; }
.sp-code-bar [aria-pressed="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--sp-accent); }
.sp-code-bar .sp-copy { margin-left: auto; color: #fff; }
.sp-code-bar .sp-copy[hidden] { display: none; }
.sp-code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: none;
  border: 0;
  border-radius: 0;
  color: inherit;
  font: 13.5px/1.6 var(--sp-mono);
  white-space: pre;
}
.sp-code pre[hidden] { display: none; }
.sp-code pre + pre { border-top: 1px solid #353a40; }  /* no-JS: both snippets stacked */
.sp-code pre code { padding: 0; background: none; color: inherit; font: inherit; white-space: inherit; }
.sp-code .sp-c { color: #9aa3ad; }                      /* 6.9:1 on #16191c */
.sp-code pre:focus-visible,
.sp-code button:focus-visible { outline: 2px solid var(--sp-accent); outline-offset: -2px; }
