.modal {
  position: fixed;
  z-index: 9999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;

  background-color: rgba(26, 34, 116, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 4em;
  font-family: "BricolageGrotesque", sans-serif;
  --color: #c2e100;
  box-sizing: border-box;
  user-select: none;
}
/*
#bet-detail.modal,
#provably-popup.modal {
  background: unset;
}
*/

.modal-close {
  position: absolute;
  top: 3em;
  right: -1em;
  z-index: 10;
  zoom: 50%;
  cursor: pointer;
}

.modal .nodata,
.modal .loading {
  text-align: center;
  font-size: 0.875em;
  font-weight: bold;
}

.modal-container {
  width: calc(456px * 1.1);
  height: calc(606px * 1.1);
  aspect-ratio: 0.752679311;
  max-width: 100%;
  border-radius: 6px;
  min-height: 200px;
  position: relative;
  background-image: var(--modalBG);
  background-size: cover;
  background-repeat: no-repeat;
}

.modal-title {
  font-family: "LilitaOne", sans-serif;
  font-size: 1.75rem;
  text-transform: uppercase;
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #ffd649;
  -webkit-text-stroke: 2px #7068aa;
  text-shadow: 0 0 #7068aa;
  z-index: 5;
}
.betHistory .modal-content {
  margin-left: 3em;
  margin-right: 3em;
}
.betDetail .modal-content {
  margin-left: 3em;
  margin-right: 3em;
}
.modal-content {
  position: relative;
  font-size: 1em;
  margin: 6em 6em;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  max-height: 480px;
  overflow: auto;
}

.modal-list .item,
.list-title {
  cursor: pointer;
  display: flex;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2em;
  justify-content: space-between;
  align-items: center;
  padding: 1em;
  background: #58469c;
  color: #fff;
  border-radius: 2em;
}
#bet-detail.modal .modal-list .item {
  grid-template-columns: 1fr 1fr;
}
#bet-detail.modal .item .title {
  opacity: 0.5;
}
#bet-detail.modal .item .text {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: end;
  gap: 0.5em;
  font-size: 0.875em;
}
#bet-detail.modal .item .text .value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
#bet-detail.modal .item .text .copy {
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5em;
  line-height: 1;
}
#bet-detail.modal .item .text .copy svg,
#bet-detail.modal .item .text .copy img {
  width: 1.5em;
}
.modal p {
  text-wrap: balance;
  text-align: center;
  margin: 0;
}
.modal p img {
  vertical-align: middle;
}
.provably-content {
  display: flex;
  flex-direction: column;
  gap: 1em;
  overflow: auto;
  max-height: 530px;
}
.provably-content .input {
  border-radius: 6px;
  background: #2e4c83;
  color: #fff;
  text-align: center;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
}

.provably-content > .title {
  font-weight: bold;
}

.provably-content .input .text {
  font-size: 0.75em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 1em;
}

.provably-content .input .icon {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75em;
  transition: background 200ms linear;
  cursor: pointer;
}

.provably-content .input .icon svg,
.provably-content .input .icon img {
  width: 1.25em;
}

.list-title {
  line-height: 2;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}
.list-title > div {
  font-size: 0.875em;
}

.modal .button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1em;
  background: #fff;
  color: #666;
  border-radius: 2em;
  padding: 0.5em 2em;
  cursor: pointer;
  align-self: baseline;
  margin: 0 auto;
  transition: all 200ms linear;
  margin-bottom: 1em;
}
.modal .button:hover {
  letter-spacing: 1px;
}
.modal .button svg,
.modal .button img {
  width: 1.5em;
}
.modal .button > div {
  font-size: 1em;
  font-weight: bold;
  color: #58469c;
}

.modal-list .item > div {
  font-size: 0.875em;
}
.modal-list .item svg,
.modal-list .item img {
  justify-self: end;
  /*zoom: 80%;*/
}

.list-title > div:not(:first-child) {
  text-align: center;
}
.modal-list .item .date {
  opacity: 0.75;
}
.modal-list .item .bet,
.modal-list .item .win,
.modal-list .item .lose {
  text-align: center;
}

.modal-list .item .result {
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0px 3px 5px rgba(0, 0, 0, 0.75);
  font-size: 1.1rem;
}
.modal-list .item .win {
  color: #ffd54b;
}
.modal-list .item .lose {
  color: #ee3875;
}
.modal-list .item .bet {
  text-shadow: 0px 3px 5px rgba(0, 0, 0, 0.75);
}

.info-page {
  display: flex;
  flex-direction: column;
  gap: 1em;
  max-height: 530px;
  overflow: auto;
}

.info-page p,
.provably-content p {
  text-align: left;
  text-wrap: pretty;
}
.provably-content .title,
.info-page .title {
  font-size: 1.25em;
  font-weight: bold;
  text-transform: uppercase;
}

.payment-table {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.payment-table .item {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.5em;
}
.payment-table .item .count {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5em;
  justify-content: center;
  background: var(--inputBG);
  background-size: cover;
  width: calc(930px * 0.25);
  height: calc(320px * 0.25);
  border-radius: 8px;
  color: #fff;
  margin: 0 auto;
  max-width: 80%;
}
.payment-table .item .count img {
  width: 3em;
}
.payment-table .item .count .desc {
  position: absolute;
  left: -1px;
}

.payment-table .item .count .inc {
  position: absolute;
  right: -2px;
}
.payment-table .item .count .btn {
  display: flex;
  place-items: center;
  cursor: pointer;
}

.payment-table .item .count .value {
  font-family: "LilitaOne", sans-serif;
  font-size: 2em;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.payment-table .item .count .value .title {
  font-size: 0.7em;
  text-transform: uppercase;
  color: #ffd54b;
  font-weight: 700;
}

.payment-table .item .count .value .desc {
  position: unset;
  font-size: 0.7em;
}

.payment-table .item .multipliers {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  flex-wrap: wrap;
  overflow-x: auto;
  width: 100%;
  margin-top: 0.5em;
}

.payment-table .item .multipliers div {
  font-size: 0.75em;
  padding: 0.25em 0.75em;
  background: #fff;
  border-radius: 2em;
  color: #8171c1;
}

.provably-table {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: center;
  gap: 0.5em;
}

.example-string {
  text-align: center;
  word-break: break-word;
}

.provably-table .item {
  display: grid;
  place-items: center;
  position: relative;
  padding: 0.25em;
  border: 2px solid #7225ae;
  border-radius: 12px;
  overflow: hidden;
}

.provably-table .item .desc {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 0.875em;
  padding: 0.25em 0.5em;
  border-bottom-right-radius: 12px;
  background: #7225ae;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.provably-table .item img {
  width: 40px;
}

.game-symbols {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1em;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 1em;
}

.game-symbols .item {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  align-items: center;
  justify-content: center;
}

.game-symbols .item img {
  width: 5em;
}

#provably-fair-except,
#bet-detail {
  background: unset;
}

body:has(.betHistory) #provably-popup {
  background: unset;
}

@media screen and (max-width: 768px) {
  .modal {
    place-items: flex-start;
    padding: 4em 1em;
    justify-content: stretch;
  }
}

@media screen and (max-width: 480px) {
  .modal-container {
    width: 100%;
    height: unset;
    max-width: 100%;
    margin: 0 auto;
    background-size: 100%;
  }
  .payment-table .item .count {
    max-width: 100%;
  }
  .info-page,
  .provably-content {
    max-height: 425px;
  }
  .modal-list {
    max-height: 370px;
  }
  .modal-title {
    font-size: 1.25rem;
    top: 0.75rem;
  }
  .modal-content {
    margin: 4em 2em !important;
  }
  .example-string {
    font-size: 0.75em;
  }
  .provably-table .item .desc {
    font-size: 0.75em;
  }
  .provably-table {
    gap: 0.25em;
  }
  .provably-table .item {
    padding: 0.25em;
  }
  .modal-close {
    zoom: 40%;
  }

  .modal-list .item,
  .list-title {
    gap: 1em;
    zoom: 75%;
  }
  .modal .button > div {
    font-size: 0.75em;
  }
  .info-page p,
  .provably-content p {
    font-size: 0.875em;
  }
}

@media screen and (max-width: 390px) {
  .info-page,
  .provably-content {
    max-height: 390px;
  }
  .modal-list {
    max-height: 330px;
  }
}

@media screen and (max-width: 375px) {
  .info-page,
  .provably-content {
    max-height: 375px;
  }
  .modal-list {
    max-height: 315px;
  }
  .modal-title {
    font-size: 1.25rem;
    top: 0.7rem;
  }
}

@media screen and (max-width: 320px) {
  .modal-title {
    font-size: 1rem;
  }
  .info-page,
  .provably-content {
    max-height: 290px;
  }
  .modal-list {
    max-height: 240px;
  }
}

@media screen and (orientation: landscape) and (max-height: 728px) {
  .modal-container {
    zoom: 75%;
  }
}
