/* Shared by the captured-wallet patch and the local frontend preview. */
.wallet-invoice-button-stack > .wallet-invoice-action {
  --hover-sweep-color: var(--agy-board-ink, #111) !important;
  --hover-sweep-bg: transparent !important;
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 16px;
  grid-template-rows: auto auto;
  align-items: center !important;
  justify-content: stretch !important;
  column-gap: 16px !important;
  row-gap: 12px !important;
  min-height: 88px !important;
  padding: clamp(20px, 2.2vw, 28px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--agy-board-card, #fff) !important;
  background-image: none !important;
  color: var(--agy-board-ink, #111) !important;
  box-shadow: var(--agy-board-card-shadow, 0 26px 70px #11182712, 0 3px 12px #11182709) !important;
  font-family: inherit !important;
  font-size: 22px !important;
  font-weight: 520 !important;
  line-height: 1.06 !important;
  text-align: left;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
  transform: none !important;
  transition: none !important;
}

.wallet-invoice-action::before {
  display: none !important;
}

.wallet-invoice-action > span:first-child {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  color: var(--agy-board-ink, #111) !important;
}

.wallet-invoice-action > span:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
  color: #697473 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.6;
  white-space: normal !important;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.wallet-invoice-action::after {
  content: "";
  grid-column: 2;
  grid-row: 1 / 3;
  justify-self: end;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid #628477;
  border-right: 1.5px solid #628477;
  transform: rotate(45deg);
  transition: transform 160ms ease-out;
}

@media (hover: hover) {
  .wallet-invoice-button-stack > .wallet-invoice-action:hover {
    background: var(--agy-board-card, #fff) !important;
  }
  .wallet-invoice-action:hover::after {
    transform: translateX(3px) rotate(45deg);
  }
}

.wallet-invoice-button-stack > .wallet-invoice-action:focus-visible {
  outline: 2px solid #167569;
  outline-offset: 4px;
}

/* Join the existing theme layer so its important rules keep the text hierarchy. */
@layer console-night {
  html[data-console-theme="dark"] .wallet-invoice-button-stack > .wallet-invoice-action {
    --hover-sweep-color: var(--night-heading, #e6e6e6) !important;
    background: var(--night-card, #242424) !important;
    color: var(--night-heading, #e6e6e6) !important;
  }

  html[data-console-theme="dark"] .wallet-invoice-action > span:first-child {
    color: var(--night-heading, #e6e6e6) !important;
  }

  html[data-console-theme="dark"] .wallet-invoice-action > span:nth-child(2) {
    color: var(--night-muted, #a0a0a0) !important;
  }

  html[data-console-theme="dark"] .wallet-invoice-action::after {
    border-color: var(--night-green, #76b9a2);
  }

  html[data-console-theme="dark"] .wallet-invoice-button-stack > .wallet-invoice-action:is(:hover, :active) {
    background: var(--night-card, #242424) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-invoice-action::after { transition: none; }
}
