/* Interactive info table examples. See javascripts/info-explorer.js. */

.info-explorer--ready {
  --ix-accent: var(--md-typeset-a-color);
  --ix-rule: var(--aihc-rule);
  --ix-muted: var(--aihc-muted);
  --ix-surface: var(--aihc-surface);
  --ix-soft: var(--aihc-accent-soft);
  --ix-fresh: #e9b949;

  margin: 1.5em 0;
  padding: 1rem;
  border: 1px solid var(--ix-rule);
  border-radius: 0.5rem;
  background: var(--md-default-bg-color);
  font-size: 0.72rem;
}

[data-md-color-scheme="slate"] .info-explorer--ready {
  --ix-fresh: #c99a2e;
}

.info-explorer--ready .ix-controls {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--ix-rule);
}

.info-explorer--ready .ix-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.info-explorer--ready .ix-args,
.info-explorer--ready .ix-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.info-explorer--ready .ix-step {
  flex: 1 1 16rem;
}

.info-explorer--ready .ix-label,
.info-explorer--ready .ix-heading {
  color: var(--ix-muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.info-explorer--ready .ix-label {
  min-width: 5.5rem;
}

.info-explorer--ready .ix-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.info-explorer--ready .ix-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.2rem 0.15rem 0.5rem;
  border: 1px solid var(--ix-rule);
  border-radius: 999px;
  background: var(--ix-surface);
}

.info-explorer--ready .ix-chip-name {
  font-family: var(--aihc-mono);
  font-weight: 600;
}

.info-explorer--ready .ix-select {
  padding: 0.15rem 0.3rem;
  border: 1px solid var(--ix-rule);
  border-radius: 0.3rem;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  font-family: var(--aihc-mono);
  font-size: 0.68rem;
}

.info-explorer--ready .ix-buttons {
  display: inline-flex;
  gap: 0.25rem;
}

.info-explorer--ready .ix-button,
.info-explorer--ready .ix-segment {
  min-width: 1.8rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--ix-rule);
  border-radius: 0.3rem;
  background: var(--ix-surface);
  color: var(--md-default-fg-color);
  font: inherit;
  cursor: pointer;
}

.info-explorer--ready .ix-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.info-explorer--ready .ix-button:focus-visible,
.info-explorer--ready .ix-segment:focus-visible,
.info-explorer--ready .ix-select:focus-visible,
.info-explorer--ready .ix-slider:focus-visible {
  outline: 2px solid var(--ix-accent);
  outline-offset: 1px;
}

.info-explorer--ready .ix-segments {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.info-explorer--ready .ix-segment[aria-pressed="true"] {
  border-color: var(--ix-accent);
  background: var(--ix-soft);
  color: var(--ix-accent);
  font-weight: 600;
}

.info-explorer--ready .ix-slider {
  flex: 1 1 8rem;
  max-width: 16rem;
  accent-color: var(--ix-accent);
}

.info-explorer--ready .ix-readout {
  min-width: 3.5rem;
  font-family: var(--aihc-mono);
  font-variant-numeric: tabular-nums;
}

.info-explorer--ready .ix-target {
  color: var(--ix-muted);
}

.info-explorer--ready .ix-output {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.9rem;
}

.info-explorer--ready .ix-source {
  margin: 0;
}

.info-explorer--ready .ix-source code {
  padding: 0.6rem 0.8rem;
}

.info-explorer--ready .ix-object {
  display: grid;
  gap: 0.4rem;
}

.info-explorer--ready .ix-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.info-explorer--ready .ix-cell {
  display: grid;
  gap: 0.1rem;
  min-width: 4.5rem;
  padding: 0.35rem 0.55rem;
  border: 1px dashed var(--ix-rule);
  border-radius: 0.3rem;
  background: var(--ix-surface);
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.info-explorer--ready .ix-cell--header {
  border: 1px solid var(--ix-accent);
  background: var(--ix-soft);
}

.info-explorer--ready .ix-cell--tagged {
  border-style: double;
  border-width: 3px;
}

.info-explorer--ready .ix-cell--pointer {
  border-style: solid;
  border-color: var(--ix-accent);
}

.info-explorer--ready .ix-cell--count {
  border-style: dotted;
}

.info-explorer--ready .ix-cell--fresh {
  box-shadow: inset 0 -3px 0 var(--ix-fresh);
}

.info-explorer--ready .ix-cell--dead {
  opacity: 0.4;
  text-decoration: line-through;
}

.info-explorer--ready .ix-cell-index {
  color: var(--ix-muted);
  font-size: 0.58rem;
}

.info-explorer--ready .ix-cell-label {
  font-family: var(--aihc-mono);
  font-weight: 600;
}

.info-explorer--ready .ix-cell-detail {
  color: var(--ix-muted);
  font-family: var(--aihc-mono);
  font-size: 0.6rem;
}

.info-explorer--ready .ix-empty {
  padding: 0.5rem 0.7rem;
  border: 1px dashed var(--ix-rule);
  border-radius: 0.3rem;
  color: var(--ix-muted);
}

.info-explorer--ready .ix-note {
  margin: 0;
  max-width: 44rem;
}

.info-explorer--ready .ix-chain {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding-bottom: 0.4rem;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.info-explorer--ready .ix-link {
  flex: none;
  align-self: center;
  color: var(--ix-muted);
  font-family: var(--aihc-mono);
  font-size: 0.62rem;
  white-space: nowrap;
}

.info-explorer--ready .ix-link--none {
  width: 0.6rem;
}

.info-explorer--ready .ix-table {
  flex: none;
  width: 18rem;
  margin: 0;
  border: 1px solid var(--ix-rule);
  border-radius: 0.4rem;
  background: var(--ix-surface);
  opacity: 0.7;
  transition:
    opacity 0.2s,
    border-color 0.2s;
}

.info-explorer--ready .ix-table--current {
  border-color: var(--ix-accent);
  box-shadow: 0 0 0 1px var(--ix-accent);
  opacity: 1;
}

.info-explorer--ready .ix-table figcaption {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--ix-rule);
  font-size: 0.68rem;
  text-align: left;
}

.info-explorer--ready .ix-table-title {
  font-family: var(--aihc-mono);
  font-weight: 700;
}

.info-explorer--ready .ix-table-subtitle {
  color: var(--ix-muted);
}

.info-explorer--ready .ix-badge {
  margin-left: auto;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--ix-accent);
  color: var(--md-default-bg-color);
  font-size: 0.58rem;
  font-weight: 600;
}

.info-explorer--ready .ix-table table {
  display: table;
  width: 100%;
  margin: 0;
  border: none;
  border-collapse: collapse;
  font-size: 0.62rem;
  line-height: 1.4;
}

.info-explorer--ready .ix-table th,
.info-explorer--ready .ix-table td {
  padding: 0.18rem 0.45rem;
  border: none;
  border-top: 1px solid var(--ix-rule);
  text-align: left;
  vertical-align: top;
}

.info-explorer--ready .ix-table thead th {
  border-top: none;
  background: none;
  color: var(--ix-muted);
  font-size: 0.56rem;
  font-weight: 600;
  text-transform: uppercase;
}

.info-explorer--ready .ix-table .ix-offset {
  color: var(--ix-muted);
  font-family: var(--aihc-mono);
  text-align: right;
}

.info-explorer--ready .ix-field code {
  padding: 0;
  background: none;
  font-size: 0.6rem;
  word-break: normal;
}

.info-explorer--ready .ix-value {
  font-family: var(--aihc-mono);
  overflow-wrap: anywhere;
}

.info-explorer--ready .ix-value--changed {
  animation: ix-flash 0.8s ease-out;
}

@keyframes ix-flash {
  from {
    background: var(--ix-soft);
  }
  to {
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .info-explorer--ready .ix-chain {
    scroll-behavior: auto;
  }

  .info-explorer--ready .ix-value--changed {
    animation: none;
  }
}
