@charset "utf-8";

#modal_wrapper {
  display: flex;
  justify-content: center;
  /* align-items: center; */
  width: 100%;
  height: 100vh;
  background-color: #f5f5f5e6;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  align-items: flex-start;
  padding: 40px 20px;
  box-sizing: border-box;
}

#modal_wrapper .modal_contents_wrap {
  width: 80%;
  max-width: 900px;
  box-sizing: content-box;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border-radius: 32px;
  padding: 50px;
  z-index: 100;
  position: relative;
}

#modal_wrapper .modal_contents_wrap .close {
  position: absolute;
  top: -20px;
  right: -20px;
  display: block;
  width: 48px;
  aspect-ratio: 1;
  background: url(../images/btn_closed.svg) no-repeat center center;
  background-size: contain;
  cursor: pointer;
  transition: all 0.3s ease;
}

#modal_wrapper .modal_contents_wrap .content .title {
  font-size: clamp(1.125rem, -0.2083rem + 2.7778vw, 1.875rem);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--primary-color);
  line-height: 1.5;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
  padding-right: 40px;
}

#modal_wrapper .modal_contents_wrap .content .title span {
  font-size: clamp(0.875rem, 0.2083rem + 1.3889vw, 1.25rem);
  font-weight: var(--font-weight-normal, 400);
  color: var(--parts-headline-font-color);
  line-height: 1.75;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

#modal_wrapper .modal_contents_wrap .content .com {
  font-size: clamp(0.875rem, 0.2083rem + 1.3889vw, 1.25rem);
  font-weight: var(--font-weight-medium, 500);
  color: var(--parts-headline-font-color);
  line-height: 1.75;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

#modal_wrapper .modal_contents_wrap .content .img_wrap {
  width: 70%;
  max-width: 600px;
  aspect-ratio: 600 / 300;
  height: auto;
  /* background-color: #f5f5f5; */
  margin-inline: auto;
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  /* align-items: flex-end; */
  /* padding: calc(40 / 600 * 100%) calc(30 / 600 * 100%); */
}

#modal_wrapper .modal_contents_wrap .content .img_wrap img {
  width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  #modal_wrapper {
    display: block;
    padding-inline: 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    z-index: 100;
  }

  #modal_wrapper::-webkit-scrollbar {
    display: none;
  }

  #modal_wrapper .modal_contents_wrap {
    margin-top: 20px;
    width: 75%;
    padding: 35px;
    border-radius: 16px;
    margin-inline: auto;
    margin-bottom: 50px;
    position: relative;
    z-index: 0;
    /* pointer-events: none; */
  }

  #modal_wrapper .modal_contents_wrap .modal_btns_wrap {
    pointer-events: auto;
  }

  #modal_wrapper .modal_contents_wrap .content .img_wrap {
    width: 100%;
    aspect-ratio: initial;
  }

  #modal_wrapper .modal_contents_wrap .close {
    position: fixed;
    top: 10px;
    right: 10px;
    pointer-events: auto;
    z-index: 1;
  }

  .modal_btns_wrap {
    position: fixed;
    bottom: 20px;
    left: 30px;
    right: 30px;
    top: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
}

#modal_wrapper.active {
  opacity: 1;
  visibility: visible;
}

#modal_wrapper .modal_contents_wrap {
  display: none;
}

#modal_wrapper.active .modal_contents_wrap {
  display: block;
  position: relative;
  z-index: 100;
  margin: auto 0;
}

#modal_wrapper .modal_contents_wrap .content {
  display: none;
  opacity: 0;
  transition: all 0.3s ease;
  position: relative;
}

#modal_wrapper .modal_contents_wrap .content.splus::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: url(/scansnap/common/images/ico_splus.png) no-repeat left top;
  background-size: contain;
  background-position: center center;
  z-index: 1;
}

#modal_wrapper .modal_contents_wrap .content.active {
  display: block;
  opacity: 0;
  animation: fadeIn 1s ease 0s 1 normal forwards;
}

/* アニメーション */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.modal_back {
  display: block;
  width: 48px;
  aspect-ratio: 1;
  background: url(../images/btn_arrow_right.svg) no-repeat center center;
  background-size: contain;
  cursor: pointer;
  position: absolute;
  transform: rotate(180deg);
  top: 50%;
  left: -20px;
  transform-origin: center center;
  transform: translateY(-50%) rotate(180deg);
  transition: all 0.3s ease;
}

.modal_next {
  display: block;
  width: 48px;
  aspect-ratio: 1;
  background: url(../images/btn_arrow_right.svg) no-repeat center center;
  background-size: contain;
  cursor: pointer;
  position: absolute;
  top: 50%;
  right: -20px;
  transform-origin: center center;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

.disabled {
  background: url(../images/btn_arrow_right_hover.svg) no-repeat center center;
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

@media (min-width: 768px) {
  #modal_wrapper .modal_contents_wrap .close:hover {
    opacity: 1;
    background: url(../images/btn_closed_hover.svg) no-repeat center center;
    background-size: contain;
  }

  .modal_back:hover {
    opacity: 1;
    background: url(../images/btn_arrow_right_hover.svg) no-repeat center center;
    background-size: contain;
  }

  .modal_next:hover {
    opacity: 1;
    background: url(../images/btn_arrow_right_hover.svg) no-repeat center center;
    background-size: contain;
  }
}