/*
 * The board furniture: the previous rolls strip with its running count, the
 * bet amount bar, and the site footer.
 *
 * Same shape as the game this borrows its rhythm from, in this project's own
 * colours: the rolls sit under the wheel, the amount bar under those, and the
 * three boxes under that.
 */

/* ------------------------------------------------------- previous rolls */

.rolls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 0 4px;
  min-height: 34px;
}

.rolls-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  white-space: nowrap;
}

.rolls-label.tail {
  margin-left: auto;
}

.rolls-list {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  mask-image: linear-gradient(90deg, #000 78%, transparent);
}

/*
 * A previous roll is the same coin as the reel, smaller and dimmed. The dice
 * keeps its gold ring, because at once in fifteen it is the one worth
 * spotting in a row of nine.
 */
.roll {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, var(--tint-soft, #16305c), var(--tint-deep, #0a1a33));
  border: 1.5px solid var(--tint-edge, var(--line-2));
  opacity: 0.55;
  overflow: hidden;
}

.roll img,
.roll svg {
  width: 74%;
  height: 74%;
  object-fit: contain;
}

.roll.solana {
  --tint-soft: #17492c;
  --tint-deep: #0b2517;
  --tint-edge: #1f7a45;
  color: var(--solana);
}

.roll.robinhood {
  --tint-soft: #16305c;
  --tint-deep: #0a1a33;
  --tint-edge: #2a5fb0;
  color: var(--robinhood);
}

.roll.dice {
  --tint-soft: #4a3611;
  --tint-deep: #261b07;
  --tint-edge: #d09a2c;
  color: var(--gold);
  opacity: 0.95;
}

.roll.void {
  opacity: 0.3;
}

/* The running tally of the last hundred, one entry per side. */
.roll-counts {
  display: flex;
  align-items: center;
  gap: 12px;
}

.count {
  display: flex;
  align-items: center;
  gap: 6px;
}

.count-coin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, var(--tint-soft, #16305c), var(--tint-deep, #0a1a33));
  border: 1.5px solid var(--tint-edge, var(--line-2));
}

.count-coin img,
.count-coin svg {
  width: 74%;
  height: 74%;
  object-fit: contain;
}

.count.solana .count-coin {
  --tint-soft: #17492c;
  --tint-deep: #0b2517;
  --tint-edge: #1f7a45;
  color: var(--solana);
}

.count.robinhood .count-coin {
  --tint-soft: #16305c;
  --tint-deep: #0a1a33;
  --tint-edge: #2a5fb0;
  color: var(--robinhood);
}

.count.dice .count-coin {
  --tint-soft: #4a3611;
  --tint-deep: #261b07;
  --tint-edge: #d09a2c;
  color: var(--gold);
}

.count-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

/* ------------------------------------------------------- bet amount bar */

.betbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.bet-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  height: 42px;
  padding: 0 8px 0 12px;
  background: var(--bg-deep);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}

.bet-input:focus-within {
  border-color: var(--gold-dark);
}

/*
 * The unit the field counts in, which is ether and should look like it.
 *
 * The octahedron is drawn here in the proportions everyone knows, in two
 * tones so the near faces read against the far ones. It was a gold disc
 * before, which said "chips" rather than "ETH". Drop a file at
 * public/emblems/eth.svg and that is used instead.
 */
.bet-coin {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 50% 30%, #1d2a44, #0a1120);
  border: 1px solid #2c3f66;
  color: #a9bdf5;
}

.bet-coin svg {
  width: 15px;
  height: 15px;
}

.bet-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.bet-input input::placeholder {
  font-family: var(--sans);
  color: var(--text-faint);
}

.bet-clear {
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 8px;
  cursor: pointer;
}

.bet-clear:hover {
  color: var(--text);
}

.bet-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.button.step {
  height: 42px;
  min-width: 58px;
  padding: 0 12px;
  background: var(--bg-deep);
  border-color: var(--line);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.button.step:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--line-2);
  filter: none;
  background: #121c2f;
}

.betbar-hint {
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 16px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.footer-links h4 {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  cursor: pointer;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}

.footer-legal {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 28px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-legal p {
  margin: 0;
  max-inline-size: 90ch;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-faint);
}

.footer-copy {
  color: var(--text-faint);
  opacity: 0.8;
}

@media (max-width: 860px) {
  .rolls {
    flex-wrap: wrap;
    gap: 8px;
  }

  .rolls-label.tail {
    margin-left: 0;
  }

  .rolls-list {
    order: 3;
    width: 100%;
    flex: none;
  }

  .bet-steps {
    width: 100%;
  }

  .button.step {
    flex: 1;
    min-width: 0;
  }
}

/*
 * Real artwork carries its own coin.
 *
 * The supplied emblems are finished coins, ring and all, so wherever one is
 * present the container drops its own background and border and simply frames
 * the image. The drawn fallbacks still sit inside the painted coin.
 */
.coin:has(.emblem),
.roll:has(.emblem),
.count-coin:has(.emblem),
.box-coin:has(.emblem) {
  background: none;
  border-color: transparent;
  box-shadow: none;
}

.coin:has(.emblem) .emblem {
  width: 100%;
  height: 100%;
}

.roll:has(.emblem) img,
.count-coin:has(.emblem) img {
  width: 100%;
  height: 100%;
}

.box-coin:has(.emblem) .emblem {
  width: 100%;
  height: 100%;
}
