@charset "utf-8";

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 5000;
}

#overlay.show {
  opacity: 1;
  pointer-events: auto;
}


.modal {
  display: flex;
  flex-direction: column;

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: white;
  padding: 5px;
  border-radius: 8px;

  width: 60%;
  height: 90%;
  max-width: 90vw;
  max-height: 90vh;
  overflow: visible;
  box-sizing: border-box;

  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 5001;
}
@media screen and (max-width: 768px) {
  .modal {
    width: 90%;
  }
}
@media screen and (max-width: 1024px) {
  .modal {
    width: 90%;
  }
}
@media screen and (max-width: 1440px) {
  .modal {
    width: 90%;
  }
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

#modal-content {
  width: 100%;
  height: 100%;
}
#modal-content.hidden {
  visibility: hidden;
}

/* iframeに重なる閉じるボタン */
.modal-close-bar {
  position: relative;
  height: 0; /* 高さを持たせないことでiframeと重なる */
}

#modal-close {
  position: absolute;
  top: -16px;
  right: -15px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgb(0, 0, 0);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1em;
  line-height: 1;
  font-weight: bold;
}

/* iframeそのもの */
#modal-content {
  width: 100%;
  flex: 1;        /* モーダルの高さに合わせて伸縮 */
  border: none;
  display: block;
  min-height: 0; /* flex子要素の縮小を許可するために必要 */
}

.modal-action {
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index: 8;
  padding-top: 2px;
}

/* iframeの外（下）に配置されるnav */
.modal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 16px 2px 16px;
  border-top: 1px solid #eee;
}
.modal-nav .modal-button {
  width: 10%;
  padding: 0;
}
.modal-nav .modal-button button {
  width: 100%;
}
@media (max-width: 768px) {
  .modal-nav .modal-button {
    width: 25%;
  }
}


.modal-button {
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 2px;
  margin-bottom: 0;
}

.modal-button button {
  font-weight: bold;
  height: 3rem;
  border: solid 3px #000;
  text-align: center;
  display: block;
  width: 40%;
  margin: 0 auto;
  border-radius: 3px;
  color: #333;
  font-size: 0.8rem;
  width: 50%;
  
}
@media (max-width: 768px) {
  .modal-button button {
    font-size: 2.0rem;
    height: 5rem;
  }
  #button-payment {
    white-space: nowrap;
    font-size: clamp(0.9rem, 3.6vw, 2.0rem);
  }
}

.modal-button.black button {
  background-color: #000;
  border: solid 3px #000;
  color: #fff;
}
.modal-button.gold button {
  background: linear-gradient(180deg, #f5e08a 0%, #c8a84b 50%, #8b6914 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  border: solid 2px #8b6914;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
.modal-button.silver button {
  background: linear-gradient(180deg, #d0d0d0 0%, #a0a0a0 50%, #606060 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  border: solid 2px #505050;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}


.modal-button button:nth-of-type(2) {
  margin-top: 2rem;
}

.modal-button button::before {
  content: "";
  position: absolute;
  background-size: cover;
  width: 16px;
  height: 38px;
  left: 4px;
  top: 50%;
  transform: translate(0px, -50%);
}
.modal-button button::after {
  content: "";
  position: absolute;
  background-size: cover;
  width: 16px;
  height: 38px;
  right: 4px;
  top: 50%;
  transform: scale(-1.0) translate(0px, 50%);
}

.modal-button.black button:before, 
.modal-button.black button:after {
  background: url(../img/img_login.png);
}
.modal-button.white button:before, 
.modal-button.white button:after {
  background: url(../img/btn_bg.png);
}

.modal-button:is(.gold, .silver) button::before,
.modal-button:is(.gold, .silver) button::after {
  display: none;
}

.modal-button button:disabled {
  background-color: #666;
  color: white;
  cursor: not-allowed;
  border: 3px solid #666;
}
.modal-button button.disabled {
  background-color: #666;
  color: white;
  cursor: default;
  border: 3px solid #666;
}

.modal-button .button-arrow {
  height: 50%;
  width: auto;
}
.modal-button #button-prev .button-arrow {
  transform: rotate(-90deg);
  left: -10%;
}
.modal-button #button-next .button-arrow {
  transform: rotate(90deg);
  right: -10%;
}

