/* "Te winnen" block (shared/prizes.js). Themeable per page or game through custom properties on
   the container or an ancestor; every one has a fallback derived from the surrounding text colour,
   so it reads on light and dark backgrounds without any setting.

     --prizes-fg           text colour                       (default: inherited)
     --prizes-muted        shop names, intro text            (default: 70% of the text colour)
     --prizes-chip-bg      chip background                   (default: 8% of the text colour)
     --prizes-chip-border  chip outline                      (default: 22% of the text colour)
     --prizes-accent       link, badge outline, focus ring   (default: the text colour)
     --prizes-logo-bg      circle behind a shop logo         (default: white)
*/

.prizes {
  color: var(--prizes-fg, inherit);
  font: inherit;
  line-height: 1.4;
}

.prizes[hidden] { display: none; }

.prizes-kind + .prizes-kind { margin-top: 20px; }

.prizes-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.prizes-intro {
  margin: 2px 0 10px;
  font-size: 14px;
  color: var(--prizes-muted, color-mix(in srgb, currentColor 70%, transparent));
}

.prizes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prizes-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  padding: 6px 14px 6px 6px;
  border-radius: 18px;
  background: var(--prizes-chip-bg, color-mix(in srgb, currentColor 8%, transparent));
  box-shadow: inset 0 0 0 1px var(--prizes-chip-border, color-mix(in srgb, currentColor 22%, transparent));
}

.prizes-logo {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--prizes-logo-bg, #fff);
}

.prizes-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* No logo: the shop's first letter on a neutral circle. */
.prizes-logo--letter {
  background: color-mix(in srgb, currentColor 16%, transparent);
  color: inherit;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}

/* No image: the offer's emoji, centred in the same circle as the logo. */
.prizes-logo--emoji {
  font-size: 20px;
  line-height: 1;
  user-select: none;
}

.prizes-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.prizes-offer {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.prizes-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
}

.prizes-shop {
  font-size: 12px;
  line-height: 1.3;
  color: var(--prizes-muted, color-mix(in srgb, currentColor 70%, transparent));
  overflow-wrap: anywhere;
}

.prizes-badge {
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--prizes-accent, currentColor);
}

/* Sold out: logo and chip dimmed, the name in the muted colour; the badge keeps full contrast. */
.prizes-chip.is-soldout { background: transparent; }
.prizes-chip.is-soldout .prizes-logo { opacity: 0.5; filter: grayscale(1); }
.prizes-chip.is-soldout .prizes-offer { color: var(--prizes-muted, color-mix(in srgb, currentColor 70%, transparent)); }

.prizes-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--prizes-accent, inherit);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prizes-link:focus-visible {
  outline: 3px solid var(--prizes-accent, currentColor);
  outline-offset: 2px;
  border-radius: 2px;
}
