/* Liner Notes unlock progress (assets/js/wrapped-unlock.js): a card, a chip for the game bar,
   a line under a finished round, and a tag on the games list. Styled like the rest of the
   site: thin rules, an eyebrow, a slim meter and underlined text links; no panels or pills. */

.wrapped-unlock {
  box-sizing: border-box;
  margin: 0 0 1.5rem;
  padding: 0.9rem 0 1rem;
  border-top: 1px solid var(--color-border-strong);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-align: left;
}

/* On the minigames page the list's own top rule closes the card, and while Liner Notes are
   locked its "Play …" links would repeat the list right below, so they are left out. */
.games-unlock.wrapped-unlock {
  margin-bottom: 0;
  border-bottom: 0;
}

.games-unlock[data-state="locked"] .wrapped-unlock-actions {
  display: none;
}

.wrapped-unlock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.wrapped-unlock-eyebrow,
.wrapped-unlock-count {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wrapped-unlock-count {
  flex: none;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.wrapped-unlock-count strong {
  color: var(--color-text);
}

.wrapped-unlock .wrapped-unlock-title {
  margin: 0.3rem 0 0.6rem;
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.3;
}

.wrapped-unlock-meter {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 3px;
}

.wrapped-unlock-meter > span {
  height: 4px;
  background: var(--color-border);
}

.wrapped-unlock-meter > span.is-filled {
  background: var(--color-primary);
}

.wrapped-unlock-why,
.wrapped-unlock-note {
  margin: 0.7rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.wrapped-unlock-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.25rem;
  margin: 0.8rem 0 0;
}

/* The first link is the one to follow, so it is bold; both are plain underlined links. */
.wrapped-unlock-actions .wrapped-unlock-primary {
  font-weight: 700;
}

/* The chip in a game's top bar: small text, not a pill. */
.wrapped-unlock-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
}

.wrapped-unlock-chip:hover {
  color: var(--color-text);
}

.wrapped-unlock-chip[data-state="unlocked"] {
  color: var(--link-internal);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.wrapped-unlock-chip-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wrapped-unlock-meter.is-mini {
  gap: 2px;
}

.wrapped-unlock-meter.is-mini > span {
  width: 5px;
  height: 4px;
}

.wrapped-unlock-chip.is-just-unlocked {
  animation: wrapped-unlock-arrive 0.5s ease-out;
}

/* The line under a finished round. */
.wrapped-unlock-moment {
  margin: 0.6rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.wrapped-unlock-moment.is-unlocked {
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-primary);
  color: var(--color-text);
  animation: wrapped-unlock-arrive 0.5s ease-out;
}

/* The status beside a list entry. */
.wrapped-unlock-tag {
  margin-left: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.wrapped-unlock-tag[data-state="unlocked"] {
  color: var(--color-primary-strong);
}

@keyframes wrapped-unlock-arrive {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wrapped-unlock-chip.is-just-unlocked,
  .wrapped-unlock-moment.is-unlocked {
    animation: none;
  }
}

/* The ballot page is a wide workspace; keep the card at reading width. */
.records-unlock {
  max-width: 720px;
}

.match-side .wrapped-unlock-moment {
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .wrapped-unlock-chip .wrapped-unlock-meter {
    display: none;
  }
}
