/* Public price colors: display only; amounts and commercial rules stay in their owners.
   Layered important rules outrank legacy page styles; dark bundle comparisons use explicit readable sizing. */
@layer mp-public-price-colors {
  /* New amount-only wrappers inherit their surrounding typography. */
  .mp-price-current {
    display: inline !important;
    font: inherit !important;
  }

  /* Standalone selling prices, calculator results and public purchase summaries. */
  .mp-price-current,
  .home-product-price,
  .home-page .accessory-card > div > strong,
  #catalog .pp,
  #catalog .price,
  #catalog .auto-price,
  #catalog .ten-price,
  #catalog .component-price,
  .mp-discount-price,
  .mp-discount-detail-price,
  .product-price,
  .product-ex > b,
  .auto-product-price,
  .ten-product-price,
  .mp-bundle-price,
  .bundle-any-total > strong,
  .mp-bundle-strip-price > strong,
  .mp-related-bundle-price > strong,
  .bundle-card-prices > strong,
  .project-price,
  .about-price > strong,
  .engineering-cta-price,
  .modular-increment-price > strong,
  .proof-body > strong,
  .mp-kit-panel-price > b,
  .mp-kit-price,
  .mp-kit-summary [data-kit-total],
  #calc #growth :is(#ext1, #ext2, #ext3, #ext4),
  #calc #price,
  #calc #price :is(span, b, strong),
  body.mp-category-page :is(
    #neighborSmallerPrice,
    #neighborCurrentPrice,
    #neighborLargerPrice,
    #customPrice,
    #customSerialPrice,
    #selPrice,
    #cameraCustomPrice,
    #cameraCustomSerialPrice,
    #autoRecPrice,
    #tenResultPrice
  ),
  body.mp-category-page :is(
    #neighborSmallerPrice,
    #neighborCurrentPrice,
    #neighborLargerPrice,
    #customPrice,
    #customSerialPrice,
    #selPrice,
    #cameraCustomPrice,
    #cameraCustomSerialPrice,
    #autoRecPrice,
    #tenResultPrice
  ) :is(span, b, strong),
  .mp-cart-line-price,
  .mp-cart-total > span:last-child,
  #mpUnifiedCartV78 .mp-cart-price-breakdown > div:first-child > b,
  #mpUnifiedCartV78 .mp-cart-price-breakdown > div.saving > b,
  .mp-order-price,
  #mpOrderTotal {
    color: #15803d !important;
  }

  /* Existing comparison amounts keep their existing strike-through semantics. */
  .mp-before-discount,
  .bundle-any-result del#anyBundleBase,
  .mp-bundle-old,
  .mp-bundle-old > span,
  .mp-bundle-strip-price > small,
  .mp-related-bundle-price > del,
  .bundle-card-prices > del {
    color: #b91c1c !important;
    text-decoration-color: #b91c1c !important;
  }

  /* The calculated-price explanation is a label, not a selling amount. */
  .mp-reference-price-label {
    color: #626872 !important;
  }

  /* These existing surfaces are dark; brighter tones retain readable contrast. */
  .mp-bundle-pricebox .mp-bundle-price,
  .mp-bundle-pricebox .mp-price-current,
  .mp-kit-summary [data-kit-total],
  .mp-kit-summary .mp-price-current,
  .engineering-actions .btn.primary .engineering-cta-price {
    color: #62d49a !important;
  }

  /* Separate the neutral label from the prominent red comparison amount. */
  .mp-bundle-pricebox .mp-bundle-old {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    margin: 8px 0 6px !important;
    color: #e0e5ed !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  .mp-bundle-pricebox .mp-bundle-old > span {
    color: #ffb4ab !important;
    text-decoration-color: #ffb4ab !important;
    font-size: 20px !important;
    line-height: 1.3 !important;
    text-decoration-thickness: 1px !important;
    white-space: nowrap !important;
  }

  /* Keep the larger comparison amount within the compact mobile offer. */
  @media (max-width: 640px) {
    .mp-bundle-pricebox .mp-bundle-old {
      flex-direction: row !important;
      flex-wrap: wrap !important;
      align-items: baseline !important;
      gap: 8px !important;
      margin: 4px 0 2px !important;
    }
  }
}

/* Keep these weights in the established typography layer: its inherited
   important baseline outranks a later component layer. Scope is this home offer. */
@layer mp-public-type-system {
  :root body.home-page #bundle-offer .mp-bundle-old {
    font-weight: 500 !important;
  }
  :root body.home-page #bundle-offer .mp-bundle-old > #anyBundleBase {
    font-weight: 700 !important;
  }
}
