/* Wallet styling — hand-rolled, self-contained (no external fonts/CDNs). */

:root {
  --bg: #0f1220;
  --panel: #1a1f36;
  --panel-2: #232a49;
  --ink: #e7e9f2;
  --muted: #9aa3c4;
  --accent: #6c8cff;
  --ok: #46d19e;
  --err: #ff6b6b;
  --warn: #ffcf6b;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 50% -10%, #20264a, var(--bg));
  color: var(--ink);
  min-height: 100vh;
  padding: 20px;
}

header h1 {
  margin: 0 0 4px;
  font-size: 22px;
}
.sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wcard {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid #2c3560;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.wcard-head {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid #2c3560;
}
.wcard-body {
  padding: 14px;
  display: flex;
  gap: 14px;
}
.wcard.mdoc .wcard-head {
  color: #cdd6ff;
}

.silhouette {
  flex: 0 0 64px;
  height: 80px;
  border-radius: 8px;
  background: #2c3560;
  position: relative;
}
.silhouette::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #4a5590;
  transform: translateX(-50%);
}
.silhouette::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 44px;
  height: 26px;
  border-radius: 22px 22px 0 0;
  background: #4a5590;
  transform: translateX(-50%);
}

dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  font-size: 13px;
  align-content: start;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 20px;
  text-align: center;
  border: 1px dashed #2c3560;
  border-radius: var(--radius);
}

#status {
  margin: 16px 0;
  font-size: 13px;
  color: var(--muted);
}
#status.ok {
  color: var(--ok);
}
#status.err {
  color: var(--err);
}

.controls {
  margin-top: 8px;
}

button {
  font-family: var(--font);
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 9px 16px;
  cursor: pointer;
}
button.primary {
  background: var(--accent);
  color: #0b1020;
  font-weight: 600;
}
button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: #3a4472;
}
button.danger {
  background: transparent;
  color: var(--err);
  border-color: #5a2a34;
}

/* Approval dialog */
.approve {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 18, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}
.approve.hidden {
  display: none;
}
.approve-panel {
  background: var(--panel);
  border: 1px solid #2c3560;
  border-radius: var(--radius);
  padding: 20px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  /* Never push Approve/Deny off-screen: cap to the viewport and scroll. */
  max-height: 85vh;
  overflow-y: auto;
}
.approve-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.requester {
  margin: 4px 0;
  font-size: 13px;
}
.requester .lbl {
  color: var(--muted);
  margin-right: 6px;
}
.approve-details {
  margin: 12px 0;
  padding: 12px;
  background: var(--panel-2);
  border-radius: 10px;
}
.banner {
  margin: 8px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 8px;
  background: rgba(255, 207, 107, 0.12);
  border: 1px solid rgba(255, 207, 107, 0.4);
  color: var(--warn);
}
.approve-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

footer {
  margin-top: 28px;
}
.footnote {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  border-top: 1px solid #2c3560;
  padding-top: 12px;
}

/* Plain-English disclosure sections in the approval dialog: what is shared
   in the clear (amber) vs what is only proven in zero knowledge (green). */
.approve-section {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.approve-section h3 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.approve-section ul {
  margin: 0;
  padding-left: 18px;
}
.approve-section li {
  margin: 3px 0;
}
.approve-section.plain {
  background: rgba(255, 207, 107, 0.1);
  border: 1px solid rgba(255, 207, 107, 0.35);
}
.approve-section.plain h3 {
  color: var(--warn);
}
.approve-section.zk {
  background: rgba(94, 220, 160, 0.08);
  border: 1px solid rgba(94, 220, 160, 0.3);
}
.approve-section.zk h3 {
  color: #5edca0;
}

/* Prepare progress bar (time-based estimate during the ~45s per-user prepare). */
.progress {
  height: 8px;
  margin: 10px 0 4px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress.hidden {
  display: none;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #9db4ff);
  transition: width 0.45s ease;
}
