/* Lietuvis explorer — fix overlapping text on tx / message pages */

/* Tx detail + dynamic message tables */
.table td,
.table th,
.table-compact td,
.table-compact th {
  vertical-align: top;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.table td:first-child,
.table-compact td:first-child {
  width: 1%;
  min-width: 7.5rem;
  max-width: 11rem;
  white-space: nowrap !important;
}

/* Long hashes, addresses, base64 */
.table td.overflow-hidden,
.table-compact .overflow-hidden {
  overflow: visible !important;
  word-break: break-all;
}

.table a,
.table-compact a,
.break-words {
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
  max-width: 100% !important;
}

/* Flex rows (addresses + badges) must wrap */
.table .flex,
.table-compact .flex,
.border .flex {
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  gap: 0.35rem;
  max-width: 100%;
}

/* Status badge — stop overlapping adjacent text */
.text-xs.truncate.relative {
  display: inline-flex !important;
  white-space: nowrap !important;
  flex-shrink: 0;
  max-width: 100%;
}

/* JSON panel — full raw output, no truncated DOM */
.json-raw-block {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 0.5rem;
  background: #1e1e2e;
  color: #cdd6f4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow-x: auto;
  max-width: 100%;
  max-height: none;
  border: 1px solid rgba(128, 128, 128, 0.25);
}

.json-raw-block code {
  font-family: inherit;
  white-space: inherit;
  word-break: inherit;
}

/* Nested message tables */
.table-compact td.w-4\/5,
.table-compact td[class*='w-'] {
  width: auto !important;
  max-width: 100%;
}

.table-compact td .overflow-hidden.w-auto,
.overflow-auto .overflow-hidden {
  overflow: visible !important;
  width: 100% !important;
  max-width: 100%;
}

/* Horizontal tabs for nested msg objects */
.tabs .tab {
  white-space: normal;
  word-break: break-word;
  max-width: 12rem;
}

/* Section cards */
.bg-base-100.px-4.pt-3 {
  overflow: visible;
}

.card-title.truncate {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

/* Mobile: stack table rows if still cramped */
@media (max-width: 640px) {
  .table-compact,
  .table-compact tbody,
  .table-compact tr,
  .table-compact td {
    display: block;
    width: 100% !important;
  }

  .table-compact tr {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    padding-bottom: 0.5rem;
  }

  .table-compact td:first-child {
    max-width: 100%;
    font-weight: 600;
    padding-bottom: 0.15rem;
  }
}