/* noko: parts every layout shares, using whichever colour variables the
   layout has: the QR card and the keyboard shortcuts dialog.

   The QR card: the node account's QR code at the bottom right, after
   X's "Scan to get the app" card (measured from it: 178 × 204 px, 24 px
   padding, 16 px corners, #141414 on a 1 px #373737 border, a grey caption,
   1.08× from the corner on hover). Shared by every layout; the light
   palette files set the --qr-card-* colours. Wide screens only. */
.qr-card {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  box-sizing: border-box;
  width: 178px;
  padding: 20px 24px 24px;
  text-align: center;
  color: var(--qr-card-ink, #ffffff);
  background: var(--qr-card-bg, #141414);
  border: 1px solid var(--qr-card-line, #373737);
  border-radius: 16px;
  transform-origin: bottom right;
  /* app.js sets --qr-lift (up to 110 px) as the page's bottom scrolls into
     view, so the card rides up clear of the text there and back down with
     the scroll; the short ease only smooths each step. */
  translate: 0 calc(-1 * var(--qr-lift, 0px));
  transition:
    transform 0.2s ease,
    translate 0.12s ease-out;
}

.qr-card:hover {
  transform: scale(1.08);
}

.qr-card__caption {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--qr-card-caption, #9b9b9b);
}

.qr-card .qr-code {
  display: block;
  width: 130px;
  height: 130px;
}

@media (max-width: 999px), print {
  .qr-card {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qr-card {
    transition: none;
  }
}

/* The keyboard shortcuts dialog ("?"), after explorer.banano.trade's: the
   action on the left, its keys on the right. app.js builds it. */
.shortcuts {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line, var(--panel-line));
  border-radius: var(--radius, 14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.shortcuts::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.shortcuts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line, var(--panel-line));
}

.shortcuts__title {
  margin: 0;
  font-size: 17px;
  color: var(--heading, var(--text));
}

.shortcuts__close {
  width: 32px;
  height: 32px;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
  background: none;
  border: 1px solid var(--line, var(--panel-line));
  border-radius: 8px;
  cursor: pointer;
}

.shortcuts__list {
  margin: 0;
  padding: 8px 20px;
}

.shortcuts__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line, var(--panel-line));
}

.shortcuts__row:first-child {
  border-top: 0;
}

.shortcuts__row dd {
  margin: 0;
}

.shortcuts kbd {
  display: inline-block;
  min-width: 24px;
  padding: 2px 6px;
  font: 12px/1.4 var(--font-mono, ui-monospace, monospace);
  text-align: center;
  color: var(--text);
  background: var(--code, var(--panel-bg, transparent));
  border: 1px solid var(--line, var(--panel-line));
  border-bottom-width: 2px;
  border-radius: 6px;
}

.shortcuts__note {
  margin: 0;
  padding: 4px 20px 16px;
  font-size: 13px;
  color: var(--muted, var(--label, var(--text)));
}

/* The donate dialog ("d"): the address as a QR code, then in full. */
.donate {
  padding: 20px 20px 4px;
  text-align: center;
}

.donate .qr-code {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  color: var(--text);
}

.donate__address {
  display: block;
  font: 13px/1.5 var(--font-mono, ui-monospace, monospace);
  word-break: break-all;
}

.shortcuts__actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px 20px;
}

.shortcuts__button {
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: none;
  border: 1px solid var(--line, var(--panel-line));
  border-radius: 8px;
  cursor: pointer;
}

.shortcuts__button--primary {
  font-weight: 600;
  border-color: var(--text);
}

/* The footer's "?" that opens it. */
.footer__help {
  width: 24px; /* WCAG 2.5.8's minimum target */
  height: 24px;
  padding: 0;
  font: inherit;
  font-size: 12px;
  line-height: 22px;
  color: inherit;
  background: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.8;
}

.footer__help:hover,
.footer__help:focus-visible {
  opacity: 1;
}

/* /accessibility: the statement, in whichever layout's colours. It has no
   navbar, so classic's room for one goes. */
body:has(> .statement) {
  padding-top: 0;
}

.statement {
  box-sizing: border-box;
  max-width: 72ch;
  margin: 0 auto;
  padding: 32px 16px 24px;
  line-height: 1.6;
  color: var(--text);
}

.statement h1,
.statement h2 {
  color: var(--heading, var(--text));
  line-height: 1.25;
}

.statement__title {
  margin: 16px 0 8px;
  font-size: 1.8em;
}

.statement h2 {
  margin: 32px 0 8px;
  font-size: 1.2em;
}

.statement p,
.statement li {
  font-size: 1rem;
}

.statement ul {
  padding-left: 1.25em;
}

.statement .footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 40px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line, var(--panel-line));
}

.statement li + li {
  margin-top: 8px;
}

.statement a {
  color: inherit;
  text-decoration: underline;
}

.statement__back {
  font-size: 0.9em;
}

.statement kbd {
  padding: 0 4px;
  font: 0.9em var(--font-mono, ui-monospace, monospace);
  border: 1px solid var(--line, var(--panel-line));
  border-radius: 4px;
}
