/* =============================================================================
   TX LOOKUP — Shared styles for TX lookup page and popup overlay
   All classes prefixed with txl- to avoid collisions.
   ============================================================================= */

/* ── Active nav link (shared pattern) ── */
.strip-nav-link.active {
  color: var(--zinc-200);
  border-color: var(--zinc-600);
  background: rgba(39,39,42,0.25);
}

/* ── Page layout ── */
.txl-main {
  padding: 16px 20px;
  max-width: 900px;
  margin: 0 auto;
}

/* ── Page toolbar (full page only) ── */
.txl-toolbar {
  background: rgba(18,18,20,0.95);
  border: 1px solid var(--zinc-800);
  border-radius: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 16px 16px;
  margin-bottom: 14px;
}

.txl-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.txl-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--zinc-700);
  border-radius: 6px;
  background: rgba(9,9,11,0.72);
  color: var(--zinc-100);
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  outline: none;
}

.txl-input:focus {
  border-color: var(--blue-400);
}

.txl-input::placeholder {
  color: var(--zinc-600);
}

.txl-btn {
  padding: 12px 16px;
  border: 1px solid rgba(96,165,250,0.35);
  border-radius: 6px;
  background: rgba(96,165,250,0.14);
  color: #dbeafe;
  font-family: 'Geist', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.txl-btn:hover {
  color: var(--blue-400);
  border-color: var(--blue-400);
}

.txl-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--zinc-600);
  line-height: 1.5;
}

.txl-hint code {
  color: var(--zinc-500);
  font-family: 'Geist Mono', monospace;
}

/* ── Floating TX Lookup trigger button ── */
.txl-trigger {
  position: fixed;
  top: 44px;
  left: 12px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(18,18,20,0.85);
  border: 1px solid var(--zinc-800);
  border-radius: 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--zinc-500);
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.txl-trigger:hover {
  color: var(--zinc-200);
  border-color: var(--zinc-600);
}

.txl-trigger .txl-trigger-key {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--zinc-600);
  background: rgba(39,39,42,0.4);
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid rgba(63,63,70,0.4);
}

/* ── Result container ── */
.txl-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Panel cards (frosted glass) ── */
.txl-panel {
  background: rgba(18,18,20,0.95);
  border: 1px solid var(--zinc-800);
  border-radius: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 20px;
}

/* ── Chain header ── */
.txl-chain-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.txl-chain-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.txl-chain-dot.eth  { background: #627eea; }
.txl-chain-dot.bsc  { background: #f3ba2f; }
.txl-chain-dot.tron { background: #eb0029; }
.txl-chain-dot.sol  { background: #9945ff; }
.txl-chain-dot.btc  { background: #f7931a; }

.txl-chain-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--zinc-300);
}

.txl-chain-label .dim {
  color: var(--zinc-500);
  font-weight: 500;
}

/* ── TX hash link ── */
.txl-hash-link {
  display: block;
  font-size: 12px;
  color: var(--zinc-500);
  font-family: 'Geist Mono', monospace;
  word-break: break-all;
  line-height: 1.5;
  margin-bottom: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s;
}

.txl-hash-link:hover {
  color: var(--blue-400);
}

.txl-hash-link .arrow {
  color: var(--zinc-600);
  margin-left: 6px;
}

/* ── Fact grid ── */
.txl-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.txl-fact-cell {
  padding: 10px 12px;
  background: rgba(9,9,11,0.5);
  border: 1px solid var(--zinc-800);
  border-radius: 4px;
}

.txl-fact-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zinc-600);
  margin-bottom: 3px;
}

.txl-fact-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--zinc-200);
}

.txl-fact-val.green {
  color: var(--green-400);
}

/* ── Address rows ── */
.txl-addr-section {
  margin-top: 4px;
}

.txl-addr-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(39,39,42,0.5);
}

.txl-addr-row:last-child {
  border-bottom: none;
}

.txl-addr-dir {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 38px;
  padding-top: 2px;
  flex-shrink: 0;
}

.txl-addr-dir.from { color: #f87171; }
.txl-addr-dir.to   { color: #4ade80; }

.txl-addr-body {
  flex: 1;
  min-width: 0;
}

.txl-addr-link {
  font-size: 12px;
  color: var(--zinc-400);
  text-decoration: none;
  font-family: 'Geist Mono', monospace;
  word-break: break-all;
}

.txl-addr-link:hover {
  color: var(--blue-400);
}

.txl-addr-link .arrow {
  color: var(--zinc-600);
  margin-left: 4px;
  font-size: 10px;
}

.txl-addr-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  margin-top: 4px;
  letter-spacing: 0.04em;
  border-radius: 2px;
}

.txl-addr-tag.alert { background: rgba(239,68,68,0.15); color: #fca5a5; }
.txl-addr-tag.infra { background: rgba(96,165,250,0.12); color: #93c5fd; }
.txl-addr-tag.known { background: rgba(251,191,36,0.12); color: #fcd34d; }

.txl-addr-meta {
  font-size: 11px;
  color: var(--zinc-600);
  margin-top: 3px;
}

/* ── Divider ── */
.txl-divider {
  border: none;
  border-top: 1px solid var(--zinc-800);
  margin: 14px 0;
}

/* ── THORChain section ── */
.txl-thor-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.txl-thor-status.done    { color: var(--green-400); }
.txl-thor-status.pending { color: var(--amber-500); }
.txl-thor-status.failed  { color: #f87171; }

/* ── Swap route ── */
.txl-swap-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.txl-swap-route .in {
  color: var(--zinc-200);
  font-weight: 600;
}

.txl-swap-route .arrow {
  color: var(--zinc-600);
}

.txl-swap-route .out {
  color: var(--green-400);
  font-weight: 600;
}

.txl-swap-route .out.pending {
  color: var(--zinc-600);
  font-style: italic;
}

.txl-swap-route .usd {
  color: var(--zinc-500);
  font-size: 12px;
  font-weight: 400;
}

/* ── Swap destination ── */
.txl-swap-dest {
  font-size: 12px;
  color: var(--zinc-500);
  margin-bottom: 12px;
}

.txl-swap-dest a {
  color: var(--zinc-400);
  text-decoration: none;
}

.txl-swap-dest a:hover {
  color: var(--blue-400);
}

/* ── Progress bar ── */
.txl-progress-wrap {
  margin: 14px 0;
}

.txl-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  color: var(--zinc-500);
  margin-bottom: 6px;
}

.txl-progress-header .pct {
  font-weight: 700;
  color: var(--zinc-300);
}

.txl-progress-track {
  height: 4px;
  background: var(--zinc-800);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.txl-progress-fill {
  height: 100%;
  border-radius: 2px;
  position: absolute;
  left: 0;
  top: 0;
  transition: width 0.8s ease;
  background: linear-gradient(90deg, #ef4444, #f97316, #eab308, #22c55e);
  background-size: 200% 100%;
}

.txl-progress-track.done .txl-progress-fill {
  background: var(--green-400);
}

/* ── ETA ── */
.txl-swap-eta {
  font-size: 11px;
  color: var(--zinc-500);
  margin-top: 8px;
}

.txl-swap-eta strong {
  color: var(--zinc-300);
}

/* ── Tags ── */
.txl-swap-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.txl-swap-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px;
}

.txl-swap-tag.aff    { background: rgba(239,68,68,0.15); color: #fca5a5; }
.txl-swap-tag.slip   { background: rgba(113,113,122,0.15); color: var(--zinc-400); }
.txl-swap-tag.stream { background: rgba(96,165,250,0.12); color: #93c5fd; }

/* ── Explorer links ── */
.txl-explorer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.txl-explorer-links a {
  font-size: 11px;
  color: var(--zinc-500);
  text-decoration: none;
  transition: color 0.15s;
}

.txl-explorer-links a:hover {
  color: var(--blue-400);
}

.txl-explorer-links a .arrow {
  margin-left: 2px;
}

/* ── Graph cross-reference ── */
.txl-graph-ref {
  font-size: 11px;
  color: var(--zinc-600);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.txl-graph-ref a {
  color: var(--blue-400);
  text-decoration: none;
  transition: color 0.15s;
}

.txl-graph-ref a:hover {
  color: var(--zinc-200);
}

.txl-graph-ref .icon {
  font-size: 12px;
  color: var(--zinc-600);
}

/* ── Loading / error states ── */
.txl-state-card {
  background: rgba(18,18,20,0.95);
  border: 1px solid var(--zinc-800);
  border-radius: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 20px;
  font-size: 13px;
  color: var(--zinc-400);
}

.txl-state-card.loading::after {
  content: '';
  animation: txl-dots 1.5s infinite;
}

.txl-state-card.error {
  border-color: rgba(248,113,113,0.25);
  color: #fca5a5;
}

/* ── Popup overlay ── */
.txl-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(9,9,11,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  transition: opacity 0.15s ease;
}

.txl-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Popup box ── */
.txl-popup-box {
  width: 640px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(24,24,27,0.95);
  border: 1px solid var(--zinc-700);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  scrollbar-width: thin;
  scrollbar-color: var(--zinc-700) transparent;
}

.txl-popup-box::-webkit-scrollbar { width: 4px; }
.txl-popup-box::-webkit-scrollbar-track { background: transparent; }
.txl-popup-box::-webkit-scrollbar-thumb { background: var(--zinc-700); border-radius: 2px; }

/* ── Popup header ── */
.txl-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--zinc-800);
}

.txl-popup-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zinc-400);
}

.txl-popup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.txl-popup-close {
  background: none;
  border: none;
  color: var(--zinc-500);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}

.txl-popup-close:hover {
  color: var(--zinc-200);
  background: rgba(39,39,42,0.4);
}

.txl-open-tab-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: var(--zinc-500);
  background: none;
  border: 1px solid var(--zinc-700);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.txl-open-tab-btn:hover {
  color: var(--zinc-200);
  border-color: var(--zinc-500);
}

.txl-open-tab-btn svg {
  flex-shrink: 0;
}

/* ── Popup input ── */
.txl-popup-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--zinc-800);
}

.txl-popup-search-icon {
  flex-shrink: 0;
  color: var(--zinc-600);
}

.txl-popup-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--zinc-700);
  border-radius: 6px;
  background: rgba(9,9,11,0.72);
  color: var(--zinc-100);
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  outline: none;
}

.txl-popup-input:focus {
  border-color: var(--blue-400);
}

.txl-popup-input::placeholder {
  color: var(--zinc-600);
}

/* ── Popup keyboard hint ── */
.txl-kbd-hint {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--zinc-300);
  background: rgba(39,39,42,0.4);
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid rgba(63,63,70,0.4);
}

/* ── Refresh indicator ── */
.txl-refresh-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--zinc-900);
  display: none;
  z-index: 100;
}

.txl-refresh-strip.active {
  display: block;
}

.txl-refresh-strip .bar {
  height: 100%;
  background: var(--amber-500);
  animation: txl-countdown 10s linear forwards;
}

.txl-refresh-label {
  position: fixed;
  bottom: 6px;
  right: 16px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zinc-600);
  display: none;
  z-index: 100;
}

.txl-refresh-label.active {
  display: block;
}

/* ── Copy button ── */
.txl-copy {
  display: inline-block;
  cursor: pointer;
  color: var(--zinc-600);
  font-size: 12px;
  margin-left: 6px;
  padding: 1px 3px;
  border-radius: 2px;
  vertical-align: middle;
  transition: color 0.15s;
  user-select: none;
}

.txl-copy:hover {
  color: var(--zinc-300);
}

/* ── Animations ── */
@keyframes txl-dots {
  0%  { content: '.'; }
  33% { content: '..'; }
  66% { content: '...'; }
}

@keyframes txl-countdown {
  from { width: 100%; }
  to   { width: 0%; }
}
