/*
 * A Twin Haul, rook complex or terminator not yet unlocked must never look orderable,
 * whatever the player's energy: the card goes grey and hatched behind a dashed
 * edge, and its price shows a padlock in place of the energy mark. Its tag
 * counts the harvest toward the unlock (Locked 300/1700).
 * Once the harvest is in (data-locked='ready'), the edge turns amber: only the
 * Terminal purchase is left. Nothing here changes the card's size.
 */
.card[data-locked='true'],
.card[data-locked='ready'] {
  border-style: dashed;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 6px,
    rgb(255 255 255 / 0.035) 6px 12px
  );
}

.card[data-locked='ready'] {
  border-color: var(--warn);
  /* Ready: the grey stripes turn a faint wash of the player's own color (the owner, 2026-12-04). */
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--mine, #ffffff) 5%, transparent) 0 6px,
    color-mix(in srgb, var(--mine, #ffffff) 16%, transparent) 6px 12px
  );
}

.card[data-locked='true'] .card__name,
.card[data-locked='true'] .card__key,
.card[data-locked='ready'] .card__name,
.card[data-locked='ready'] .card__key {
  color: var(--text-dim);
}

/* The price stays readable, but grey, with a padlock instead of the energy dot. */
.card[data-locked='true'] .card__cost,
.card[data-locked='ready'] .card__cost {
  color: var(--text-dim);
}

.card[data-locked='true'] .card__cost::before,
.card[data-locked='ready'] .card__cost::before {
  width: 0.6rem;
  height: 0.7rem;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: var(--padlock) center / contain no-repeat;
  mask: var(--padlock) center / contain no-repeat;
}

.card[data-locked='true'] .card__tally,
.card[data-locked='ready'] .card__tally {
  color: var(--warn);
}

.card[data-locked='true'] .card__pick,
.card[data-locked='ready'] .card__pick {
  cursor: help;
}

:root {
  --padlock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath d='M3 6V4a3 3 0 0 1 6 0v2h1a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1.5 0h3V4a1.5 1.5 0 0 0-3 0z'/%3E%3C/svg%3E");
}

/*
 * A limited unit at its limit (the carrier: one at a time) must not look
 * orderable either: the card dims, its price goes grey, and its "1/1 max"
 * tally turns amber.
 */
.card[data-full='true'] .card__name,
.card[data-full='true'] .card__key,
.card[data-full='true'] .card__cost {
  color: var(--text-dim);
}

.card[data-full='true'] .card__cost::before {
  background: var(--text-dim);
}

.card[data-full='true'] .card__tally {
  color: var(--warn);
  font-weight: 700;
}

/* Ready and affordable: the unlock price lights up, since a click buys it. */
.card[data-locked='ready'][data-affordable='true'] .card__cost {
  color: var(--node);
}
