/* wallet.css -- the "Your cards" sheet.
 *
 * Mirrors the prefs sheet's shape so it reads as the same family of surface.
 * Every colour is a token base.css actually defines (R-006): a token base.css
 * does not define lets the hardcoded fallback win silently, which is exactly
 * how four blues and three tier palettes got into this app once already. */

/* An explicit z-index, not DOM order. .overlay-root declares 50, and DOM order
 * only breaks ties between EQUAL z-indexes -- so a sheet that means to paint
 * above #detail-root (1200) must say so out loud. This sits above detail and
 * deliberately BELOW #rate-root (1300) and #card-root (1400): tapping a row
 * opens a card, and that card has to land on top of this sheet, not under it.
 * That is the R-020 defect in reverse, and declaring the number is the fix.
 * The CURRENT full layer ladder lives in install.css -- update it there. */
#wallet-root {
  position: fixed;
  inset: 0;
  z-index: 1250;
}

.wl-backdrop {
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.wl-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88%;
  overflow-y: auto;
  background: var(--surface);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: var(--shadow-2);
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.wl-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--text-dim);
  background: var(--surface-2);
}

.wl-title {
  margin: 0 0 14px;
  padding-right: 40px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.wl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.wl-row + .wl-row {
  border-top: 1px solid var(--border);
}

/* Generous target on purpose: this gets tapped one-handed, standing outside,
 * often in the cold or the dark. --tap is the floor, not the goal. */
.wl-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: calc(var(--tap) + 12px);
  padding: 10px 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.wl-ico {
  flex: none;
  font-size: 22px;
  color: var(--accent);
}

.wl-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wl-brand {
  font-size: 1rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wl-prog {
  font-size: 0.75rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wl-go {
  flex: none;
  font-size: 18px;
  color: var(--text-faint);
}

.wl-empty {
  margin: 0;
  padding: 4px 2px 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dim);
}
