/* Character / overworld sprite picker + sidebar chip */

.wrp-sprite-pick {
  --wrp-sp-frame: 16px;
  --wrp-sp-scale: 2.25;
  margin-top: 6px;
}

.wrp-sprite-pick__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.wrp-sprite-pick__search {
  flex: 1 1 180px;
  min-width: 140px;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 177, 224, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #eaf6fb;
  font: inherit;
  font-size: 13px;
}

.wrp-sprite-pick__search:focus {
  outline: none;
  border-color: rgba(0, 177, 224, 0.7);
  box-shadow: 0 0 0 2px rgba(0, 177, 224, 0.2);
}

.wrp-sprite-pick__hint {
  font-size: 11px;
  color: #94a3b8;
}

.wrp-sprite-pick__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(0, 177, 224, 0.28);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 177, 224, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(7, 24, 32, 0.95), rgba(4, 16, 22, 0.98));
}

.wrp-sprite-pick--compact .wrp-sprite-pick__grid {
  max-height: 220px;
}

.wrp-sprite-pick__opt {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 6px 7px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.45);
  color: #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.wrp-sprite-pick__opt:hover {
  border-color: rgba(0, 177, 224, 0.55);
  background: rgba(0, 177, 224, 0.1);
  transform: translateY(-1px);
}

.wrp-sprite-pick__opt.is-on {
  border-color: rgba(253, 224, 71, 0.75);
  background: rgba(253, 224, 71, 0.12);
  box-shadow: 0 0 0 1px rgba(253, 224, 71, 0.25), 0 6px 16px rgba(0, 0, 0, 0.25);
}

.wrp-sprite-pick__opt.is-featured:not(.is-on) {
  border-color: rgba(125, 220, 245, 0.4);
}

.wrp-sprite-pick__thumb {
  width: calc(var(--wrp-sp-frame) * var(--wrp-sp-scale));
  height: calc(32px * var(--wrp-sp-scale));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: calc(144px * var(--wrp-sp-scale)) calc(32px * var(--wrp-sp-scale));
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}

.wrp-sprite-pick__label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cbd5e1;
}

.wrp-sprite-pick__opt.is-on .wrp-sprite-pick__label {
  color: #fde68a;
}

/* Sidebar standing sprite next to username */
.wrp-trainer-sprite {
  display: inline-block;
  width: 20px;
  height: 40px; /* full 16×32 frame at 1.25× — no crop */
  margin: 0;
  /* Slight lift so the figure centers with the username, not hanging low */
  transform: translateY(-3px);
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 180px 40px; /* 9 × 20  ×  32 × 1.25 */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.wrp-trainer-sprite--lg {
  width: 24px;
  height: 48px;
  transform: translateY(-2px);
  background-size: 216px 48px;
}

/* Keep username row optically balanced with tall sprite chips */
.wrp-trainer-name-row {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  line-height: 1.15 !important;
}

.wrp-trainer-name-row .wrp-trainer-sprite {
  align-self: center;
}

/* Profile settings section spacing */
.profile-settings-panel .wrp-sprite-pick {
  margin-top: 8px;
  margin-bottom: 4px;
}
