/*
 * Dash's own surfaces: the plot with the one money button docked to its
 * right, the bet button's face, the lime first-run card and its art, and
 * the provably-fair panel. The page layout is /core/layout.css; the shared
 * pieces (money buttons included) are /core/kit.css. Values follow
 * wisdom-games' Tailwind classes one for one.
 */

/* Dash's lime: the brand word and the menu */
:root {
  --accent-color: var(--success);
}

/* ---- the board: the plot with the money button docked to its right ---- */

/* the button's glow and hover lift reach past the board's edge */
.shell-board {
  overflow: visible;
}
.dash-row {
  position: absolute;
  inset: 0 0 14px 0;
  display: flex;
  align-items: stretch;
  gap: 10px;
}
/* the plot frame: the borderless card the walk lives in */
.dash-plot {
  position: relative;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.06));
}
.dash-chart {
  position: absolute;
  inset: 0;
}
.dash-action-col {
  display: flex;
  width: 178px;
  min-width: 0;
  flex: none;
  flex-direction: column;
}
.dash-action-col > button {
  min-height: 0;
  flex: 1;
}

/* the bet button's verb and its price */
.bet__verb {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.3px;
}
.bet__amount {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  opacity: 0.95;
}
/* centred ABOVE the label block: the column button is tall, and the lane
   above the text is free at every width */
.climb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 11px;
  margin: -64px 0 0 -9px;
  pointer-events: none;
}
.climb svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 11px;
  opacity: 0;
  animation: climb 1.65s linear infinite;
}
@keyframes climb {
  0% { transform: translateY(12px); opacity: 0; }
  35% { opacity: 0.9; }
  100% { transform: translateY(-14px); opacity: 0; }
}

/* the config sleeps while the ticket flies */
.stake-rack.is-asleep {
  pointer-events: none;
  opacity: 0.45;
  filter: saturate(0.65);
}

@media (max-width: 639.98px) {
  .dash-row {
    bottom: 10px;
  }
  .dash-action-col {
    width: 128px;
  }
  .bet__verb {
    font-size: 1.5rem;
  }
  .bet__amount {
    font-size: 11px;
  }
  .stake-rack {
    gap: 6px;
    margin-bottom: 10px;
  }
}

/* a phone on its side: the controls sit beside the board */
@media (orientation: landscape) and (max-height: 500px) {
  .dash-row {
    bottom: 0;
  }
  .stake-rack {
    margin-bottom: 0;
  }
}

/* ---- the first-run card in Dash's lime: ring, wash and Play button ---- */

.ftue__card {
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--success) 35%, transparent),
    0 24px 64px rgba(0, 0, 0, 0.55);
}
.ftue__card::before {
  background-image: linear-gradient(to bottom, color-mix(in oklab, var(--success) 18%, transparent), transparent);
}
.ftue__cta {
  background: var(--success);
  color: var(--success-foreground);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.ftue__cta:hover {
  background: var(--success-deep);
}
.ftue__cta:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 40%, transparent);
}

/* ---- the first-run art: miniatures of the game's own chrome ---- */

.art {
  display: flex;
  height: 96px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #141416;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.art__ticket {
  display: flex;
  width: 88%;
  height: 78%;
  gap: 6px;
}
.art__ticket-plot {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}
.art__ticket-plot > div {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 33.333333%;
  background: linear-gradient(to bottom, color-mix(in oklab, var(--success) 25%, transparent), transparent);
}
.art__ticket-btn {
  display: flex;
  width: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(to bottom right, var(--success), var(--success-deep));
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 800;
  color: var(--success-foreground);
}
.art__red {
  position: relative;
  width: 88%;
  height: 78%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}
.art__red-zone {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(to top, color-mix(in oklab, var(--destructive) 55%, transparent), transparent);
}
.art__red-line {
  position: absolute;
  inset-inline: 0;
  bottom: 40%;
  border-top: 1px dashed color-mix(in oklab, var(--destructive) 70%, transparent);
}
.art__target {
  display: flex;
  width: 72%;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(to bottom right, var(--success), var(--success-deep));
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 800;
  color: var(--success-foreground);
}

/* ---- the provably-fair panel ---- */

.fair {
  padding-bottom: 4px;
}
.fair__intro {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.625;
  color: #d7dae3;
}
.fair__wait {
  padding: 12px 14px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.625;
  color: var(--icon);
}
.fair__verdict {
  padding: 10px 14px;
  border: 1px solid;
  border-radius: var(--radius-xl);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.6px;
}
.fair__verdict.is-spaced {
  margin-bottom: 12px;
}
.fair__verdict.is-ok {
  border-color: color-mix(in oklab, var(--success) 35%, transparent);
  background: color-mix(in oklab, var(--success) 12%, transparent);
  color: var(--success);
}
.fair__verdict.is-bad {
  border-color: color-mix(in oklab, var(--destructive) 35%, transparent);
  background: color-mix(in oklab, var(--destructive) 12%, transparent);
  color: var(--destructive);
}
.fair__verdict.is-busy {
  border-color: color-mix(in oklab, var(--primary) 30%, transparent);
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  color: var(--primary-hover);
}
.fair__closed {
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--icon);
}
.fair-row {
  margin-bottom: 12px;
}
.fair__label {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--icon);
}
.fair-row__value {
  padding: 8px 10px;
  border: 1px solid color-mix(in oklab, var(--primary) 30%, transparent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--heading);
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
.fair-replay {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.fair-replay__cell {
  border: 1px solid color-mix(in oklab, var(--primary) 30%, transparent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 10px;
}
.fair-replay__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--icon);
}
.fair-replay__price {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
}
.fair__walk {
  font-size: 12px;
  color: var(--muted-foreground);
}
.fair__walk summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary-hover);
}
.fair__walk-line {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--icon);
}
.fair__walk-line:empty {
  display: none;
}
.fair__walk-params {
  margin-top: 6px;
}
.fair__scope {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--icon);
}
.fair__retry {
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--primary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-foreground);
}
.fair__retry:disabled {
  opacity: 0.6;
}
