/* ═══════════════════════════════════════════════════════════════
   history.css  —  TBTC Transaction History Styles
═══════════════════════════════════════════════════════════════ */

/* ── Page wrapper ── */
.history-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 8px;
}

.history-back-btn {
  background: rgba(255,255,255,0.07);
  border: none;
  color: #a0c4ff;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.history-back-btn:hover { background: rgba(255,255,255,0.13); }

.history-title {
  font-size: 18px;
  font-weight: 700;
  color: #e0f0ff;
  margin: 0;
}

/* ── List ── */
.tx-list {
  padding: 8px 12px 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Single row ── */
.tx-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 13px 14px;
  transition: background 0.18s;
}
.tx-row:hover { background: rgba(255,255,255,0.09); }

/* ── Direction icon ── */
.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}
.tx-icon.tx-sent     { background: rgba(255, 80, 80, 0.18); color: #ff6b6b; }
.tx-icon.tx-received { background: rgba(0, 220, 130, 0.18); color: #00dc82; }

/* ── Meta (left column) ── */
.tx-meta {
  flex: 1;
  min-width: 0;
}
.tx-direction {
  font-size: 14px;
  font-weight: 600;
  color: #e0f0ff;
  margin-bottom: 2px;
}
.tx-direction .tx-coin {
  font-weight: 700;
  color: #7ecfff;
}
.tx-peer {
  font-size: 12px;
  color: #8099bb;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-addr {
  color: #a0c4ff;
  font-family: monospace;
}
.tx-time {
  font-size: 11px;
  color: #607090;
  margin-bottom: 3px;
}
.tx-id {
  font-size: 10px;
  color: #506080;
}
.tx-hash {
  font-family: monospace;
  color: #7090b0;
  cursor: pointer;
  text-decoration: underline dotted;
}
.tx-hash:hover { color: #a0c4ff; }

/* ── Amount (right column) ── */
.tx-amount-col {
  text-align: right;
  flex-shrink: 0;
}
.tx-amount {
  font-size: 16px;
  font-weight: 700;
}
.tx-amount.tx-sent     { color: #ff6b6b; }
.tx-amount.tx-received { color: #00dc82; }

.tx-coin-label {
  font-size: 11px;
  color: #607090;
}
.tx-fee {
  font-size: 10px;
  color: #506070;
  margin-top: 2px;
}
.tx-status {
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 20px;
  display: inline-block;
}
.tx-status.success { background: rgba(0,220,130,0.15); color: #00dc82; }
.tx-status.pending { background: rgba(255,200,0,0.15);  color: #ffc800; }
.tx-status.failed  { background: rgba(255,80,80,0.15);  color: #ff6b6b; }

/* ── Empty / Loading states ── */
.history-empty {
  text-align: center;
  padding: 60px 20px;
  color: #506070;
  font-size: 14px;
}
.history-empty-icon { font-size: 40px; margin-bottom: 12px; }
.history-empty-sub  { font-size: 12px; margin-top: 6px; color: #3a5060; }

.history-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #506070;
  font-size: 14px;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #00dc82;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
#tbtc-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a2a3a;
  color: #00dc82;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 20px;
  border: 1px solid rgba(0,220,130,0.3);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 9999;
}
#tbtc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Recent Activity on home (reuses same .tx-row) ── */
.no-tx-msg {
  text-align: center;
  color: #506070;
  font-size: 13px;
  padding: 20px;
}
