/* 覆蓋層 modal（取代 Bootstrap，規則／下注紀錄／全螢幕 iframe） */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
}

.modal.is-open {
  display: flex;
}

body.shell-modal-open {
  overflow: hidden;
}

.modal-dialog {
  position: relative;
  height: 100svh;
  width: calc(100vh * (1080 / 1920));
  max-width: 100vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
}

.modal-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  -webkit-overflow-scrolling: touch;
}

#exampleModal2.modal,
#newWagerRecord.modal {
  overflow: hidden;
}

.modal-content iframe {
  position: relative;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  background-color: transparent;
  border: 0;
  position: absolute;
  height: 3rem;
  font-size: 2rem;
  line-height: 2rem;
  top: 0;
  right: 0;
  z-index: 9999;
  color: #F89A32;
  user-select: none;
  cursor: pointer;
  padding: 0;
}

.close-btn:focus {
  outline: none;
}

.close-btn.is-rule {
  height: 4rem;
  width: 4rem;
}

.close-btn.is-bet-history {
  width: 5.2rem;
}

.rule-header {
  z-index: 1;
  position: sticky;
  top: 0;
  flex-shrink: 0;
}
