dialog {
  margin: auto;
  max-width: 400px;
  background-color: transparent;
  border-radius: 5px;
  overflow: visible;
}

dialog::backdrop {
  background-color: color-mix(in srgb, black, transparent 50%);
}

div.modal-container {
  width: 100%;
  height: 100%;
  min-height: 100px;
  max-height: 96dvh;
  padding: 1rem;
  padding-block-start: 1.5rem;

  background-color: #202224;
  border: 1px solid #323232;
  border-radius: 5px;
  color: white;
  
  position: relative;
  display: flex;
  flex-direction: column;
}

div.modal-container::after,
div.modal-container::before {
  content: "";
  display: block;
  position: absolute;
  position: absolute;
  height: 100%;
  width: 100%;
  inset: 0;
  pointer-events: none;
  cursor: default;
  background-size: 100%;
  background-repeat: no-repeat;
}

button.modal-close {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 4px;
  font-size: 1.625rem;
  font-family: sans-serif;
  font-weight: 900;
  line-height: 0.6;
  padding: 0.25rem;
  color: color-mix(in srgb, currentColor, black 30%);
}

dialog h1 {
  font-size: 0.8rem;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  letter-spacing: 0.3em;
}

dialog p {
  text-align: center;
  text-wrap: pretty;
}

dialog h1 + div {
  margin-block: 16px;
  overflow-y: auto;
}

dialog img {
  width: auto;
  height: auto;
  max-width: 100%;
  margin-inline: auto;
}

.stw-checkout,
.stw-checkout ul {
  list-style: none;
}

.stw-checkout ul {
  display: flex;
  justify-content: space-between;
}

.stw-checkout ul li:first-child {
  color: color-mix(in srgb, currentColor, black 30%);
}

.modal-ui {
  display: flex;
  gap: 8px;
  justify-content: stretch;
  align-items: center;
  margin-block-start: 16px;
}

.modal-ui p {
  text-align: center;
  margin-inline: auto;
  font-size: 0.75rem;
}

.modal-ui > button {
  flex: 1 1 100%;
}

.modal-ui > button:first-child:last-child {
  max-width: fit-content;
  min-width: 150px;
  margin-inline: auto;
}

.btn-sub,
.btn-prime {
  padding: 0.5rem;
  position: relative;
  isolation: isolate;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 3px;
  overflow: clip;
}

.btn-sub::before,
.btn-sub::after,
.btn-prime::before,
.btn-prime::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid;
}

.btn-sub::before,
.btn-prime::before {
  z-index: -2;
}

.btn-sub::after,
.btn-prime::after {
  z-index: -1;
  opacity: 0;
  transition: opacity 200ms ease-in-out;
}

.btn-sub::before {
  background-image: linear-gradient(0deg, #585858 0%, #808080 100%);
  border-color: color-mix(in srgb, #585858, white 20%);
}

.btn-prime::before {
  background-image: linear-gradient(0deg, color-mix(in srgb, var(--key-color, #0095ff), black 20%) 0%, var(--key-color, #0095ff) 100%);
  border-color: color-mix(in srgb, var(--key-color, #0095ff), white 20%);
}

.btn-sub::after {
  background-image: linear-gradient(0deg, #808080 0%, #808080 100%);
  border-color: color-mix(in srgb, #585858, white 30%);
}

.btn-prime::after {
  background-image: linear-gradient(0deg, color-mix(in srgb, var(--key-color, #0095ff), white 20%) 0%, var(--key-color, #0095ff) 100%);
  border-color: color-mix(in srgb, var(--key-color, #0095ff), white 30%);
}

@media (hover: hover) {
  .btn-sub:hover::after,
  .btn-prime:hover::after {
    opacity: 1;
  }
}




.earn-spins-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 4px;
  padding-inline: 8px;
  flex: 0 1 100%;
}

.earn-spins-grid p {
  grid-column: span 2;
  text-align: center;
}

.earn-spins-grid img {
  border-radius: 3px;
  overflow: clip;
  background-color: color-mix(in srgb, #202224, black 25%);
}

.earn-spins-grid figure {
  border: 1px solid #323232;
  padding: 4px;
}

.earn-spins-grid figcaption {
  text-align: center;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-block-start: 4px;
}

.buy-spins-grid fieldset div {
  margin-block: 4px;
}

.buy-spins-grid fieldset legend {
  text-align: center;
}

.buy-spins-grid label,
.stw-checkout,
.shuffle-price {
  padding: 4px 8px;
  border: 1px solid #323232;
  border-radius: 3px;
}

.buy-spins-grid label p {
  margin-inline-start: auto;
  font-size: 1rem;
  opacity: 0.7;
}

.buy-spins-grid input[type="radio"] {
  display: none;
}

.buy-spins-grid label {
  font-size: 1.25rem;
  display: flex;
  gap: 4px;
  align-items: center;
  cursor: pointer;
}

.buy-spins-grid label::before {
  content: '';
  width: 20px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50vw;
  margin-inline-end: 0.25rem;
  border: 3px solid;
  outline: 3px solid color-mix(in srgb, black, white 10%);
  outline-offset: -6px;
  background-color: color-mix(in srgb, black, white 10%);
  border-color: color-mix(in srgb, black, white 40%);
}

.buy-spins-grid input[type="radio"]:checked + label {
  /* color: var(--key-color, #0095ff); */
  border-color: var(--key-color, #0095ff);
}

.buy-spins-grid input[type="radio"]:checked + label::before {
  background-color: var(--key-color, #0095ff);
}





.shuffle-price {
  margin-block-end: 4px;
}

.shuffle-price p {
  text-align: center;
  font-weight: 700;
  font-size: 2rem;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding-inline: 8px;
  flex: 0 1 100%;
}

.rewards-grid figure {
  overflow: clip;
  border: 1px solid #323232;
  border-radius: 3px;
  padding: 4px 4px 8px;
  position: relative;
}

.rewards-grid figcaption {
  font-size: 0.625rem;
  text-align: center;
  line-height: 1.1;
}

/* #my-rewards figure:not([active]) {
  filter: saturate(0.5) brightness(0.5) opacity(0.8);
} */

#my-rewards figure[active] {
  background-color: #323232;
}

#my-rewards  figure:not([active]) .myrewards-counter {
  background-color: color-mix(in srgb, #323232, white 15%);
}

#my-rewards .myrewards-counter {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8em;
  line-height: 1;
  height: fit-content;
  width: fit-content;
  inset-block-start: 2px;
  inset-inline-end: 2px;
  /* position: absolute; */
}

.legend {
  grid-column: span 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.legend p {
  padding: 1px 5px;
  font-size: 0.625rem;
  text-transform: uppercase;
  border-radius: 3px;
}

.legend p.not-earned {
  background-color: color-mix(in srgb, #323232, white 15%);
}

.legend p.earned {
  background-color: var(--key-color, #0095ff);
}

.howtoplay-grid h2 {
  display: flex;
  align-items: center;
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 400;
  gap: 8px;
  margin-block-end: 0.5rem;
}

.howtoplay-grid > div {
  margin-block: 4px;
  padding: 8px;
  border: 1px solid #323232;
}

.howtoplay-grid > div p {
  text-align: left;
  font-size: 0.75rem;
  color: color-mix(in srgb, currentColor, black 30%);
}

.howtoplay-grid > div button {
  padding: 0 4px;
  border-radius: 3px;
  border: 1px solid #323232;
  color: var(--key-color, #0095ff);
}

#earn-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  list-style: none;
  margin-block-end: 4px;
}

#earn-table div {
  color: black;
  background-color: white;
  width: 2.5ch;
  text-align: center;
  border-radius: 3px;
  flex: 0 0 auto;
}

#earn-table li {
  display: flex;
  align-items: center;
  gap: 8px;
}

#earn-table p {
  line-height: 1.1;
}

/* #winner-jackpot .jackpot,
#prev-jackpot-winner .jackpot {
  margin-inline: -1.2rem;
} */

#winner-jackpot .jackpot p:first-child,
#prev-jackpot-winner .jackpot p:first-child {
  font-size: 1.5rem;
  letter-spacing: initial;
}

#winner-jackpot .jackpot p:nth-child(2),
#prev-jackpot-winner .jackpot p:nth-child(2) {
  font-size: 3rem;
}

#winner-prize figure {
  background-image: url('../images/skin/reward-modal-generic-bg.webp');
  border: 1px solid #323232;
}

#winner-prize figure,
#winner-prize img {
  background-position: center;
  background-size: cover;
}



dialog[open] {
  animation: swipeUpFadeIn 200ms ease-out forwards;
}

@keyframes swipeUpFadeIn {
  from {
    transform: translateY(50dvh); /* Start below */
    opacity: 0; /* Invisible */
  }
  to {
    transform: translateY(0); /* Move to original position */
    opacity: 1; /* Fully visible */
  }
}