/* Bitcoin OP_RETURN explorer — table layout (filters/pager: explorer-ordinals.css) */

.opx-type-desc {
  margin: -0.35rem 0 1rem;
  color: var(--ltc-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.opx-runes-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.65rem;
  font-size: 0.82rem;
}

.opx-runes-links a {
  color: var(--ltc-blue-bright, #4a7fd4);
  text-decoration: none;
}

.opx-runes-links a:hover {
  text-decoration: underline;
}

.rnx-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}

.opx-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--bg-panel-solid);
}

.opx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.opx-table th,
.opx-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.opx-table th {
  color: var(--ltc-muted);
  font-weight: 600;
  white-space: nowrap;
}

.opx-table tr:last-child td {
  border-bottom: none;
}

/* Body cells only: the class is on the <th> too, and a monospace header would
   not match the other column titles. */
.opx-table td.opx-col-payload,
.opx-payload {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.45;
  word-break: break-all;
}

.opx-payload {
  display: inline;
  max-width: 28rem;
  white-space: pre-wrap;
  color: var(--text);
}

.opx-type-badge {
  display: inline-block;
  padding: 0.18rem 0.42rem;
  border-radius: 0.22rem;
  background: rgba(21, 128, 61, 0.92);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

/* Colour by protocol family so a long list stays scannable. */
.opx-type-badge[data-group='assets'] { background: rgba(21, 128, 61, 0.92); }
.opx-type-badge[data-group='bridge'] { background: rgba(126, 34, 206, 0.92); }
.opx-type-badge[data-group='sidechain'] { background: rgba(29, 78, 216, 0.92); }
.opx-type-badge[data-group='timestamp'] { background: rgba(180, 83, 9, 0.92); }
.opx-type-badge[data-group='message'] { background: rgba(13, 148, 136, 0.92); }
.opx-type-badge[data-group='consensus'] { background: rgba(71, 85, 105, 0.92); }
.opx-type-badge[data-group='wallet'] { background: rgba(67, 56, 202, 0.92); }
.opx-type-badge[data-group='content'] { background: rgba(8, 145, 178, 0.92); }
.opx-type-badge[data-group='other'] { background: rgba(100, 116, 139, 0.92); }

/* Type filters: label column on the left, chips on the right.
   Overrides the flex layout .ordx-types brings in, which would otherwise let
   two groups share a line. */
#opx-type-filters.ordx-types {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.65rem 1rem;
  align-items: start;
}

.opx-type-all {
  grid-column: 1 / -1;
}

.opx-type-group {
  padding-top: 0.15rem;
  color: var(--ltc-muted);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opx-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

@media (max-width: 720px) {
  #opx-type-filters.ordx-types {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .opx-type-group {
    padding-top: 0.5rem;
  }
}

.opx-guess {
  margin-left: 0.35rem;
  padding: 0.05rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 0.22rem;
  color: var(--ltc-muted);
  font-family: inherit;
  font-size: 0.62rem;
  text-transform: uppercase;
}

.opx-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.4rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 0.22rem;
  background: transparent;
  color: var(--ltc-muted);
  font-size: 0.66rem;
  cursor: pointer;
}

.opx-more:hover {
  color: var(--text);
}

.opx-more i {
  transition: transform 0.15s ease;
}

.opx-more.is-open i {
  transform: rotate(180deg);
}

.opx-detail-row > td {
  background: var(--bg-panel);
}

.opx-detail-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.opx-fields {
  display: grid;
  grid-template-columns: minmax(6rem, max-content) 1fr;
  gap: 0.2rem 0.75rem;
  margin: 0;
}

.opx-fields dt {
  color: var(--ltc-muted);
  font-weight: 600;
}

.opx-fields dd {
  margin: 0;
  word-break: break-all;
}

.opx-field-val,
.opx-json,
.opx-raw code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.opx-json {
  margin: 0;
  max-height: 18rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.opx-raw {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.opx-raw-label {
  color: var(--ltc-muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opx-raw code {
  display: block;
  max-height: 12rem;
  overflow: auto;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: var(--bg-panel-solid);
  font-size: 0.72rem;
  word-break: break-all;
}

#opx-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  max-width: none;
}

#opx-lead .opx-lead-meta,
#opx-lead .opx-lead-sep {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ltc-muted);
}

#opx-lead a.opx-lead-meta {
  color: var(--ltc-muted);
  text-decoration: none;
}

#opx-lead a.opx-lead-meta:hover {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 720px) {
  .opx-table .opx-col-time {
    display: none;
  }
}

/* Tx / block detail pages — our own bitcoind via local2, replaces mempool.space. */
.opx-tx-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.opx-tx-summary {
  grid-template-columns: minmax(9rem, max-content) 1fr;
}

.opx-block-nav-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.opx-block-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text);
  font-size: 0.82rem;
  text-decoration: none;
}

.opx-block-nav:hover {
  text-decoration: underline;
}

.opx-io-list {
  display: flex;
  flex-direction: column;
}

.opx-io-list > *:last-child {
  border-bottom: none;
}

.opx-io-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.opx-io-idx {
  flex: none;
  min-width: 1.4rem;
  padding-top: 0.02rem;
  color: var(--ltc-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.opx-io-list--tx .opx-io-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 140px;
  align-items: center;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.8rem;
}

.opx-io-list-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 0.35rem;
  color: var(--ltc-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opx-io-list-header--tx {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 140px;
  gap: 1rem;
}

.opx-io-list-header--tx span:last-child {
  text-align: right;
}

.opx-io-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.opx-io-hint {
  margin: 0.6rem 0 0;
  text-align: left;
  font-size: 0.76rem;
}

.opx-io-main {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-all;
}

.opx-io-main a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.opx-io-value {
  flex: none;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.opx-io-note {
  margin-top: 0.2rem;
  color: var(--ltc-muted);
  font-size: 0.76rem;
}

.opx-io-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.opx-io-detail {
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Landed here from an outpoint (txid:vout) search. */
.opx-io-row--hl {
  animation: opx-hl-fade 2s ease-out;
}

@keyframes opx-hl-fade {
  from { background: color-mix(in srgb, var(--ltc-blue-bright, #4a7fd4) 22%, transparent); }
  to { background: transparent; }
}

/* Every hash/address on the tx & block pages must render in the site's
   monospace stack, not the browser default (which sizes much larger than the
   surrounding text at the same font-size and made the page look inconsistent). */
#opx-lead code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  word-break: break-all;
}

.opx-tx-panels {
  font-size: 0.86rem;
  line-height: 1.5;
}

.opx-tx-panels code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.94em;
  word-break: break-all;
}
