/* Discount badges: proportions follow the percentage itself, capped at 18px.
   No price-dependent height calculations or JavaScript measurements.
   Store discounts are excluded. */
body :is(.discount, .egg-dlc-discount):not(.store-discount):not(.game-stores .discount):not(.egg-edition-stores .discount):not(.store-prices .discount) {
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  vertical-align:middle;
  flex:0 0 auto;
  justify-self:start;
  align-self:center;
  inline-size:max-content !important;
  min-inline-size:0 !important;
  block-size:clamp(13px, calc(var(--egg-discount-font, 11px) * 1.45), 18px) !important;
  min-block-size:0 !important;
  max-block-size:18px !important;
  margin:0 !important;
  padding:0 5px !important;
  border:0 !important;
  border-radius:4px !important;
  clip-path:none !important;
  background:var(--egg-discount-bg, var(--muted, #8A98C4)) !important;
  color:#111111 !important;
  font-family:Inter, sans-serif !important;
  font-size:var(--egg-discount-font, 11px) !important;
  font-style:normal;
  font-weight:800 !important;
  letter-spacing:-.04em;
  line-height:1 !important;
  text-align:center;
  text-decoration:none;
  text-shadow:none !important;
  white-space:nowrap;
  box-shadow:none !important;
  filter:none;
}
body :is(.discount, .egg-dlc-discount):not(.store-discount):not(.game-stores .discount):not(.egg-edition-stores .discount):not(.store-prices .discount)::before { content:none !important; }

/* Color comes from the rendered classification, including live replacements. */
[data-price-stage="incubating"], [data-dlc-stage="incubating"],
.game-card:has(.stage.incubating), .compact-game-card:has(.stage.incubating),
.egg-edition-product-card:has(.stage.incubating) { --egg-discount-bg:var(--incubating, #FF6B6B); }
[data-price-stage="cracking"], [data-price-stage="cracked"],
[data-dlc-stage="cracking"], [data-dlc-stage="cracked"],
.game-card:has(.stage.cracking), .compact-game-card:has(.stage.cracking),
.egg-edition-product-card:has(.stage.cracking) { --egg-discount-bg:var(--cracking, #7FA8FF); }
[data-price-stage="hatched"], [data-dlc-stage="hatched"],
.game-card:has(.stage.hatched), .compact-game-card:has(.stage.hatched),
.egg-edition-product-card:has(.stage.hatched) { --egg-discount-bg:var(--hatched, #3DDC97); }
[data-price-stage="cooked"], [data-dlc-stage="cooked"],
.game-card:has(.stage.cooked), .compact-game-card:has(.stage.cooked),
.egg-edition-product-card:has(.stage.cooked) { --egg-discount-bg:var(--cooked, #FF9A3D); }

/* Future predicted Hatched price uses the Hatched color, independent of the current stage. */
.deal-predicted, .eh-price-line { --egg-discount-bg:var(--hatched, #3DDC97); }


/* Badge dimensions are derived only from the percentage font size and capped at 18px.
   This keeps prices of all sizes from influencing the badge shape. */
body[data-page="game"] .game-summary .deal-current {
  --egg-discount-font:12px;
}
body[data-page="game"] .game-summary .deal-comparison {
  --egg-discount-font:11px;
}
.game-card, .compact-game-card, .egg-edition-product-card, .egg-wishlist-card {
  --egg-discount-font:11px;
}
.game-list .game-card:not(.compact-game-card) {
  --egg-discount-font:11px;
}
.egg-dlc-shell {
  --egg-discount-font:10px;
}
.egg-featured-hatched .eh-price-line {
  --egg-discount-font:11px;
}
@media(max-width:520px) {
  body[data-page="game"] .game-summary .deal-current {
    --egg-discount-font:12px;
  }
  body[data-page="game"] .game-summary .deal-comparison {
    --egg-discount-font:10px;
  }
  .game-card, .compact-game-card, .egg-edition-product-card, .egg-wishlist-card {
    --egg-discount-font:10px;
  }
  .egg-dlc-shell {
    --egg-discount-font:9px;
  }
  .egg-featured-hatched .eh-price-line {
    --egg-discount-font:10px;
  }
}
