/* Agent ID official Binance Agentic Wallet QR panel */

.wallet-dialog {
  width: min(100% - 2rem, 22rem);
}

.wallet-dialog .dialog-header {
  justify-content: flex-end;
  border-bottom: 0;
  background: transparent;
  padding: .45rem .55rem 0;
}

.wallet-dialog .wallet-view {
  padding: .2rem 1.1rem 1.2rem;
}

.wallet-dialog .wallet-entry,
.wallet-dialog .wallet-start-button:not(.visually-hidden),
.wallet-dialog .wallet-stages {
  display: none;
}

.agent-id-qr {
  display: grid;
  justify-items: center;
  gap: .75rem;
  padding: 0;
}

.agent-id-qr-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(18.5rem, calc(100vw - 5rem));
  aspect-ratio: 1;
  padding: .85rem;
  border: 1px solid #8a7452;
  border-radius: 1.05rem;
  background: #fff;
}

.agent-id-qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: .4rem;
  background: #fff;
  image-rendering: pixelated;
}

/* Empty src would show a broken-image icon and alt text; hide until the official QR is ready. */
.agent-id-qr-frame.is-loading img,
.agent-id-qr-frame img:not([src]),
.agent-id-qr-frame img[hidden] {
  display: none;
}

.agent-id-qr-frame.is-loading {
  background:
    linear-gradient(#101c1acc, #101c1acc),
    conic-gradient(#1a241c 25%, #0f1b19 0 50%, #1a241c 0 75%, #0f1b19 0) 0 0 / 1rem 1rem;
}

.agent-id-qr-frame.is-expired img {
  filter: blur(2px) grayscale(1);
  opacity: .4;
}

.agent-id-qr-frame.is-loading::after {
  content: "";
  position: absolute;
  inset: .85rem;
  border-radius: .4rem;
  background: linear-gradient(90deg, #14222000, #e6bf8333, #14222000) 0 0 / 200% 100%;
  animation: agent-id-qr-shimmer 1.4s linear infinite;
}

.agent-id-qr-retry {
  position: absolute;
  inset: auto 50% 50% auto;
  translate: 50% 50%;
  min-height: 2.4rem;
  padding: .45rem .8rem;
  border: 1px solid #806846;
  border-radius: .55rem;
  color: var(--gold-ink);
  background: var(--gold);
  font-size: .8rem;
  font-weight: 750;
  white-space: nowrap;
}

.agent-id-qr-retry:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.agent-id-qr-retry:disabled,
.agent-id-qr-retry:disabled:hover {
  opacity: .7;
  cursor: default;
  pointer-events: none;
  background: var(--gold);
  border-color: #806846;
}

.agent-id-qr-pairing {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.agent-id-qr-pairing span {
  display: none;
}

.agent-id-qr-pairing strong {
  color: var(--gold-soft);
  font: 750 1.2rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .18em;
}

.agent-id-qr-open {
  color: var(--gold-soft);
  font-size: .8125rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.agent-id-qr-open:hover { color: var(--gold); }

.agent-id-qr-status {
  margin: 0;
  color: var(--muted);
  font-size: .8125rem;
  text-align: center;
}

.agent-id-qr-status.is-warn {
  color: var(--gold-soft);
  font-weight: 700;
}

@keyframes agent-id-qr-shimmer {
  to { background-position: 200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .agent-id-qr-frame.is-loading::after { animation: none; }
}
