@charset "utf-8";
/* CSS Document */
/*〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
モーダル
〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓*/

body.modal-active {
  overflow: hidden;
}
.modal-container {
  opacity: 0;
  visibility: hidden;
  /* 初期状態で非表示 */
  position: fixed;
  top: 0;
  left: 0;
  padding: 2rem;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 999999;
  transition: 0.3s;
  overflow-y: scroll;
  box-sizing: border-box;
  /* overflowスクロールバーカスタム */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.1);
  /* overflowスクロールバーカスタム */
  &::-webkit-scrollbar {
    width: 0.8rem;
    background-color: rgba(0, 0, 0, 0.1);
  }
  &::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
  }
  &.active {
    opacity: 1;
    visibility: visible;
    /* activeクラスが付与されたときに表示 */
  }
  @media screen and (max-width: 480px) {
    padding: 2rem;
    scrollbar-width: none;
    &::-webkit-scrollbar {
      width: 0;
    }
  }
}

/* 閉じるボタン */
.modal-close {
  appearance: none;
  padding: 0;
  border: 0;
  cursor: pointer;
  position: absolute;
  z-index: 10;
  top: 2rem;
  right: 2rem;
  font-size: 0;
  background-color: var(--col-blue);
  border-radius: 0.4rem;
  width: 4.2rem;
  aspect-ratio: 1/1;
  &::after,
  &::before {
    content: "";
    display: block;
    position: absolute;
    width: 50%;
    height: 2px;
    background-color: #fff;
    top: 50%;
    left: 50%;
    margin: auto;
  }
  &::after {
    transform: translate(-50%, 50%) rotate(45deg);
  }
  &::before {
    transform: translate(-50%, 50%) rotate(-45deg);
  }
  @media screen and (max-width: 480px) {
    top: 1rem;
    right: 1rem;
    width: 3.2rem;
  }
}

/*--------------------*/
/* モーダルの中身 */
.modal-body {
  position: relative;
  background: #fff;
  padding: 4rem;
  width: 90%;
  margin: 3rem auto;
  box-sizing: border-box;
  @media screen and (max-width: 480px) {
    padding: 2rem;
    width: 100%;
    margin: 1rem auto;
  }
}
