/* Pearl Pay page-specific styles (on top of the dark iridescent theme). */

/* Live rate strip */
.rate-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  max-width: 46rem;
}
.rate-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
#rate-value { font-size: 1.4rem; font-weight: 800; }
#rate-value .gradient-text { -webkit-background-clip: text; background-clip: text; }

/* xpub validation feedback */
.xpub-status { margin-top: 0.5rem; font-size: 0.88rem; }
.xpub-status.ok { color: var(--accent-3); }
.xpub-status.bad { color: var(--bad); }

/* 3-column form grid */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.grid3 > * { min-width: 0; } /* let grid items shrink below intrinsic content width so long labels/inputs can't blow out the viewport */
.grid3 > label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.95rem; font-weight: 600; }

/* Snippet preview + code */
.preview-box { margin: 1rem 0; }
.preview-box:empty { display: none; }
.code-snippet {
  background: #04070c;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  overflow-x: auto;
  color: #c8d6ea;
  margin-top: 0.75rem;
  white-space: pre;
  line-height: 1.55;
}

/* Invoice creator output */
.invoice-out {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}
#invoice-qr {
  background: #fff;
  border-radius: 12px;
  padding: 0.6rem;
  width: 220px;
  height: 220px;
  box-shadow: 0 0 0 1px var(--card-border), 0 8px 28px rgba(111, 211, 255, 0.12);
}
.invoice-detail { flex: 1; min-width: min(260px, 100%); display: grid; gap: 0.7rem; }
.inv-addr-row { display: flex; gap: 0.5rem; align-items: center; }
.inv-addr-row code { flex: 1; word-break: break-all; font-size: 0.75rem; }

/* ---------- Invoice payment page ---------- */
.inv-wrap { max-width: 620px; margin: 3rem auto 4rem; }
.inv-card { text-align: center; padding: 2.5rem 2rem; }
.inv-card canvas {
  background: #fff;
  border-radius: 12px;
  padding: 0.7rem;
  width: min(300px, 80vw);
  height: auto;
  box-shadow: 0 0 0 1px var(--card-border), 0 12px 40px rgba(111, 211, 255, 0.15);
}
.inv-amount { font-size: 2.25rem; font-weight: 800; margin: 0.75rem 0 0.25rem; }
.inv-label { font-size: 1.15rem; font-weight: 700; }
.pill {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0.75rem 0;
  border: 1px solid var(--card-border);
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.pill.awaiting { border-color: rgba(252, 211, 77, 0.5); color: var(--warn); }
.pill.partial { border-color: rgba(252, 211, 77, 0.5); color: var(--warn); }
.pill.detected { border-color: rgba(111, 211, 255, 0.5); color: var(--accent); }
.pill.confirmed {
  border-color: rgba(125, 255, 212, 0.55);
  color: var(--accent-3);
  background: rgba(125, 255, 212, 0.08);
  box-shadow: 0 0 24px rgba(125, 255, 212, 0.15);
}
.pill.expired { border-color: rgba(252, 165, 165, 0.5); color: var(--bad); }
.inv-addr { display: flex; gap: 0.5rem; align-items: center; justify-content: center; margin: 1rem 0; flex-wrap: wrap; }
.inv-addr code { font-size: 0.75rem; word-break: break-all; max-width: 100%; }
.countdown { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.progress {
  height: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  overflow: hidden;
  margin: 1rem 0;
}
.progress > div {
  height: 100%;
  background: var(--gradient);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 999px;
}
.demo-banner {
  background: rgba(252, 211, 77, 0.07);
  border: 1px solid rgba(252, 211, 77, 0.4);
  color: var(--warn);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Small screens */
@media (max-width: 720px) {
  .grid3 { grid-template-columns: 1fr; }
  .invoice-out { padding: 1rem; }
  #invoice-qr { width: 180px; height: 180px; }
  .inv-card { padding: 1.75rem 1.25rem; }
  .inv-wrap { margin: 2rem auto 3rem; }
}
