/* Trainer-mode Pokémon context menu + stats panel */

.hud-context-menu {
  position: fixed;
  z-index: 8600;
  min-width: 148px;
  padding: 4px;
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  pointer-events: auto;
  user-select: none;
}

.hud-context-menu[hidden] {
  display: none !important;
}

.hud-context-menu__item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.hud-context-menu__item:hover:not(:disabled),
.hud-context-menu__item:focus-visible {
  background: rgba(201, 162, 39, 0.18);
  outline: none;
}

.hud-context-menu__item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pokemon-stats-hud {
  position: fixed;
  inset: 0;
  z-index: 8700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.pokemon-stats-hud[hidden] {
  display: none !important;
}

.pokemon-stats-hud__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.pokemon-stats-hud__panel {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  background: var(--color-bg-panel);
  border: 2px solid var(--color-border-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.pokemon-stats-hud__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--color-border);
}

.pokemon-stats-hud__portrait {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--color-portrait-bg);
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.pokemon-stats-hud__identity {
  flex: 1;
  min-width: 0;
}

.pokemon-stats-hud__name {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.pokemon-stats-hud__meta {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.pokemon-stats-hud__type {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1a1408;
  background: var(--color-border-gold);
  border-radius: 999px;
}

.pokemon-stats-hud__type[data-type="fire"] { background: #e66; color: #fff; }
.pokemon-stats-hud__type[data-type="water"] { background: #58a; color: #fff; }
.pokemon-stats-hud__type[data-type="grass"] { background: #6a4; color: #fff; }
.pokemon-stats-hud__type[data-type="electric"] { background: #da3; color: #1a1408; }
.pokemon-stats-hud__type[data-type="ice"] { background: #8cf; color: #1a1408; }
.pokemon-stats-hud__type[data-type="psychic"] { background: #c6a; color: #fff; }
.pokemon-stats-hud__type[data-type="dark"] { background: #654; color: #fff; }
.pokemon-stats-hud__type[data-type="fairy"] { background: #e9a; color: #1a1408; }

.pokemon-stats-hud__close {
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.pokemon-stats-hud__close:hover {
  color: var(--color-text);
  border-color: var(--color-border-gold);
}

.pokemon-stats-hud__body {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pokemon-stats-hud__row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
}

.pokemon-stats-hud__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.pokemon-stats-hud__hp {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pokemon-stats-hud__hp-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.pokemon-stats-hud__hp-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4a9e6e, #6bc48a);
  transition: width 0.2s ease;
}

.pokemon-stats-hud__hp-text {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  white-space: nowrap;
}

.pokemon-stats-hud__exp {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.pokemon-stats-hud__exp-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.pokemon-stats-hud__exp-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6a8fd4, #9ec5ff);
  transition: width 0.2s ease;
}

.pokemon-stats-hud__exp-text {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted, #aab);
  white-space: nowrap;
  min-width: 2.5em;
  text-align: right;
}

.pokemon-stats-hud__status {
  font-size: 13px;
  color: var(--color-text);
}
