/* Final betting panel balance and premium action buttons. */

.device.is-playing .bet-dock {
  --bet-panel-gap: clamp(6px, 0.75vh, 10px);
  --bet-panel-pad: clamp(13px, 1.15vw, 20px);
}

.device.is-playing .bet-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 3px auto auto auto auto auto;
  align-content: center;
  gap: var(--bet-panel-gap);
  padding: var(--bet-panel-pad);
}

.device.is-playing .bet-title,
.device.is-playing .amount-title {
  min-height: 0;
  line-height: 1.15;
}

.device.is-playing .faces-row {
  align-self: stretch;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 1.8 / 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.device.is-playing .face-bet {
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: center;
  justify-items: center;
}

.device.is-playing .face-bet .face-die {
  align-self: center;
  width: clamp(40px, 3vw, 56px);
  height: auto;
  max-width: 64%;
  max-height: 56px;
}

.device.is-playing .face-bet .stake:empty {
  display: none;
}

.device.is-playing .amounts {
  align-items: center;
  width: 100%;
}

.device.is-playing .amounts button {
  display: grid;
  place-items: center;
}

.device.is-playing .bet-total {
  justify-content: center;
  border-color: rgba(236, 188, 70, 0.28);
  background: linear-gradient(90deg, transparent, rgba(90, 52, 13, 0.2), transparent);
}

.device.is-playing .actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(7px, 0.75vh, 10px);
  width: 100%;
}

.device.is-playing .btn-place,
.device.is-playing .btn-clear {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: clamp(8px, 0.7vw, 12px);
  transition:
    transform 150ms ease,
    filter 150ms ease,
    box-shadow 150ms ease;
}

.device.is-playing .btn-place {
  min-height: clamp(52px, 6.4vh, 68px);
  border: 1px solid #ffe69a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(180deg, #ffe58b 0%, #efbd49 48%, #b96b12 100%);
  color: #3a1b05;
  box-shadow:
    inset 0 0 0 2px rgba(112, 58, 7, 0.62),
    inset 0 3px 0 rgba(255, 248, 194, 0.52),
    inset 0 -4px 0 rgba(105, 49, 4, 0.28),
    0 6px 13px rgba(0, 0, 0, 0.34),
    0 0 12px rgba(239, 184, 49, 0.18);
}

.device.is-playing .btn-clear {
  min-height: clamp(44px, 5.4vh, 56px);
  border: 1px solid #c69535;
  background:
    linear-gradient(180deg, rgba(255, 226, 145, 0.08), transparent 42%),
    linear-gradient(180deg, #241508 0%, #0e0905 100%);
  color: #ffe7a0;
  box-shadow:
    inset 0 0 0 2px rgba(89, 50, 10, 0.86),
    inset 0 2px 0 rgba(255, 222, 128, 0.12),
    0 5px 11px rgba(0, 0, 0, 0.3);
}

.device.is-playing .action-frame {
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: fill;
  object-position: center;
  opacity: 0.68;
}

.device.is-playing .btn-clear .action-frame {
  opacity: 0.76;
}

.device.is-playing .action-text {
  z-index: 2;
  justify-content: center;
  min-width: 0;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 248, 205, 0.28);
}

.device.is-playing .btn-clear .action-text {
  text-shadow: 0 2px 3px #000;
}

.device.is-playing .action-text b {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.15vh, 1.22rem);
  line-height: 1.05;
}

.device.is-playing .action-text small {
  margin-top: 2px;
  font-size: clamp(0.56rem, 1.15vh, 0.7rem);
  line-height: 1;
  letter-spacing: 0.14em;
}

.device.is-playing .btn-place:hover:not(:disabled),
.device.is-playing .btn-clear:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.device.is-playing .btn-place:active:not(:disabled),
.device.is-playing .btn-clear:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

@media (max-width: 932px) and (orientation: landscape) {
  .device.is-playing .bet-dock {
    --bet-panel-gap: clamp(2px, 0.65vh, 4px);
    --bet-panel-pad: clamp(5px, 1.5vh, 8px);
    height: min(calc(100% - 4px), 420px);
  }

  .device.is-playing .bet-inner {
    grid-template-rows: auto 2px auto auto auto auto auto;
  }

  .device.is-playing .face-bet .face-die {
    width: clamp(20px, 5.6vh, 27px);
    max-width: 56%;
    max-height: 27px;
  }

  .device.is-playing .actions {
    gap: 3px;
  }

  .device.is-playing .btn-place {
    min-height: clamp(27px, 7vh, 32px);
  }

  .device.is-playing .btn-clear {
    min-height: clamp(25px, 6.2vh, 29px);
  }

  .device.is-playing .action-frame {
    inset: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
  }

  .device.is-playing .action-text b {
    font-size: clamp(0.6rem, 2.6vh, 0.72rem);
  }

  .device.is-playing .action-text small {
    display: none;
  }
}
