.pokedex-pokeslots-modal__pokemart {
  position: absolute;
  top: -55px;
  left: -56px;
  width: 223px;
  pointer-events: none;
  z-index: -1;
  transform: rotate(-4deg);
  filter: drop-shadow(0 12px 20px rgba(15, 23, 42, 0.16));
}

.pokedex-market-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pokedex-market-tabs .btn {
    min-width: 6.5rem;
}

.pokedex-market-tabs {
    justify-content: center !important;
}

.pokedex-market-stage {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100%;
}

.pokedex-market-visual-panel,
.pokedex-market-info-panel {
  padding: 1rem;
}

.pokedex-market-stage__focus {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.65rem 0 0.35rem;
  flex: 1 1 auto;
}

.pokedex-market-stage__orb {
  position: relative;
  width: min(28vw, 176px);
  height: min(28vw, 176px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.pokedex-market-stage__orb::before {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  transform: rotate(335deg);
  background: url("../img/pokemon/pokeball-XHyLlyd.svg") center / contain no-repeat;
  opacity: 0.14;
  -webkit-mask-image: linear-gradient(205deg, transparent 0%, rgba(0, 0, 0, 0) 18%, #000 42%);
  mask-image: linear-gradient(205deg, transparent 0%, rgba(0, 0, 0, 0) 18%, #000 42%);
  pointer-events: none;
}

.pokedex-market-stage__orb img {
  position: relative;
  z-index: 1;
  width: min(13vw, 96px);
  height: min(13vw, 96px);
  image-rendering: pixelated;
  object-fit: contain;
  display: block;
}

.pokedex-market-stage__empty {
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pokedex-market-info-panel__summary h4 {
  line-height: 1.2;
}

.pokedex-market-info-panel__badges {
  min-width: 0;
}

.pokedex-market-info-panel__description {
  min-height: 42px;
}

.pokedex-market-info-panel__description p:first-child {
  line-height: 1.45;
}

.pokedex-market-quantity-row {
  min-width: 0;
}

.pokedex-market-quantity-select {
  width: auto;
  min-width: 86px;
  border-radius: 999px;
  font-weight: 600;
  padding-right: 2rem;
}

.pokedex-market-info-panel__footer .btn {
  min-width: 160px;
}

.pokedex-market-reward-preview {
  position: relative;
  width: 100%;
  min-width: 0;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.pokedex-market-reward-preview:hover,
.pokedex-market-reward-preview:focus-visible {
  border-color: color-mix(in srgb, var(--xds-border) 90%, transparent) !important;
  box-shadow: var(--xds-shadow);
  transform: translateY(-1px);
}

.pokedex-market-reward-preview.is-selected {
  border-color: color-mix(in srgb, var(--xds-border) 100%, transparent) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--xds-border) 20%, transparent), var(--xds-shadow);
}

.pokedex-market-reward-preview.is-disabled {
  opacity: 0.64;
}

.pokedex-market-stage .btn {
  min-width: 160px;
}

.market-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.market-history-entry {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.market-history-entry:last-child {
  border-bottom: 0;
}

.market-history-entry__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.market-history-entry__sprite {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.market-history-entry__sprite img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.market-history-entry__content {
  min-width: 0;
}

.market-history-entry__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

[data-bs-theme="dark"] .pokedex-market-visual-panel,
[data-bs-theme="dark"] .pokedex-market-info-panel,
[data-bs-theme="dark"] .pokedex-market-reward-preview {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .pokedex-market-reward-preview:hover,
[data-bs-theme="dark"] .pokedex-market-reward-preview:focus-visible {
  border-color: rgba(125, 211, 252, 0.24) !important;
}

[data-bs-theme="dark"] .pokedex-market-reward-preview.is-selected {
  border-color: rgba(125, 211, 252, 0.34) !important;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.12), var(--xds-shadow);
}

@media (max-width: 575.98px) {
  .pokedex-pokeslots-modal__pokemart {
    top: -23px;
    left: -35px;
    width: 175px;
  }

  .pokedex-market-stage__orb {
    width: 122px;
    height: 122px;
  }

  .pokedex-market-stage__orb img {
    width: 96px;
    height: 96px;
  }

  .pokedex-market-stage .btn {
    width: 100%;
  }

  .pokedex-market-info-panel__summary {
    align-items: stretch !important;
    flex-direction: column;
  }

  .pokedex-market-info-panel__footer .btn {
    width: auto;
    flex: 1 1 auto;
    min-height: 38px;
  }

  .pokedex-market-quantity-row {
    width: auto;
    flex: 0 0 auto;
    align-items: stretch !important;
  }

  .pokedex-market-quantity-row > span {
    display: none;
  }

  .pokedex-market-quantity-select {
    min-width: 96px;
    height: 38px;
  }

  .pokedex-market-visual-panel,
  .pokedex-market-info-panel {
    padding: 0.9rem;
  }
}
