/* =====================================================
   wallet-sheet.css v2 — APPOLON premium wallet picker
   ===================================================== */

@keyframes wsUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes wsFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes rec-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes wcard-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0); }
  50%       { box-shadow: 0 0 20px 3px rgba(139,92,246,0.2); }
}
@keyframes wc-spin { to { transform: rotate(360deg); } }

/* Root */
.wsheet {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.wsheet[hidden] { display: none !important; }

/* Backdrop */
.wsheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: wsFade .28s ease both;
  cursor: pointer;
}

/* Panel */
.wsheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(160deg, #0f0b24 0%, #080617 100%);
  border-radius: 32px 32px 0 0;
  border: 1px solid rgba(139,92,246,.18);
  border-bottom: none;
  box-shadow:
    0 -8px 60px rgba(109,40,217,.35),
    0 -1px 0 rgba(139,92,246,.22) inset;
  animation: wsUp .4s cubic-bezier(.22,1,.36,1) both;
  scrollbar-width: none;
}
.wsheet__panel::-webkit-scrollbar { display: none; }

/* Grip */
.wsheet__grip {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.14);
  margin: 14px auto 0;
}

/* Header */
.wsheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
}
.wsheet__header-text { display: flex; flex-direction: column; gap: 3px; }
.wsheet__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
}
.wsheet__subtitle {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(139,92,246,.9);
}
.wsheet__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.45);
  cursor: pointer;
  transition: background .18s, color .18s;
  flex-shrink: 0;
}
.wsheet__close:hover { background: rgba(255,255,255,.09); color: #fff; }

/* Body */
.wsheet__body {
  padding: 0 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Group */
.wsheet__group { display: flex; flex-direction: column; gap: 11px; }
.wsheet__group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
}
.wsheet__group-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.2), transparent);
}
.wsheet__group-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  white-space: nowrap;
}

/* Grid */
.wsheet__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.wsheet__grid--wc {
  grid-template-columns: repeat(4, 1fr);
}

/* Card */
.wcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px 11px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  overflow: hidden;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
}
.wcard:hover {
  border-color: rgba(139,92,246,.5);
  background: rgba(139,92,246,.08);
  box-shadow: 0 0 0 1px rgba(139,92,246,.2), 0 6px 28px rgba(109,40,217,.2);
  transform: translateY(-2px);
}
.wcard:active {
  transform: scale(.95);
  border-color: rgba(139,92,246,.75);
  background: rgba(139,92,246,.13);
}
.wcard--native:hover { animation: wcard-glow 2s ease infinite; }

/* Icon */
.wcard__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  overflow: hidden;
  flex-shrink: 0;
  transition: transform .2s;
}
.wcard:hover .wcard__icon-wrap { transform: scale(1.07); }
.wcard__icon {
  width: 54px; height: 54px;
  border-radius: 12px;
  display: block;
  object-fit: contain;
}

/* Name */
.wcard__name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  text-align: center;
  line-height: 1.3;
  transition: color .18s;
}
.wcard:hover .wcard__name { color: #fff; }

/* Recommended badge */
.wcard__rec {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c084fc 0%, #a855f7 25%, #818cf8 50%, #a855f7 75%, #c084fc 100%);
  background-size: 200% auto;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
  animation: rec-shimmer 2.8s linear infinite;
  box-shadow: 0 1px 10px rgba(139,92,246,.4);
  pointer-events: none;
}
.wcard--native .wcard__icon-wrap { margin-top: 12px; }

/* WC loading state */
.wcard--wc.wc-wallet-btn--loading { opacity: .5; cursor: wait; }
.wc-wallet-spinner {
  display: block;
  width: 10px; height: 10px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: wc-spin .7s linear infinite;
  margin-top: 2px;
}

/* Footer */
.wsheet__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px 22px;
  font-size: 11px;
  color: rgba(255,255,255,.22);
  letter-spacing: .03em;
}
.wsheet__footer svg { opacity: .35; flex-shrink: 0; }

/* Narrow screen */
@media (max-width: 340px) {
  .wsheet__grid { grid-template-columns: repeat(2, 1fr); }
  .wsheet__grid--wc { grid-template-columns: repeat(2, 1fr); }
}

/* Safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .wsheet__footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
