/* ============================================================
   VegasBet — Crypto Deposit (Phase 4.6.5)
   Dark + purple palette only (NO blue). No inline styles.
   Selectors namespaced under .crypto-deposit / .cd-*.
   ============================================================ */

.crypto-deposit {
  margin-top: 8px;
}

/* ── Coming-soon panel (mock mode) ──────────────────────────── */
.cd-coming-soon {
  background: linear-gradient(180deg, #1c1c22, #161619);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  max-width: 520px;
  margin: 24px auto;
}

.cd-coming-soon-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-dim);
  border: 1px solid var(--border);
}

.cd-coming-soon-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  fill: none;
}

.cd-coming-soon-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cd-coming-soon-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ── Layout grid ────────────────────────────────────────────── */
.cd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.cd-col {
  min-width: 0;
}

/* ── Selector panel (left column card) ──────────────────────── */
.cd-panel {
  background: linear-gradient(180deg, #1c1c22, #161619);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 20px;
  padding: 26px;
}

/* ── Steps + labels ─────────────────────────────────────────── */
.cd-step {
  margin-bottom: 22px;
}

.cd-step--last,
.cd-step:last-child {
  margin-bottom: 0;
}

.cd-step-label {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

/* ── Coin buttons (step 1) ──────────────────────────────────── */
.cd-coin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cd-coin-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: #111114;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
  text-align: left;
  min-width: 0;
}

.cd-coin-btn:hover {
  border-color: rgba(168, 85, 247, 0.45);
  transform: translateY(-2px);
}

.cd-coin-btn.active {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(124, 58, 237, 0.14);
}

.cd-coin-badge {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  background: var(--purple);
}

/* Real coin logo overlays the fallback letter; if it 404s the letter shows. */
.cd-coin-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Brand tints for recognisability (kept muted; UI chrome stays purple). */
.cd-coin-badge--btc  { background: #f7931a; color: #2a1602; }
.cd-coin-badge--eth  { background: #6f7390; }
.cd-coin-badge--bnb  { background: #f0b90b; color: #2a2102; }
.cd-coin-badge--trx  { background: #ef4444; }
.cd-coin-badge--sol  { background: #a855f7; }
.cd-coin-badge--ton  { background: #8884aa; color: #1a1830; }
.cd-coin-badge--xrp  { background: #8884aa; color: #1a1830; }
.cd-coin-badge--usdt { background: #10b981; color: #06281d; }
.cd-coin-badge--usdc { background: #8884aa; color: #1a1830; }

.cd-coin-texts {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cd-coin-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cd-coin-symbol {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

/* ── Network buttons (step 2) ───────────────────────────────── */
.cd-network-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cd-network-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 18px;
  background: #111114;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.22s ease, background 0.22s ease;
  text-align: left;
}

.cd-network-btn:hover {
  border-color: rgba(168, 85, 247, 0.45);
}

.cd-network-btn.active {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(124, 58, 237, 0.10);
  box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.06);
}

.cd-network-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.cd-network-symbol {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--purple-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

/* ── Status text (network list) ─────────────────────────────── */
.cd-loading,
.cd-empty,
.cd-error {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 12px 0;
}

.cd-error {
  color: var(--red);
}

/* ── Address card ───────────────────────────────────────────── */
.cd-address-card {
  background: linear-gradient(180deg, #1c1c22, #161619);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 20px;
  overflow: hidden;
}

.cd-address-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.cd-address-card-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.cd-selected-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

.cd-address-card-body {
  padding: 20px 18px;
}

/* ── QR ─────────────────────────────────────────────────────── */
.cd-qr {
  width: 200px;
  height: 200px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 18px;
  background: #ffffff;            /* white quiet zone — required for scannability */
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-qr svg {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;    /* keep the QR modules crisp when scaled */
}

.cd-qr-fallback {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Pay label + address row ────────────────────────────────── */
.cd-pay-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 12px;
}

.cd-address-row,
.cd-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #111114;
  border: 1px solid rgba(124, 58, 237, 0.20);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

/* An author `display` beats the UA `[hidden]{display:none}` rule by cascade
   origin, so this row stayed on screen for every coin as an EMPTY
   "Destination Tag (required)" plaque even though the JS set hidden=true.
   (Same footgun as .sport-empty in matches.css and .pay-modal-overlay in
   agent-payouts.css — check for it whenever a toggled element has a display
   rule.) */
.cd-tag-row[hidden] { display: none; }

.cd-address-text,
.cd-tag-value {
  flex: 1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  color: var(--text-primary);
  word-break: break-all;
  min-width: 0;
}

.cd-tag-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.cd-tag-warn {
  font-size: 12px;
  line-height: 1.5;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 0 12px;
}

.cd-copy-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cd-copy-btn:hover {
  background: rgba(124, 58, 237, 0.25);
  border-color: var(--accent);
}

.cd-copy-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent);
  fill: none;
}

/* ── Info text + rows ───────────────────────────────────────── */
.cd-info-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 14px 0;
}

.cd-info-rows {
  display: flex;
  flex-direction: column;
}

.cd-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--border-subtle);
}

.cd-info-row-label {
  font-size: 12px;
  color: var(--text-muted);
}

.cd-info-row-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.cd-address-msg {
  margin-top: 14px;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.cd-address-msg--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
}

/* ── History ────────────────────────────────────────────────── */
.cd-history {
  margin-top: 32px;
}

.cd-history-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
}

.cd-history-loading,
.cd-history-error,
.cd-history-empty {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 14px 0;
}

.cd-history-error {
  color: var(--red);
}

.cd-history-table-wrap {
  overflow-x: auto;
  background: linear-gradient(180deg, #1c1c22, #161619);
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 18px;
}

.cd-history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.cd-history-table th,
.cd-history-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.cd-history-table th {
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 11px;
}

.cd-history-table td {
  color: var(--text-primary);
}

.cd-history-table tbody tr:last-child td {
  border-bottom: none;
}

.cd-num {
  font-family: 'Courier New', Courier, monospace;
}

/* ── Status badges ──────────────────────────────────────────── */
.cd-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.cd-status--credited {
  color: var(--green);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.cd-status--confirmed {
  color: var(--accent);
  background: var(--purple-dim);
  border-color: var(--border);
}

.cd-status--seen {
  color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.cd-status--awaiting_rate {
  color: var(--orange);
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.3);
}

.cd-status--orphaned {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ── Test-mode block (dev only) ─────────────────────────────── */
.cd-testmode {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.cd-testmode-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .cd-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .cd-coin-list {
    grid-template-columns: 1fr;
  }
}
