/* Card Search visual refresh
   Presentation-only overrides that align search.html with home-preview.html.
   Existing IDs, JavaScript hooks, search behavior, prices, Trade, and Watchlist remain unchanged. */

#pv-search-body.pv-searchRefresh {
  --search-bg: #080809;
  --search-surface: #111114;
  --search-surface-dark: #0b0b0e;
  --search-surface-raised: #18181d;
  --search-text: #f7f7f8;
  --search-muted: #aaaab4;
  --search-line: #2d2d37;
  --search-line-strong: #4a4a56;
  --search-yellow: #ffcb05;
  --search-yellow-hover: #ffda3d;
  --search-yellow-ink: #171300;
  --search-danger: #ff9c86;
  --search-heading: "Playfair Display", Georgia, serif;
  --search-body: "DM Sans", "Space Grotesk", system-ui, sans-serif;
  background:
    radial-gradient(circle at 88% 4%, rgba(255, 203, 5, 0.08), transparent 28rem),
    var(--search-bg);
  color: var(--search-text);
  font-family: var(--search-body);
}

#pv-search-body.pv-searchRefresh .container {
  width: min(100% - 2rem, 72rem);
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

/* Header */
#pv-search-body.pv-searchRefresh .pv-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 4.7rem;
  border-bottom: 1px solid var(--search-line);
  background: rgba(8, 8, 9, 0.94);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

#pv-search-body.pv-searchRefresh .pv-header__inner {
  width: min(100% - 2rem, 72rem);
  min-height: 4.7rem;
  margin: 0 auto;
  padding: 0;
}

#pv-search-body.pv-searchRefresh .pv-searchRefresh__brand {
  position: relative;
  display: block;
  width: 7rem;
  height: 3.4rem;
  min-width: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

#pv-search-body.pv-searchRefresh .pv-searchRefresh__brand img {
  position: absolute;
  top: -0.45rem;
  left: -0.35rem;
  width: 7.7rem;
  max-width: none;
  height: auto;
}

#pv-search-body.pv-searchRefresh .pv-nav__list {
  gap: 0.25rem;
}

#pv-search-body.pv-searchRefresh .pv-nav__link:not(.pv-nav__link--pricing) {
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.55rem;
  color: var(--search-muted);
  font-family: var(--search-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
}

#pv-search-body.pv-searchRefresh .pv-nav__link:not(.pv-nav__link--pricing):hover,
#pv-search-body.pv-searchRefresh .pv-nav__link:not(.pv-nav__link--pricing):focus-visible {
  background: var(--search-surface);
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-nav__link:not(.pv-nav__link--pricing)[aria-current="page"] {
  background: rgba(255, 203, 5, 0.14);
  color: var(--search-yellow);
}

#pv-search-body.pv-searchRefresh .pv-navToggle {
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--search-surface-raised);
}

#pv-search-body.pv-searchRefresh .pv-navToggle:hover {
  border-color: var(--search-line-strong);
}

#pv-search-body.pv-searchRefresh .pv-navToggle__bar {
  background: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-auth-menu__trigger {
  border-color: transparent;
  background: var(--search-surface-raised);
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-auth-menu__trigger:hover,
#pv-search-body.pv-searchRefresh .pv-auth-menu__trigger[aria-expanded="true"] {
  border-color: var(--search-yellow);
  color: var(--search-yellow);
}

/* Page introduction */
#pv-search-body.pv-searchRefresh .pv-main {
  min-height: calc(100vh - 5rem);
  padding-bottom: 0;
}

#pv-search-body.pv-searchRefresh .pv-searchHero {
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(1.2rem, 3vw, 2rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
  text-align: left;
}

#pv-search-body.pv-searchRefresh .pv-searchHero__eyebrow {
  margin: 0 0 0.65rem;
  color: var(--search-yellow);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#pv-search-body.pv-searchRefresh .pv-searchHero .pv-hero__title {
  max-width: 52rem;
  margin: 0;
  color: var(--search-text);
  font-family: var(--search-heading);
  font-size: clamp(2rem, 6.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

#pv-search-body.pv-searchRefresh .pv-searchHero .pv-hero__title em {
  color: var(--search-yellow);
  font-style: normal;
}

#pv-search-body.pv-searchRefresh .pv-searchHero .pv-hero__subtitle {
  max-width: 38rem;
  margin: 1rem auto 0;
  color: var(--search-muted);
  font-family: var(--search-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

#pv-search-body.pv-searchRefresh .pv-searchHero__chips {
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.35rem;
}

#pv-search-body.pv-searchRefresh .pv-searchHero__chip {
  min-height: 2rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--search-line);
  border-radius: 999px;
  background: rgba(17, 17, 20, 0.8);
  color: var(--search-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

/* Search workspace */
#pv-search-body.pv-searchRefresh .pv-searchWorkspace {
  display: grid;
  gap: 2rem;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

#pv-search-body.pv-searchRefresh .pv-searchJumpNav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
  margin: 1.5rem 0 0;
}

#pv-search-body.pv-searchRefresh .pv-searchJumpNav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  min-height: 2.85rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--search-line-strong);
  border-radius: 0.7rem;
  background: var(--search-surface-raised);
  color: var(--search-text);
  font-family: var(--search-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
}

#pv-search-body.pv-searchRefresh .pv-searchJumpNav a:hover,
#pv-search-body.pv-searchRefresh .pv-searchJumpNav a:focus-visible {
  border-color: #666673;
  background: #202027;
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-searchJumpNav a:first-child {
  border-color: #c79b00;
  background: var(--search-yellow);
  color: var(--search-yellow-ink);
  box-shadow: 0 8px 18px rgba(255, 203, 5, 0.16);
}

#pv-search-body.pv-searchRefresh #pv-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  margin: 0;
  align-items: stretch;
}

#pv-search-body.pv-searchRefresh #pv-search-form > .pv-form__field,
#pv-search-body.pv-searchRefresh #pv-search-form > .col-12 {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}

#pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context[hidden] {
  display: none !important;
}

#pv-search-body.pv-searchRefresh .pv-searchPanel,
#pv-search-body.pv-searchRefresh #pv-trade,
#pv-search-body.pv-searchRefresh #pv-favorites {
  margin: 0;
  padding: clamp(1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--search-line);
  border-radius: 1.2rem;
  background: rgba(17, 17, 20, 0.92);
  box-shadow: none;
}

#pv-search-body.pv-searchRefresh .pv-searchPanel__header,
#pv-search-body.pv-searchRefresh #pv-trade > .pv-section__header,
#pv-search-body.pv-searchRefresh #pv-favorites > .pv-section__header {
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

#pv-search-body.pv-searchRefresh .pv-searchPanel__header .pv-section__title,
#pv-search-body.pv-searchRefresh #pv-search-results .pv-section__title,
#pv-search-body.pv-searchRefresh #pv-trade .pv-section__title,
#pv-search-body.pv-searchRefresh #pv-favorites .pv-section__title {
  margin: 0;
  color: #FFCB05;
  font-family: var(--search-heading);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0;
}

#pv-search-body.pv-searchRefresh .pv-form {
  --bs-gutter-x: 0.8rem;
  --bs-gutter-y: 0.9rem;
  margin-right: calc(-0.5 * var(--bs-gutter-x));
  margin-left: calc(-0.5 * var(--bs-gutter-x));
}

#pv-search-body.pv-searchRefresh .form-label {
  margin-bottom: 0.45rem;
  color: var(--search-muted);
  font-family: var(--search-body);
  font-size: 0.78rem;
  font-weight: 700;
}

#pv-search-body.pv-searchRefresh .form-control,
#pv-search-body.pv-searchRefresh .form-select {
  min-height: 3.35rem;
  border: 1px solid #3b3b46;
  border-radius: 0.8rem;
  background-color: #0c0c0f;
  color: var(--search-text);
  font-family: var(--search-body);
  box-shadow: none;
}

#pv-search-body.pv-searchRefresh .form-control::placeholder {
  color: #797984;
}

#pv-search-body.pv-searchRefresh .form-control:focus,
#pv-search-body.pv-searchRefresh .form-select:focus {
  border-color: var(--search-yellow);
  outline: 2px solid rgba(255, 203, 5, 0.24);
  outline-offset: 1px;
  box-shadow: none;
}

#pv-search-body.pv-searchRefresh .form-select:disabled {
  border-color: #292931;
  background-color: #0a0a0c;
  color: #6f6f78;
  opacity: 1;
}

#pv-search-body.pv-searchRefresh .pv-searchFieldHeader {
  align-items: center;
}

#pv-search-body.pv-searchRefresh .pv-searchSeriesSetToggle {
  color: var(--search-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

#pv-search-body.pv-searchRefresh .pv-searchSeriesSetToggle input {
  accent-color: var(--search-yellow);
}

#pv-search-body.pv-searchRefresh .pv-button,
#pv-search-body.pv-searchRefresh .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  line-height: 1.15;
  min-height: 2.85rem;
  border-radius: 0.7rem;
  font-family: var(--search-body);
  font-weight: 700;
  box-shadow: none;
  text-transform: none;
}

#pv-search-body.pv-searchRefresh .pv-button--primary,
#pv-search-body.pv-searchRefresh #pv-search-submit,
#pv-search-body.pv-searchRefresh #pv-trade-apply-percent-button {
  border-color: var(--search-yellow);
  background: var(--search-yellow);
  color: var(--search-yellow-ink);
}

#pv-search-body.pv-searchRefresh .pv-button--primary:hover,
#pv-search-body.pv-searchRefresh #pv-search-submit:hover,
#pv-search-body.pv-searchRefresh #pv-trade-apply-percent-button:hover {
  border-color: var(--search-yellow-hover);
  background: var(--search-yellow-hover);
  color: var(--search-yellow-ink);
}

#pv-search-body.pv-searchRefresh .pv-button--secondary,
#pv-search-body.pv-searchRefresh #pv-search-toggle,
#pv-search-body.pv-searchRefresh #pv-favorites-toggle {
  border-color: var(--search-line-strong);
  background: var(--search-surface-raised);
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-button--secondary:hover,
#pv-search-body.pv-searchRefresh #pv-search-toggle:hover,
#pv-search-body.pv-searchRefresh #pv-favorites-toggle:hover {
  border-color: #666673;
  background: #202027;
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-button--danger {
  border-color: #77463c;
  background: rgba(119, 70, 60, 0.25);
  color: var(--search-danger);
}

#pv-search-body.pv-searchRefresh .pv-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

#pv-search-body.pv-searchRefresh .pv-search-actions .ms-2 {
  margin-left: 0 !important;
}

#pv-search-body.pv-searchRefresh .pv-search-actions > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

#pv-search-body.pv-searchRefresh .pv-conditionFilterRow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  max-width: none;
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #3b3b46;
  border-radius: 0.8rem;
  background: #0c0c0f;
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter__summary {
  min-height: 2.7rem;
  min-width: 0;
  border: 0;
  border-radius: 0.8rem;
  background: #0c0c0f;
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter[open] .pv-conditionFilter__summary {
  background: var(--search-surface-raised);
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter[open] {
  border-color: #3b3b46;
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter__summary::after {
  color: var(--search-muted);
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter__menu {
  border-color: var(--search-line);
  border-radius: 0.8rem;
  background: var(--search-surface-dark);
  color: var(--search-text);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter__option {
  min-height: 2rem;
  color: var(--search-text);
  font-size: 0.82rem;
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter__option:hover {
  background: var(--search-surface-raised);
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter__option input {
  accent-color: var(--search-yellow);
}

#pv-search-body.pv-searchRefresh .pv-conditionFilter__tip {
  border-color: var(--search-line-strong);
  background: var(--search-surface-dark);
  color: var(--search-yellow);
}

#pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition > .form-label {
  margin-bottom: 0.25rem;
}

#pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition .pv-conditionFilterRow {
  width: 100%;
}

#pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition .pv-conditionFilter,
#pv-search-body.pv-searchRefresh #pv-search-form #pv-search-collection-context .form-select {
  box-sizing: border-box;
  height: 2.65rem;
  min-height: 2.65rem;
}

#pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition .pv-conditionFilter {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  position: relative;
  z-index: 2;
}

#pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition .pv-conditionFilter:not([open]) {
  height: 2.65rem;
}

#pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition .pv-conditionFilter[open] {
  z-index: 20;
}

#pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition .pv-conditionFilter__summary {
  box-sizing: border-box;
  height: calc(2.65rem - 2px);
  min-height: 0;
  display: flex;
  align-items: center;
}

#pv-search-body.pv-searchRefresh #pv-search-status {
  min-height: 1.4rem;
  margin-top: 0.9rem;
  color: var(--search-yellow);
  font-size: 0.86rem;
}

/* Results */
#pv-search-body.pv-searchRefresh #pv-search-results {
  margin: 1.6rem -0.15rem -0.15rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--search-line);
  border-radius: 0.95rem;
  background: var(--search-surface-dark);
}

#pv-search-body.pv-searchRefresh #pv-search-results > .pv-section__header {
  align-items: center;
  margin-bottom: 1rem;
}

#pv-search-body.pv-searchRefresh .pv-sortRow,
#pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div,
#pv-search-body.pv-searchRefresh .pv-trade__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

#pv-search-body.pv-searchRefresh .pv-sortSelect {
  width: auto;
  min-width: 8.25rem;
  min-height: 2.65rem;
}

#pv-search-body.pv-searchRefresh .pv-sortLabel {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  margin: 0;
}

#pv-search-body.pv-searchRefresh #pv-search-grid,
#pv-search-body.pv-searchRefresh #pv-favorites-grid,
#pv-search-body.pv-searchRefresh #pv-trade-grid {
  --bs-gutter-x: 0.9rem;
  --bs-gutter-y: 0.9rem;
}

#pv-search-body.pv-searchRefresh .pv-card {
  overflow: hidden;
  border: 1px solid var(--search-line);
  border-radius: 0.9rem;
  background: var(--search-surface);
  color: var(--search-text);
  box-shadow: none;
}

#pv-search-body.pv-searchRefresh .pv-card:hover {
  border-color: var(--search-line-strong);
  transform: translateY(-2px);
}

#pv-search-body.pv-searchRefresh .pv-card__imgLink {
  background: #050506;
}

#pv-search-body.pv-searchRefresh .pv-card__img {
  background: #050506;
  object-fit: contain;
}

#pv-search-body.pv-searchRefresh .pv-card__body {
  padding: 0.9rem;
  background: var(--search-surface);
}

#pv-search-body.pv-searchRefresh .pv-card__title,
#pv-search-body.pv-searchRefresh .pv-card__titleLink {
  color: var(--search-text);
  font-family: var(--search-body);
  font-weight: 700;
}

#pv-search-body.pv-searchRefresh .pv-card__titleLink:hover {
  color: var(--search-yellow);
}

#pv-search-body.pv-searchRefresh .pv-card__text,
#pv-search-body.pv-searchRefresh .pv-card__setName,
#pv-search-body.pv-searchRefresh .pv-card__rarity,
#pv-search-body.pv-searchRefresh .text-muted {
  color: var(--search-muted) !important;
}

#pv-search-body.pv-searchRefresh .pv-card__setName {
  color: #8ed8ff !important;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

#pv-search-body.pv-searchRefresh .pv-card__rarity {
  color: #f0f2f6 !important;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
}

#pv-search-body.pv-searchRefresh .pv-card__variant {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0.16rem 0.42rem;
  border-left: 2px solid var(--search-yellow);
  border-radius: 0 0.3rem 0.3rem 0;
  background: rgba(255, 203, 5, 0.09);
  color: var(--search-yellow) !important;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
}

#pv-search-body.pv-searchRefresh .pv-searchCol .pv-form__field > .form-label,
#pv-search-body.pv-searchRefresh .pv-favoritesCol .pv-form__field > .form-label {
  color: var(--search-yellow) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

#pv-search-body.pv-searchRefresh .pv-priceLine {
  border-color: var(--search-line);
  background: var(--search-surface-dark);
}

#pv-search-body.pv-searchRefresh .pv-priceLine__condition {
  color: var(--search-yellow);
}

#pv-search-body.pv-searchRefresh .pv-priceToken {
  border-color: var(--search-line);
  background: var(--search-surface-raised);
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-priceToken--market {
  border-color: rgba(255, 203, 5, 0.45);
}

@media (max-width: 640px) {
  #pv-search-body.pv-searchRefresh .pv-searchJumpNav {
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
  }

  #pv-search-body.pv-searchRefresh .pv-searchJumpNav a {
    flex: 0 1 7rem;
    min-width: 0;
    padding-right: 0.35rem;
    padding-left: 0.35rem;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-tradeCard__controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 0.6rem;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-tradeCard__variant:empty {
    display: none;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-tradeCard__condition,
  #pv-search-body.pv-searchRefresh #pv-trade .pv-tradeCard__variant {
    grid-column: 1;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-tradeCard__percent {
    grid-column: 2;
    justify-self: end;
    width: 100%;
  }
}

#pv-search-body.pv-searchRefresh .pv-priceToken__label,
#pv-search-body.pv-searchRefresh .pv-priceMessage {
  color: var(--search-muted);
}

#pv-search-body.pv-searchRefresh .pv-card__actions {
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top-color: var(--search-line);
}

#pv-search-body.pv-searchRefresh .pv-card__actions .btn,
#pv-search-body.pv-searchRefresh .pv-card__moreBtn {
  min-height: 2.55rem;
  border-color: var(--search-line-strong);
  border-radius: 0.6rem;
  background: var(--search-surface-raised);
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-card__actions .btn:hover,
#pv-search-body.pv-searchRefresh .pv-card__moreBtn:hover {
  border-color: var(--search-yellow);
  color: var(--search-yellow);
}

#pv-search-body.pv-searchRefresh .pv-card__actionsMenu {
  border-color: var(--search-line);
  border-radius: 0.75rem;
  background: var(--search-surface-dark);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

#pv-search-body.pv-searchRefresh .pv-loadMoreWrap {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

#pv-search-body.pv-searchRefresh .pv-collectionPagination {
  margin-block: 1rem;
}

#pv-search-body.pv-searchRefresh .pv-collectionPagination__inner {
  border-color: var(--search-line);
  background: var(--search-surface);
}

#pv-search-body.pv-searchRefresh .pv-collectionPagination__status,
#pv-search-body.pv-searchRefresh .pv-collectionPagination__pageLabel {
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh #pv-search-load-more {
  min-width: 11rem;
}

#pv-search-body.pv-searchRefresh .pv-quotaBanner {
  margin-bottom: 1rem;
  border: 1px solid #655509;
  border-radius: 0.8rem;
  background: rgba(57, 47, 11, 0.48);
  color: var(--search-text);
}

/* Trade and Watchlist */
#pv-search-body.pv-searchRefresh #pv-trade,
#pv-search-body.pv-searchRefresh #pv-favorites {
  scroll-margin-top: 6rem;
}

#pv-search-body.pv-searchRefresh .pv-trade__summary {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--search-line);
  border-radius: 0.85rem;
  background: var(--search-surface-dark);
}

#pv-search-body.pv-searchRefresh .pv-trade__remaining,
#pv-search-body.pv-searchRefresh .pv-tradeTotals__trade,
#pv-search-body.pv-searchRefresh .pv-tradeTotals__targetMet {
  color: var(--search-yellow);
}

#pv-search-body.pv-searchRefresh .pv-trade__goalDivider {
  border-color: var(--search-line);
  opacity: 1;
}

#pv-search-body.pv-searchRefresh .pv-tradeCard__remove {
  border-color: #77463c;
  background: rgba(119, 70, 60, 0.35);
  color: var(--search-danger);
}

#pv-search-body.pv-searchRefresh #pv-favorites .ms-2 {
  margin-left: 0 !important;
}

/* Footer */
#pv-search-body.pv-searchRefresh .pv-footer {
  border-top: 1px solid var(--search-line);
  background: #09090b;
  color: var(--search-muted);
}

#pv-search-body.pv-searchRefresh .pv-footer__inner {
  width: min(100% - 2rem, 72rem);
  max-width: none;
}

#pv-search-body.pv-searchRefresh .pv-footer__links {
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.85rem;
}

#pv-search-body.pv-searchRefresh .pv-footer a {
  color: var(--search-muted);
}

#pv-search-body.pv-searchRefresh .pv-footer a:hover {
  color: var(--search-text);
}

#pv-search-body.pv-searchRefresh .pv-scroll-top {
  border-color: var(--search-yellow);
  background: var(--search-yellow);
  color: var(--search-yellow-ink);
}

/* Accessible focus treatment */
#pv-search-body.pv-searchRefresh a:focus-visible,
#pv-search-body.pv-searchRefresh button:focus-visible,
#pv-search-body.pv-searchRefresh input:focus-visible,
#pv-search-body.pv-searchRefresh select:focus-visible,
#pv-search-body.pv-searchRefresh summary:focus-visible,
#pv-search-body.pv-searchRefresh [role="button"]:focus-visible {
  outline: 3px solid var(--search-yellow);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  #pv-search-body.pv-searchRefresh .pv-header,
  #pv-search-body.pv-searchRefresh .pv-header__inner {
    min-height: 5.6rem;
  }

  #pv-search-body.pv-searchRefresh .pv-searchHero {
    padding-top: clamp(1.25rem, 3vw, 2rem);
  }

  #pv-search-body.pv-searchRefresh .pv-searchPanel {
    padding: 1.6rem;
  }

  #pv-search-body.pv-searchRefresh .pv-searchPanel,
  #pv-search-body.pv-searchRefresh #pv-trade,
  #pv-search-body.pv-searchRefresh #pv-favorites {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.8rem;
    row-gap: 0.9rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--query,
  #pv-search-body.pv-searchRefresh #pv-search-form .pv-search-actions {
    grid-column: 1 / -1;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--series {
    grid-column: 1;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--set {
    grid-column: 2;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition {
    grid-column: 1;
    display: flex;
    align-items: flex-start;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition > .form-label,
  #pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context > .form-label {
    text-align: left;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context {
    grid-column: 2;
    align-self: start;
    justify-self: end;
    width: min(100%, 280px);
    max-width: 280px;
    height: max-content;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context .form-select {
    width: 100%;
    min-height: 2.65rem;
    height: 2.65rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context #pv-search-collection-select {
    width: 100%;
    max-width: none;
  }

  #pv-search-body.pv-searchRefresh .pv-searchField--query,
  #pv-search-body.pv-searchRefresh .pv-searchField--series,
  #pv-search-body.pv-searchRefresh .pv-searchField--set {
    width: auto;
    min-width: 0;
  }
}

@media (min-width: 992px) {
  #pv-search-body.pv-searchRefresh #pv-search-form {
    grid-template-columns: minmax(0, 440px) minmax(0, 240px) minmax(0, 1fr);
    column-gap: 0.7rem;
    row-gap: 0.78rem;
    justify-content: start;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--query {
    grid-column: auto;
    width: 100%;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--series,
  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--set {
    grid-column: auto;
    width: 240px;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context {
    grid-column: 3;
    width: 280px;
    max-width: 280px;
  }
}

@media (max-width: 767px) {
  #pv-search-body.pv-searchRefresh .pv-header__inner {
    width: min(100% - 2rem, 72rem);
  }

  #pv-search-body.pv-searchRefresh .pv-nav {
    border-top-color: var(--search-line);
    background: var(--search-bg);
  }

  #pv-search-body.pv-searchRefresh .pv-nav__link {
    min-height: 2.8rem;
    display: flex;
    align-items: center;
  }

  #pv-search-body.pv-searchRefresh .pv-searchHero {
    padding-top: clamp(1.25rem, 3vw, 2rem);
    padding-bottom: 1.8rem;
    text-align: left;
  }

  #pv-search-body.pv-searchRefresh .pv-searchHero__chips {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  #pv-search-body.pv-searchRefresh .pv-searchHero__chip {
    flex: 0 0 auto;
  }

  #pv-search-body.pv-searchRefresh .pv-conditionFilter {
    max-width: 100%;
  }

  #pv-search-body.pv-searchRefresh .pv-conditionFilter__tipText {
    top: calc(100% + 0.4rem);
    right: 0;
    left: auto;
    max-width: min(220px, calc(100vw - 2rem));
    transform: translateY(-4px);
  }

  #pv-search-body.pv-searchRefresh .pv-conditionFilter__tipText::before {
    display: none;
  }

  #pv-search-body.pv-searchRefresh .pv-conditionFilter__tip.is-open .pv-conditionFilter__tipText,
  #pv-search-body.pv-searchRefresh .pv-conditionFilter__tip:hover .pv-conditionFilter__tipText,
  #pv-search-body.pv-searchRefresh .pv-conditionFilter__tip:focus-within .pv-conditionFilter__tipText {
    transform: translateY(0);
  }

  #pv-search-body.pv-searchRefresh #pv-card-scanner-root .pv-cardScannerShell__summary {
    align-items: flex-start;
    padding: 0.75rem 0.85rem;
  }

  #pv-search-body.pv-searchRefresh #pv-card-scanner-root .pv-cardScannerShell__summaryTitle {
    min-width: 0;
    flex-wrap: wrap;
  }

  #pv-search-body.pv-searchRefresh #pv-card-scanner-root .pv-cardScannerShell__summaryAction {
    flex: 0 0 auto;
    font-size: 0.68rem;
  }

  #pv-search-body.pv-searchRefresh .pv-searchPanel__header,
  #pv-search-body.pv-searchRefresh #pv-trade > .pv-section__header,
  #pv-search-body.pv-searchRefresh #pv-favorites > .pv-section__header,
  #pv-search-body.pv-searchRefresh #pv-search-results > .pv-section__header {
    align-items: stretch;
    flex-direction: column;
  }

  #pv-search-body.pv-searchRefresh .pv-searchPanel__header {
    position: relative;
    display: block;
    min-height: 3.3rem;
  }

  #pv-search-body.pv-searchRefresh .pv-searchPanel__header > div {
    padding-right: 5.5rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-toggle,
  #pv-search-body.pv-searchRefresh #pv-trade-toggle,
  #pv-search-body.pv-searchRefresh #pv-trade-clear {
    width: auto;
    min-width: 4.75rem;
    align-self: flex-start;
  }

  #pv-search-body.pv-searchRefresh #pv-search-toggle {
    position: absolute;
    top: 0;
    right: 0;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.65rem;
    row-gap: 0.9rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--query,
  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--series,
  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--set,
  #pv-search-body.pv-searchRefresh #pv-search-form .pv-search-actions {
    grid-column: 1 / -1;
  }

  #pv-search-body.pv-searchRefresh .pv-searchFieldHeader {
    width: 100%;
    justify-content: space-between;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition {
    grid-column: 1;
    display: flex;
    align-items: center;
    min-width: 0;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition > .form-label,
  #pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context > .form-label {
    width: 100%;
    text-align: center;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition .pv-conditionFilterRow {
    min-width: 0;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-searchField--condition .pv-conditionFilter {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context {
    grid-column: 2;
    align-self: end;
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form > #pv-search-collection-context .form-select {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  #pv-search-body.pv-searchRefresh #pv-search-form .pv-search-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
  }

  #pv-search-body.pv-searchRefresh .pv-search-actions .btn {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    padding-right: 0.78rem;
    padding-left: 0.78rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-status {
    margin-top: 1.35rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-results {
    margin-top: 1.2rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-results > .pv-section__header {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.65rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-results > .pv-section__header .pv-section__title {
    min-width: 0;
    flex: 1 1 auto;
  }

  #pv-search-body.pv-searchRefresh #pv-search-sort {
    align-self: flex-start;
    width: 10rem;
    max-width: 10rem;
    flex: 0 1 10rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-sort .form-select {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 0 1 auto;
  }

  #pv-search-body.pv-searchRefresh .pv-sortRow,
  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div,
  #pv-search-body.pv-searchRefresh .pv-trade__controls {
    width: 100%;
    align-items: stretch;
  }

  #pv-search-body.pv-searchRefresh .pv-sortRow .form-select,
  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div .form-select {
    width: 0;
    min-width: 0;
    max-width: none;
    flex: 1 1 0;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div {
    min-height: 2.65rem;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div > .pv-sortLabel {
    display: none;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div .btn {
    flex: 0 0 auto;
    width: 4.5rem;
    min-width: 4.5rem;
    padding-right: 0.35rem;
    padding-left: 0.35rem;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-trade__controls {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-trade__controls .pv-trade__bulk {
    width: auto;
    max-width: 100%;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-trade__controls > .btn {
    width: auto;
    min-width: 4.75rem;
    flex: 0 0 auto;
  }

  #pv-search-body.pv-searchRefresh #pv-trade > .pv-section__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: start;
    gap: 0.45rem;
  }

  #pv-search-body.pv-searchRefresh #pv-trade > .pv-section__header > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-trade__controls {
    display: contents;
  }

  #pv-search-body.pv-searchRefresh #pv-trade #pv-trade-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  #pv-search-body.pv-searchRefresh #pv-trade #pv-trade-clear {
    grid-column: 3;
    grid-row: 1;
  }

  #pv-search-body.pv-searchRefresh #pv-trade .pv-trade__bulk {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites > .pv-section__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 0.45rem;
    row-gap: 1.8rem;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites > .pv-section__header > h2 {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div {
    display: contents;
    grid-row: 1;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div > .pv-sortLabel {
    display: none;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div .form-select {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-self: end;
    width: 168px;
    min-width: 112px;
    max-width: 168px;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites .pv-section__header > div .btn {
    width: auto;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites #pv-favorites-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  #pv-search-body.pv-searchRefresh #pv-favorites #pv-favorites-clear {
    grid-column: 3;
    grid-row: 1;
  }


@media (max-width: 575.98px) {
  #pv-search-body.pv-searchRefresh #pv-search-results {
    width: calc(100% + 1.8rem);
    margin-right: -0.9rem;
    margin-left: -0.9rem;
    padding: 0.9rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-grid > .pv-searchCol {
    grid-column: span 6;
    width: 100%;
    max-width: none;
  }

  #pv-search-body.pv-searchRefresh #pv-search-grid > .pv-searchCol > .pv-card {
    width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 767px) {
  #pv-search-body.pv-searchRefresh #pv-trade .pv-trade__controls .pv-trade__bulk {
    flex: 1 1 auto;
  }
}
  #pv-search-body.pv-searchRefresh .pv-trade__bulk,
  #pv-search-body.pv-searchRefresh .pv-trade__bulkActions {
    width: 100%;
  }
}

@media (max-width: 420px) {
  #pv-search-body.pv-searchRefresh .container,
  #pv-search-body.pv-searchRefresh .pv-header__inner,
  #pv-search-body.pv-searchRefresh .pv-footer__inner {
    width: min(100% - 1.5rem, 72rem);
  }

  #pv-search-body.pv-searchRefresh .pv-searchHero .pv-hero__title {
    font-size: 2rem;
  }

  #pv-search-body.pv-searchRefresh .pv-searchPanel,
  #pv-search-body.pv-searchRefresh #pv-trade,
  #pv-search-body.pv-searchRefresh #pv-favorites {
    padding: 0.9rem;
    border-radius: 1rem;
  }

  #pv-search-body.pv-searchRefresh #pv-search-results {
    padding: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #pv-search-body.pv-searchRefresh *,
  #pv-search-body.pv-searchRefresh *::before,
  #pv-search-body.pv-searchRefresh *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

#pv-search-body.pv-searchRefresh #pv-search-submit,
#pv-search-body.pv-searchRefresh #pv-search-toggle,
#pv-search-body.pv-searchRefresh #pv-trade-toggle,
#pv-search-body.pv-searchRefresh #pv-favorites-toggle,
#pv-search-body.pv-searchRefresh #pv-clear-results,
#pv-search-body.pv-searchRefresh #pv-trade-clear,
#pv-search-body.pv-searchRefresh #pv-favorites-clear {
  box-sizing: border-box;
  width: 5.25rem !important;
  min-width: 5.25rem !important;
  max-width: 5.25rem !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 !important;
  font-size: 0.84rem !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}

#pv-search-body.pv-searchRefresh #pv-search-toggle,
#pv-search-body.pv-searchRefresh #pv-trade-toggle,
#pv-search-body.pv-searchRefresh #pv-favorites-toggle {
  border-color: #3f3f46;
  background: #18181b;
  color: #f4f4f5;
}

#pv-search-body.pv-searchRefresh #pv-search-toggle:hover,
#pv-search-body.pv-searchRefresh #pv-trade-toggle:hover,
#pv-search-body.pv-searchRefresh #pv-favorites-toggle:hover {
  border-color: #52525b;
  background: #27272a;
  color: #ffffff;
}

#pv-search-body.pv-searchRefresh #pv-clear-results,
#pv-search-body.pv-searchRefresh #pv-trade-clear,
#pv-search-body.pv-searchRefresh #pv-favorites-clear {
  border-color: #ef4444;
  background: #dc2626;
  color: #ffffff;
}

#pv-search-body.pv-searchRefresh #pv-clear-results:hover,
#pv-search-body.pv-searchRefresh #pv-trade-clear:hover,
#pv-search-body.pv-searchRefresh #pv-favorites-clear:hover {
  border-color: #f87171;
  background: #b91c1c;
  color: #ffffff;
}
