/* Aktuari search and asset pages: the finder, result rows, the asset record, similar assets, the live call.
   Tokens: base.css. */

/* The finder: a ruled entry line, like a ledger heading, not a pill. */
.finder {
  margin: 1.6rem 0 0;
  max-width: var(--measure);
}
.finder label {
  display: block;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  margin-bottom: 0.2rem;
}
.finder-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  border-bottom: 2px solid var(--ink);
}
.finder input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  font-size: 1.35rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.35rem 0;
  appearance: none;
  -webkit-appearance: none;
}
.finder input::placeholder {
  color: var(--ink-3);
  font-style: italic;
}
.finder input::-webkit-search-cancel-button,
.finder input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.finder input:focus-visible {
  outline: none;
}
.finder-row:focus-within {
  border-bottom-color: var(--active);
}
.finder button {
  flex: 0 0 auto;
  font: inherit;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  padding: 0 0 0 0.9rem;
  cursor: pointer;
}
.finder button:hover {
  color: var(--active);
}

.search-status {
  margin: 1rem 0 0.4rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  min-height: 1.6em;
}

/* Result and similar-asset rows: symbol, name, then the facts that tell same-symbol assets apart. */
.results,
.peers {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.results li,
.peers li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "link status" "meta status";
  column-gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}
.results a,
.peers a {
  grid-area: link;
  min-width: 0;
  overflow-wrap: anywhere;
}
.results .meta,
.peers .meta {
  grid-area: meta;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.results .status,
.peers .status {
  grid-area: status;
  align-self: center;
  font-size: 0.88rem;
  white-space: nowrap;
}
.sym {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.name {
  color: var(--ink-2);
}
h1 .name {
  display: block;
  font-size: 0.45em;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  margin-top: 0.35em;
}
h1 .sym {
  overflow-wrap: anywhere;
}

/* Status: a square mark in the semantic colour, the word beside it. */
.status .dot {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.4em;
  vertical-align: 0.05em;
  background: var(--ink-3);
}
.status-active .dot {
  background: var(--active);
}
.status-inactive .dot {
  background: var(--inactive);
}

.facts {
  max-width: var(--measure);
  font-variant-numeric: tabular-nums lining-nums;
}
.odds .dim {
  display: block;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  font-size: 0.85em;
  line-height: 1.2;
}

@media (max-width: 520px) {
  /* The odds table becomes one block per group: label, then each figure under its own heading. */
  .odds thead {
    display: none;
  }
  .odds tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.2rem 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .odds th[scope="row"] {
    grid-column: 1 / -1;
  }
  .odds th,
  .odds td {
    border: 0;
    padding: 0;
    text-align: left;
    white-space: normal;
  }
  .odds td::before {
    content: attr(data-label);
    display: block;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.05em;
    color: var(--ink-2);
    font-size: 0.85em;
  }
  .odds small {
    display: block;
    margin-left: 0;
  }
  .results li,
  .peers li {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "link" "meta" "status";
  }
  .results .status,
  .peers .status {
    justify-self: start;
  }
}

/* The live call: a plain button and the reply as set type. */
.proof-run {
  font: inherit;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--ink);
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.proof-run:hover {
  border-color: var(--active);
}
.proof-run:disabled {
  color: var(--ink-3);
  cursor: progress;
}
.proof-status {
  margin: 0.6rem 0 0;
  min-height: 1.6em;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.proof-out {
  margin: 0.4rem 0 0;
  padding: 0.9rem 1rem;
  max-width: 100%;
  overflow-x: auto;
  background: var(--paper-2);
  border-left: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
}
