/*
 * BoardGameDrop brand components: the tilted tile, reused.
 * Needs tokens.css. The tile is always coral and always at var(--tilt);
 * there is never more than one tilted element in view at a time per card.
 */

/* ── Deal badge ─────────────────────────────────────────────────────────
   <span class="bgd-deal"><span>−22%</span></span>
   A coral tile tipped 15deg; the label is turned back upright so it reads
   level. White on coral is 3.6:1, so the label stays at >= 19px bold
   (WCAG large text). The --sm size switches to --coral-deep for AA. */
.bgd-deal {
  --deal-size: 60px;
  display: inline-grid;
  place-items: center;
  inline-size: var(--deal-size);
  block-size: var(--deal-size);
  border-radius: var(--tile-radius);
  background: var(--coral);
  color: var(--on-coral);
  transform: rotate(var(--tilt));
  box-shadow: var(--shadow-tile);
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: var(--fw-display);
  font-size: 19px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.bgd-deal > span {
  transform: rotate(calc(var(--tilt) * -1));
}
.bgd-deal--lg {
  --deal-size: 88px;
  font-size: 26px;
}
.bgd-deal--sm {
  --deal-size: 40px;
  font-size: 13px;
  background: var(--coral-deep);
  box-shadow: none;
}
/* Sits on a product image: top-left, nudged out so it overlaps the edge. */
.bgd-deal--corner {
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
}

/* ── Bullet ─────────────────────────────────────────────────────────────
   <ul class="bgd-bullets"><li>…</li></ul> */
.bgd-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bgd-bullets > li {
  position: relative;
  padding-inline-start: 1.5em;
}
.bgd-bullets > li + li {
  margin-block-start: var(--space-2);
}
.bgd-bullets > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.2em;
  inset-block-start: 0.5em;
  inline-size: 0.5em;
  block-size: 0.5em;
  border-radius: var(--tile-radius);
  background: var(--coral);
  transform: rotate(var(--tilt));
}

/* ── Inline marker (e.g. "Laagste prijs in 90 dagen") ──────────────────── */
.bgd-flag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--coral-deep);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
}
.bgd-flag::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border-radius: 2px;
  background: var(--coral);
  transform: rotate(var(--tilt));
}

/* ── Chart marker ───────────────────────────────────────────────────────
   The lowest point of a price history. Place it absolutely at the point,
   or use svg/chart-marker.svg inside the chart SVG.
   <span class="bgd-marker" style="left:92%;top:88%"></span> */
.bgd-marker {
  position: absolute;
  inline-size: 11px;
  block-size: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 3px;
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--paper-card);
  transform: rotate(var(--tilt));
}
.bgd-chart {
  position: relative;
}
.bgd-chart svg {
  display: block;
}
.bgd-chart .line {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.bgd-chart .area {
  fill: var(--coral-tint);
}

/* ── Loading state: the tile tips, drops and settles ─────────────────── */
.bgd-loader {
  inline-size: 16px;
  block-size: 16px;
  border-radius: var(--tile-radius);
  background: var(--coral);
  animation: bgd-tip 900ms var(--ease) infinite alternate;
}
@keyframes bgd-tip {
  from { transform: translateY(-4px) rotate(0deg); }
  to { transform: translateY(2px) rotate(var(--tilt)); }
}
@media (prefers-reduced-motion: reduce) {
  .bgd-loader {
    animation: none;
    transform: rotate(var(--tilt));
  }
}
