/* Product sales: a percentage off for every buyer. Badges share the pill shape of
   the products list; the editor sits with the other sections of product settings. */
.sale-badge { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 8px; border-radius: 999px; background: #f0f0f0; color: #616161; font-size: 11px; font-weight: 550; line-height: 1.4; overflow-wrap: anywhere; }
.sale-badge.is-active { background: #dff2e7; color: #146c43; }
.sale-badge.is-scheduled { background: #e8f0fe; color: #1f5bb5; }
.sale-badge.is-ended { background: #f0f0f0; color: #616161; }

/* Products list: why buyers may not see a product, then its sale. */
.inventory-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.inventory-badges > .inventory-hidden { display: inline-flex; margin: 0; }

/* Product settings › Sale. */
.product-photo-heading > .sale-badge { font-size: 11px; }
.product-sale-section h3:focus { outline: none; }
.product-sale-section h3:focus-visible { outline: 2px solid #222; outline-offset: 2px; border-radius: 2px; }
.product-sale-intro { margin: -4px 0 14px; color: #666; font-size: 13px; line-height: 1.5; }
.product-sale-summary { display: grid; gap: 8px; margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: #f5f5f5; font-size: 13px; line-height: 1.45; }
.product-sale-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-width: 0; }
.product-sale-summary dt { flex: none; color: #666; }
.product-sale-summary dd { min-width: 0; margin: 0; color: #222; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.product-sale-percent { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); align-items: end; column-gap: 16px; min-width: 0; }
.product-sale-percent > p { margin: 0 0 12px; }
.product-sale-when { display: grid; gap: 7px; min-width: 0; }
.product-sale-when-label { color: #444; font-size: 13px; font-weight: 500; }
.product-sale-when-inputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9.5rem); gap: 8px; min-width: 0; }
.product-details-fields .product-sale-when-inputs input { padding-inline: 10px; }
.product-sale-help { margin: 0; color: #777; font-size: 11px; line-height: 1.5; }
.product-sale-zone { margin: 12px 0 0; color: #777; font-size: 11px; line-height: 1.5; }
.product-sale-section .product-details-actions { flex-wrap: wrap; }
.product-sale-section .text-button.danger { margin-right: auto; min-height: 44px; }
.product-sale-section .product-details-actions p + .text-button.danger { margin-right: 0; }

/* Company pricing: the sale that decides what the company pays. */
.pricing-list-price { margin-left: 6px; color: #8a8a8a; font-size: 12px; font-weight: 400; }
.pricing-rule.pricing-sale { margin-top: 6px; }
.pricing-sale-note { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: #eef7f1; color: #1d5a37; font-size: 13px; line-height: 1.5; }
.pricing-sale-note strong { font-weight: 600; }
.pricing-preview > p.pricing-preview-note { color: var(--muted); }

@media (max-width: 760px) {
  .inventory-badges { margin: 0 0 6px; }
}
@media (max-width: 520px) {
  .product-sale-percent { grid-template-columns: minmax(0, 1fr); row-gap: 7px; }
  .product-sale-percent > p { margin: 0; }
  .product-sale-when-inputs { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .product-details-fields .product-sale-when-inputs input { padding-inline: 8px; }
}
@media (max-width: 360px) {
  .product-sale-when-inputs { grid-template-columns: minmax(0, 1fr); }
}
