/* wallet.css: the Elysium wallet (wallet.js): top bar slot + menu, the W7 step flow, the coin page trade panel states.
   Uses the tokens in c.css :root. Amber (wrong network) is local to these parts. */
.uw-slot, .uw-modal, .trade { --amber: oklch(80% .13 75); --amber-t: oklch(80% .13 75 / .13); --amber-d: oklch(62% .11 70); }
body.uw-lock { overflow: hidden; }

/* top bar slot */
.uw-slot { position: relative; flex: none; }
.uw-chip { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 4px; border: 1px solid var(--line2); border-radius: 9px;
  background: var(--s1); transition: background .15s, border-color .15s; white-space: nowrap; }
.uw-chip:hover, .uw-chip[aria-expanded="true"] { background: var(--s2); border-color: var(--tx3); }
.uw-chip .bk { width: 24px; height: 24px; border-radius: 6px; }
.uw-a { font: 600 13px var(--mono); }
.uw-b { font: 700 13px var(--mono); padding-left: 8px; border-left: 1px solid var(--line2); }
.uw-chip .u { margin-left: -4px; }
.uw-chip > svg:last-child { width: 12px; height: 12px; color: var(--tx2); }
.uw-chip.warn { border-color: var(--amber-d); background: var(--amber-t); }
.uw-net { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--amber); padding-left: 8px; border-left: 1px solid var(--amber-d); }
.uw-net i, .uw-mi.warn i, .w7-warn i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none; display: inline-block; }
.uw-menu { position: absolute; right: 0; top: 42px; width: 248px; background: var(--s1); border: 1px solid var(--line2); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px rgb(0 0 0 / .5); z-index: 6; }
.uw-mh { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.uw-mh .bk { width: 34px; height: 34px; border-radius: 8px; }
.uw-mh div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.uw-mh b { font: 700 13px var(--mono); }
.uw-mh span { font-size: 12px; color: var(--tx2); }
.uw-mh .uw-mbal { font: 600 12px var(--mono); color: var(--tx); }
.uw-mi { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--tx); text-align: left; transition: background .15s; }
.uw-mi:hover, .uw-mi:focus-visible { background: var(--s2); }
.uw-mi svg { width: 11px; height: 11px; color: var(--tx2); }
.uw-mi.warn { color: var(--amber); }
.uw-mi[data-uw="disconnect"] { color: var(--tx2); }

/* W7 step flow */
.uw-modal { grid-template-columns: minmax(0, 468px); justify-content: center; }
.w7 { width: 100%; min-width: 0; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--s1); border: 1px solid var(--line2);
  border-radius: 16px; padding: 16px 18px 14px; box-shadow: 0 24px 60px rgb(0 0 0 / .6); animation: w7in .18s ease-out; }
@keyframes w7in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.w7-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.w7-h h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 28px; }
.w7-r { font-size: 13px; color: var(--teal); font-weight: 600; margin-top: 1px; }
.w7-rail { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 16px; counter-reset: st; }
.w7-rail li { counter-increment: st; display: flex; align-items: center; gap: 7px; padding-top: 9px; border-top: 3px solid var(--line); font-size: 12px;
  font-weight: 600; color: var(--tx3); transition: border-color .2s, color .2s; }
.w7-rail li::before { content: counter(st); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--mono);
  border: 1px solid var(--line2); color: var(--tx3); flex: none; }
.w7-rail li.on { border-color: var(--teal); color: var(--tx); }
.w7-rail li.on::before { background: var(--teal); border-color: var(--teal); color: #04121c; }
.w7-rail li.done { border-color: var(--teal-d); color: var(--tx2); }
.w7-rail li.done::before { content: '✓'; border-color: var(--teal-d); color: var(--teal); font-family: var(--ui); }
.w7-sl { font-size: 12px; color: var(--tx2); margin: 2px 0 8px; }
.w7-grid + .w7-sl { margin-top: 14px; }
.w7-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.w7-t { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--s1); text-align: center; transition: background .15s, border-color .15s; min-width: 0; }
.w7-t:hover, .w7-t:focus-visible { background: var(--s2); border-color: var(--line2); }
.w7-t b { font-size: 13px; font-weight: 700; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w7-t em { font: 500 12px var(--mono); font-style: normal; color: var(--tx3); display: inline-flex; align-items: center; gap: 4px; }
.w7-t em svg { width: 10px; height: 10px; }
.w7-t em.t-det { color: var(--teal); }
.w7-t em.t-last { color: #04121c; background: var(--teal); border-radius: 5px; padding: 0 6px; font-weight: 700; }
.w7-t:has(.t-last) { border-color: var(--teal-d); }
.w7-l { width: 64px; height: 64px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line2); display: grid; place-items: center; flex: none; overflow: hidden; }
.w7-l img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.w7-l.big { width: 72px; height: 72px; border-radius: 18px; }
.w7-l.big img { width: 46px; height: 46px; }
.w7-msg { font-size: 13px; color: var(--tx); background: var(--down-t); border: 1px solid oklch(68% .14 20 / .35); border-radius: 9px; padding: 8px 11px; margin-bottom: 12px; }
.w7-c { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 4px 4px; }
.w7-c h3 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
.w7-c .w7-msg { margin: 0; align-self: stretch; }
.w7-q { font-size: 13px; color: var(--tx2); max-width: 340px; }
.w7-q b { color: var(--tx); font: 700 13px var(--mono); }
.w7-warn { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx); background: var(--amber-t); border: 1px solid var(--amber-d);
  border-radius: 9px; padding: 8px 11px; text-align: left; align-self: stretch; }
.w7-row { display: flex; gap: 8px; margin-top: 6px; align-self: stretch; }
.w7-row .btn { flex: 1; height: 40px; }
.w7-ok { position: relative; width: 72px; height: 72px; }
.w7-ok .bk { width: 72px; height: 72px; border-radius: 18px; }
.w7-ok i { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #04121c;
  display: grid; place-items: center; border: 3px solid var(--s1); }
.w7-ok i svg { width: 12px; height: 12px; }
.w7-addr { font-size: 15px; font-weight: 600; color: var(--tx); }
.w7-un { list-style: none; align-self: stretch; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; }
.w7-un li { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.w7-un li + li { border-top: 1px solid var(--line); }
.w7-un svg { width: 14px; height: 14px; color: var(--teal); flex: none; }
.w7-f { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 12px; color: var(--tx3); }
.w7-f span { display: flex; align-items: center; gap: 6px; }
.w7-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); display: inline-block; }

/* coin page trade panel states */
.trade .flabel .tb-on { color: var(--tx); font-family: var(--mono); font-weight: 600; }
.qc button.max { flex: 1.1; color: var(--teal); }
.trade #go:disabled { background: var(--s3); color: var(--tx2); cursor: default; transform: none; }
.trade #go.warn { background: var(--amber); color: #1b1203; }
.tmsg { margin-top: 10px; font-size: 13px; color: var(--tx); background: var(--s2); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; }
.tmsg b { font-weight: 700; }

@media (max-width: 480px) {
  .uw-a { display: none; }
  .uw-b { border-left: 0; padding-left: 0; }
  .uw-net { border-left: 0; padding-left: 0; }
  .w7 { padding: 14px 14px 12px; }
  .w7-grid { gap: 6px; }
  .w7-t { padding: 10px 4px 9px; }
  .w7-t b { font-size: 12px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .w7 { animation: none; } }
