/* Monavate's look, after web-push-provisioning: Poppins, square corners, the
   yellow primary button. Dark only. */

:root {
  color-scheme: dark;
  --bg: #202133;
  --surface: rgba(77, 77, 92, 0.25);
  --panel: rgba(128, 115, 229, 0.16); /* the summary, set apart from the page */
  --fg: #fefefd;
  --muted: #c9c9d1;
  --faint: #7a7a88;
  --line: rgba(77, 77, 92, 0.5);
  --yellow: #dfff00;
  --yellow-line: #d0ed02;
  --on-yellow: #202133;
  --violet: #8073e5;
  --ok: #7fc28a;
  --warn: #f0b85a;
  --bad: #ff9da8;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font:
    14px/22px "Poppins",
    system-ui,
    sans-serif;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 16px 96px;
}

a {
  color: inherit;
}

/* ---- header ---- */

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  height: 73px;
  padding: 16px 40px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.nav-logo {
  grid-column: 2;
  display: inline-flex;
  height: 40px;
}

.nav-logo svg {
  fill: var(--yellow);
}

.chip {
  grid-column: 3;
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---- type ---- */

h1 {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 44px;
  font-weight: 600;
  text-align: center;
}

h1:focus {
  outline: none;
}

h2 {
  margin: 32px 0 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

p {
  margin: 0 0 12px;
}

strong {
  font-weight: 600;
}

/* A step's name, above the heading that says what it's for. */
.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.lead {
  margin-bottom: 24px;
  color: var(--muted);
  text-align: center;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
}

.mono,
code {
  font-family: var(--mono);
  font-size: 0.85em;
  word-break: break-all;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- step map ---- */

.steps {
  display: flex;
  gap: 4px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 18px;
  color: var(--faint);
}

.steps li {
  flex: 1;
  padding-top: 8px;
  border-top: 3px solid var(--line);
}

.steps li.done {
  border-top-color: var(--yellow);
  color: var(--muted);
}

.steps li.current {
  border-top-color: var(--yellow);
  color: var(--fg);
  font-weight: 600;
}

.steps-marker {
  display: none;
}

/* ---- lists and summaries ---- */

.facts {
  margin: 0 0 24px;
  padding-left: 20px;
}

.facts li {
  margin-bottom: 8px;
}

.facts li::marker {
  color: var(--muted);
}

/* The one panel of each screen, drawn like the provisioning page's. */
.summary {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.summary > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 20px;
}

.summary > div + div {
  border-top: 1px solid var(--line);
}

.summary dt {
  color: var(--muted);
}

.summary dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

/* Nothing to pay with yet: said by colour, not by a notice. */
.summary dd.empty {
  color: var(--warn);
}

/* Label above value, so a 44-character address never has to share a line. */
.rows {
  margin: 12px 0;
}

.rows dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.rows dd {
  margin: 2px 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
  word-break: break-all;
}

/* ---- the approvals checklist ---- */

.checklist {
  margin: 0 0 24px;
  padding: 0 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
}

.checklist li + li {
  border-top: 1px solid var(--line);
}

.checklist-marker {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.checklist li.active .checklist-marker {
  border-color: var(--yellow-line);
  background: var(--yellow);
  color: var(--on-yellow);
}

.checklist li.done .checklist-marker {
  border-color: var(--ok);
  color: var(--ok);
}

.checklist li.failed .checklist-marker {
  border-color: var(--bad);
  color: var(--bad);
}

.checklist li.todo {
  color: var(--faint);
}

.checklist-state {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
}

/* ---- notices ---- */

.notice {
  display: flex;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  background: var(--surface);
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--violet);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.notice-title {
  margin-bottom: 4px;
  font-weight: 600;
}

.notice-success {
  border-left-color: var(--ok);
}
.notice-success .notice-icon {
  color: var(--ok);
}

.notice-warning {
  border-left-color: var(--warn);
}
.notice-warning .notice-icon {
  color: var(--warn);
}

.notice-error {
  border-left-color: var(--bad);
}
.notice-error .notice-icon,
.notice-error .notice-title {
  color: var(--bad);
}

/* What the wallet is about to say, so it isn't a surprise when it does. */
.heads-up {
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.heads-up p:last-child {
  margin-bottom: 0;
}

.heads-up-title {
  font-weight: 600;
}

.checks {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.checks li {
  margin-bottom: 4px;
}

.heads-up .checks,
.warning-dialog .checks {
  margin-bottom: 12px;
}

.checks li::before {
  content: "✓ ";
  color: var(--ok);
  font-weight: 700;
}

/* The same, in the way of the approve button, where it gets read. */
.warning-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
}

.warning-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.warning-dialog h2 {
  margin-top: 0;
}

.warning-dialog .actions {
  margin: 24px 0 0;
}

/* ---- buttons ---- */

button {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: var(--muted);
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

button:disabled {
  color: var(--faint);
  cursor: not-allowed;
}

button.primary {
  min-width: 200px;
  border-color: var(--yellow-line);
  background: var(--yellow);
  color: var(--on-yellow);
}

button.primary:hover:not(:disabled) {
  border-color: var(--on-yellow);
}

button.primary:disabled {
  opacity: 0.5;
  color: var(--on-yellow);
}

button.danger {
  border-color: var(--bad);
  color: var(--bad);
}

button.link {
  min-height: 0;
  padding: 4px 16px;
  border: 0;
}

button.link:hover:not(:disabled) {
  text-decoration: underline;
}

p:has(> button.link) {
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 0 0 24px;
}

.actions .hint {
  flex-basis: 100%;
  margin: -8px 0 0;
  text-align: center;
}

.wallets {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.wallet-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  background: var(--surface);
  text-align: left;
}

.wallet-button img {
  border-radius: 6px;
}

.copy {
  margin-top: 8px;
}

/* Switching off sits apart from everything that isn't. */
.danger-zone {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.danger-zone h2 {
  margin-top: 0;
}

/* ---- information for nerds ---- */

.nerds {
  margin: 32px 0 0;
  border: 1px dashed var(--line);
  font-size: 12px;
  line-height: 20px;
}

.nerds summary {
  padding: 10px 16px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.nerds[open] summary {
  border-bottom: 1px dashed var(--line);
}

.nerds-body {
  padding: 12px 16px;
}

.nerds-body ol {
  padding-left: 20px;
}

.nerds-body button {
  font-size: 12px;
}

.notice .nerds {
  margin-top: 12px;
}

.nerd-action {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.sub-value {
  display: block;
  font-weight: 400;
}

/* No wallet found: the one thing on the page to act on, so it stands out. */
.no-wallet {
  margin: 32px 0 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--warn);
  background: var(--surface);
}

.no-wallet h2 {
  margin-top: 0;
}

.no-wallet .copy {
  margin: 0 0 20px;
}

.suggested-wallets {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.suggested-wallets a {
  display: block;
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.suggested-wallets a:hover {
  border-color: var(--muted);
}

.suggested-wallets a::after {
  content: " ↗";
  color: var(--muted);
  font-weight: 400;
}

@media (max-width: 540px) {
  .nav {
    padding: 16px;
  }

  main {
    padding: 24px 16px 64px;
  }

  h1 {
    font-size: 28px;
    line-height: 36px;
  }

  button.primary {
    width: 100%;
  }
}
