/* KRS UI: labels, owned marks and prices for the WHOLE site, in one place (owner 26/11/2026: "phai ap dung chung", no more piecemeal fixes).
   Loaded last on every page. To change a look, change a token below; every page and every card follows.
   Rules (docs/admin/web/UI_LABELS_AND_PRICES.md):
   1. A label is a small chip: Free, Sale, "21 plugins", "Pick 3", "You own 2 of 5". Same size and shape everywhere; normal case.
      Neutral chip = pale; Sale chip = muted red and only says "Sale" (the percentage is in the tooltip).
   2. On a picture, chips sit at the top left.
   3. Owned is plain black text, no box. Only on a picture (where plain text cannot be read) it uses the neutral chip.
   4. A sale price is dark red and bigger; the list price sits beside it in pale grey, smaller, struck through. */
:root{
  --krs-chip-bg:#e4e6d6; --krs-chip-fg:#2b2a27;
  --krs-sale-bg:#b8484a; --krs-sale-fg:#ffffff;
  --krs-owned-fg:#141413;
  --krs-price-fg:#141413; --krs-price-sale:#9f1c1c; --krs-price-was:#b5b0a5;
  --krs-chip-font:12.5px; --krs-chip-pad:4px 10px; --krs-chip-radius:3px;
}

/* 1. Chips */
html body :is(.corner-tag-free,.corner-tag-sale,.home-badge,.kcard-chip,.pk-owned,.account-plugin-badge,.detail-tag,.news-type-badge){
  display:inline-block;padding:var(--krs-chip-pad);border:0;border-radius:var(--krs-chip-radius);
  background:var(--krs-chip-bg);color:var(--krs-chip-fg);
  font-family:Inter,system-ui,sans-serif;font-size:var(--krs-chip-font);font-weight:600;line-height:1.2;letter-spacing:0;text-transform:none;box-shadow:none}
html body :is(.corner-tag-sale,.home-badge.is-sale,.kcard-chip.is-sale,.detail-tag.is-sale){background:var(--krs-sale-bg);color:var(--krs-sale-fg)}

/* 2. Chips on a picture: top left */
html body :is(.corner-tag-free,.corner-tag-sale){position:absolute;top:10px;left:10px;right:auto}
html body .artwork-large :is(.corner-tag-free,.corner-tag-sale){top:16px;left:16px;padding:6px 13px;font-size:15px}
html body .home-badges{top:10px;left:10px;right:auto}
html body .kcard-chips{top:8px;left:8px;right:auto}

/* 3. Owned: plain text (buttons, lists, bundle pages, the Pick chooser, the account page) */
html body :is(.add-button.is-owned,.add-button.is-owned:disabled,.add-button.is-owned:hover){
  background:transparent;border-color:transparent;color:var(--krs-owned-fg);padding-inline:0;box-shadow:none;opacity:1;cursor:default}
html body :is(.bundle-owned,.pk-owned){padding:0;background:transparent;color:var(--krs-owned-fg);font-weight:600}
html body .bundle-owned.is-part{color:var(--krs-chip-fg);font-weight:500}
html body .account-plugin-card[data-state="owned"] .account-plugin-badge{padding:0;background:transparent;color:var(--krs-owned-fg)}
/* on a picture (bundle cards) Owned and "You own N of M" keep the neutral chip so they can be read */
html body :is(.kcard-chip.is-owned,.kcard-chip.is-part){background:var(--krs-chip-bg);color:var(--krs-chip-fg)}

/* 4. Prices */
html body :is(.sale-price,.kcard-price.is-sale,.home-card-price.is-sale){color:var(--krs-price-sale);font-weight:700}
html body :is(.list-price,.kcard-price s,.home-card-price s,.pk-price s){color:var(--krs-price-was);text-decoration:line-through;font-weight:400;opacity:1}
html body :is(.product-card,.cart-row) .sale-price,html body .home-card .home-card-price.is-sale{font-size:17px;line-height:1.2}
html body :is(.product-card,.cart-row) .list-price,html body .home-card .home-card-price s{font-size:11.5px;margin-left:5px}
html body .kcard .kcard-price.is-sale{font-size:21px}
html body .kcard .kcard-price s{font-size:12px;margin-left:6px}
html body .detail-preview-price .sale-price{font-size:22px}
html body .detail-preview-price .list-price{font-size:13px;margin-left:6px}
html body .sale-ends{display:block;color:var(--krs-price-was);font-size:12px;font-weight:400;opacity:1}
