/* pokemon.css */
.poke-widget {
  position: relative; flex: 0 0 auto; background: var(--panel); border-radius: 10px; overflow: hidden;
}
.poke-head { display: flex; align-items: center; gap: 4px; padding: 7px 6px 7px 8px; }
.poke-widget:not(.is-collapsed) .poke-head { border-bottom: 1px solid var(--line); }
.poke-collapse, .poke-ibtn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  display: grid; place-items: center; border-radius: 6px; transition: color .15s, background .15s;
}
.poke-collapse:hover, .poke-ibtn:hover { color: var(--text); background: var(--card-hover); }
.poke-collapse { width: 22px; height: 22px; flex: 0 0 auto; }
.poke-collapse svg { width: 16px; height: 16px; transition: transform .2s; }
.poke-widget.is-collapsed .poke-collapse svg { transform: rotate(-90deg); }
.poke-title {
  font-size: .76rem; font-weight: 700; color: var(--text); letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}
.poke-head-actions { display: flex; align-items: center; gap: 1px; flex: 0 0 auto; }
.poke-ibtn { width: 24px; height: 24px; flex: 0 0 auto; }
.poke-ibtn svg { width: 15px; height: 15px; }
.poke-resize { position: absolute; left: 0; right: 0; top: 0; height: 7px; cursor: ns-resize; touch-action: none; z-index: 3; }
.poke-resize::after {
  content: ""; position: absolute; left: 50%; top: 2px; width: 28px; height: 3px;
  margin-left: -14px; border-radius: 999px; background: transparent; transition: background .15s;
}
.poke-resize:hover::after, .poke-resize.is-dragging::after { background: var(--muted); }
.poke-widget.is-collapsed .poke-resize { display: none; }
.poke-stage { position: relative; height: 210px; overflow: hidden; background: var(--panel-2); }
.poke-widget.is-collapsed .poke-stage { display: none; }
.poke-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: .7rem; line-height: 1.4; text-align: center;
  padding: 0 22px; pointer-events: none;
}
.poke-sprite {
  position: absolute; bottom: 4px; left: 0; width: 84px; height: 84px;
  image-rendering: pixelated; pointer-events: auto; cursor: pointer; transition: left linear;
}
.poke-sprite.is-flip { transform: scaleX(-1); }
.poke-sprite.is-spawning { animation: poke-spawn-pop .15s ease-out; }
@keyframes poke-spawn-pop {
  0% { transform: scale(.4); opacity: 0; filter: saturate(0) brightness(3) contrast(1); }
  40% { filter: saturate(.3) brightness(1.8) contrast(1.05); }
  60% { transform: scale(1.15); opacity: 1; filter: saturate(.8) brightness(1.1) contrast(1); }
  100% { transform: scale(1); opacity: 1; filter: none; }
}
.poke-sprite.is-fading { animation: poke-fade-out .22s ease-out forwards; }
@keyframes poke-fade-out {
  0% { opacity: 1; filter: none; }
  40% { transform: scale(1.15); filter: saturate(.8) brightness(1.1) contrast(1); }
  60% { opacity: .4; filter: saturate(.3) brightness(1.8) contrast(1.05); }
  100% { transform: scale(.4); opacity: 0; filter: saturate(0) brightness(3) contrast(1); }
}
.poke-ball {
  position: absolute; bottom: 4px; left: 0; width: 84px; height: 84px;
  background-image: url('https://raw.githubusercontent.com/jakobhoeg/vscode-pokemon/main/media/pokeball_sprite_sheet.png');
  background-repeat: no-repeat; background-position: 0 0; background-size: 84px 504px;
  image-rendering: pixelated; pointer-events: none;
}
.poke-ball.is-opening { animation: poke-ball-open .45s steps(6) forwards; }
@keyframes poke-ball-open { to { background-position-y: -504px; } }
.poke-ball.is-closing { background-position-y: -504px; animation: poke-ball-close .6s steps(6) forwards; }
@keyframes poke-ball-close { from { background-position-y: -504px; } to { background-position-y: 0; } }
.poke-bubble {
  position: absolute; bottom: 92px; left: 0; width: 24px; height: auto;
  image-rendering: pixelated; pointer-events: none; opacity: 0; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}
.poke-bubble.is-in { opacity: 1; transform: translateY(0); }

.poke-picker { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: center; padding: 10vh 16px 16px; background: rgba(0,0,0,.5); }
.poke-picker[hidden] { display: none; }
.poke-picker-box {
  width: min(560px, 100%); max-height: 70vh; background: var(--elevated); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.55); overflow: hidden; display: flex; flex-direction: column;
}
.poke-picker-input {
  border: none; background: var(--panel-2); color: var(--text); font-size: .92rem;
  padding: 14px 16px; outline: none; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.poke-picker-input::placeholder { color: var(--muted); }
.poke-picker-list { overflow-y: auto; padding: 6px; }
.poke-picker-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.poke-picker-row:hover, .poke-picker-row.is-active { background: var(--card-hover); }
.poke-picker-icon { width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); flex: 0 0 auto; }
.poke-picker-icon svg { width: 18px; height: 18px; }
.poke-picker-name { font-size: .85rem; font-weight: 600; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poke-picker-sub { font-size: .72rem; color: var(--muted); flex: 0 0 auto; }
.poke-picker-empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: .82rem; }
