@charset "utf-8";
$res: 979px;

.stepform{
  $gray: #f1f1f1;
  $primary: #007bff;
  $alert: #dc3545;
  $border: #e8e8e8;

  box-sizing: border-box;
  *{
    box-sizing: border-box;
    user-select: none;
  }
  &__overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(#000,.8);
    z-index: 9999;
    &__close{
      position: fixed;
      right: 16px;
      top: 16px;
      width: 56px;
      height: 56px;
      z-index: 9999;
      @media screen and (max-width: $res){
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
      }
      cursor: pointer;
      &:before,
      &:after{
        content: '';
        width: 80%;
        height: 1px;
        background: #FFF;
        position: absolute;
        top: 50%;
        left: 10%;
        transition: all 200ms ease-in-out;
      }
      &:before{
        transform: rotate(45deg);
      }
      &:after{
        transform: rotate(-45deg);
      }
      &:hover{
        &:before,
        &:after{
          width: 70%;
          left: 15%;
          transform: rotate(0deg);
        }
      }
    }
  }
  &__box{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 56px 40px;
    background: #FFF;
    z-index: 9999;
    border-radius: 6px;
    width: 720px;
    max-height: 88vh;
    overflow: auto;
    @media screen and (max-width: $res){
      width: 92vw;
      padding: 40px 5.6vw;
      top: 64px;
      transform: translateX(-50%);
      max-height: calc(100% - 64px - 5.6vw);
    }
    &__title{
      font-size: 2rem;
      line-height: 1;
      text-align: center;
    }
    &__description{
      text-align: center;
      font-size: 1.12rem;
      margin: 16px 0 0;
    }
    &__loading{
      position: relative;
      width: 60px;
      height: 60px;
      margin: 32px auto 0;
      mix-blend-mode: exclusion;
      opacity: .12;
      animation: loading 2000ms cubic-bezier(0.5, 0, 0.5, 1) infinite;
      &.mn{
        margin-top: 0;
      }
      div {
        box-sizing: border-box;
        display: block;
        position: absolute;
        width: 48px;
        height: 48px;
        margin: 6px;
        border: 6px solid #FFF;
        border-radius: 50%;
        animation: loading 800ms cubic-bezier(0.5, 0, 0.5, 1) infinite;
        border-color: #FFF transparent transparent transparent;
        &:nth-child(1) {
          animation-delay: -200ms;
        }
        &:nth-child(2) {
          animation-delay: -100ms;
        }
        &:nth-child(3) {
          animation-delay: -0ms;
        }
      }
    }
    &__message{
      text-align: center;
    }
    &__listdata{
      margin: 32px 0 0;
      overflow: hidden;
      @media screen and (max-width: $res){
        margin: 24px 0 0;
      }
      &__anime{
        &.active{
          animation: toRight 400ms ease-in-out forwards;
          opacity: 0;
        }
        @keyframes toRight {
          0%{
            transform: translateX(10%);
            opacity: 0;
          }
          100%{
            transform: translate(0, 0);
            opacity: 1;
          }
        }  
      }
      &__title{
        background: $gray;
        font-size: 1.16rem;
        text-align: center;
        border-radius: 4px;
        padding: 20px;
        @media screen and (max-width: $res){
          padding: 16px;
        }
        span{
          display: inline-block;
          margin: 0 0 0 16px;
          @media screen and (max-width: $res){
            margin: 0;
            display: block;
          }
        }
      }
      &__item{
        margin: 32px 0 0;
        display: grid;
        row-gap: 16px;
        column-gap: 16px;
        grid-template-columns: 1fr 1fr;
        @media screen and (max-width: $res){
          display: block;
          margin: 24px 0 0;
        }
        li{
          font-size: 1.08rem;
          line-height: 1.56;
          list-style: none;
          @media screen and (max-width: $res){
            margin: 12px 0 0;
            &:first-child{
              margin-top: 0;
            }
          }
          label{
            display: block;
            position: relative;
            padding: 16px 20px;
            padding-left: 48px;
            cursor: pointer;
            input{
              position: absolute;
              top: 50%;
              left: 20px;
              transform: translateY(-50%);
              &:checked{
                + i{
                  border-color: $primary;
                  + span{
                    color: darken($primary, 8%);
                  }
                }
              }
            }
          }
        }
        &__effects{
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          border: $border 2px solid;
          border-radius: 4px;
          z-index: -1;
          pointer-events: none;
          transition: all 200ms ease-in-out;
        }
      }
      &__input{
        &:last-of-type{
          li{
            &:last-child{
              margin: 0;
              padding: 0;
              border: none;
            }
          }
        }
        &--mt{
          margin: 32px 0 0;
          @media screen and (max-width: $res){
            margin: 24px 0 0;
          }
        }
        li{
          font-size: 1.08rem;
          line-height: 1.56;
          list-style: none;  
          margin: 0 0 20px;
          padding: 0 0 20px;
          border-bottom: $border 1px solid;
          @media screen and (max-width: $res){
            margin: 0 0 16px;
            padding: 0 0 16px;
          }
          > label,
          > div{
            display: flex;
            align-items: center;
            justify-content: space-between;
            @media screen and (max-width: $res){
              display: block;
            }
            > span{
              width: 220px;
              text-align: left;
              position: relative;
              padding: 0 72px 0 0;
              @media screen and (max-width: $res){
                display: block;
                width: auto;
                margin: 0 0 12px;
              }
              &.hiss{
                &:after{
                  content: attr(data-word);
                  position: absolute;
                  top: 50%;
                  right: 0;
                  transform: translateY(-50%);
                  padding: 4px 16px;
                  background: $primary;
                  color: #FFF;
                  font-size: .8rem;
                  border-radius: 4px;
                }
              }
            }
            > div{
              width: calc(100% - 220px - 32px);
              display: flex;
              align-items: center;
              justify-content: flex-start;
              @media screen and (max-width: $res){
                width: auto;
                display: block;
              }
              > label{
                font-size: 1rem;
                margin: 0 20px 0 0;
                cursor: pointer;
                input{
                  margin: 0 6px 0 0;
                }
              }    
            }
            input[type=text],
            input[type=email],
            input[type=tel],
            input[type=password],
            select,
            textarea{
              font-size: 1rem;
              line-height: 1.56;
              padding: 8px 16px;
              background: $gray;
              width: calc(100% - 220px - 32px);
              border: none;
              border-radius: 4px;
              display: block;
              outline: none;
              @media screen and (max-width: $res){
                width: 100%;
              }
            }
          }
        }
      }
      &__error{
        li{
          margin: 16px 0 0;
          border: $alert 2px solid;
          color: $alert;
          font-weight: 700;
          padding: 12px 24px;
          text-align: center;
          list-style: none;
          border-radius: 4px;
          @media screen and (max-width: $res){
            margin: 8px 0 0;
          }
        }
      }
      &__btns{
        margin: 32px 0 0;
        padding: 32px 0 0;
        border-top: $border 1px solid;
        display: flex;
        justify-content: center;
        @media screen and (max-width: $res){
          margin: 24px 0 0;
          padding: 24px 0 0;
        }
        &__btn{
          border: darken($gray, 8%) 2px solid;
          background: darken($gray, 8%);
          padding: 10px 40px;
          border-radius: 4px;
          position: relative;
          cursor: pointer;
          @media screen and (max-width: $res){
            width: calc(50% - 8px);
            padding: 10px 15px;
            text-align: center;
            &:nth-of-type(2){
              margin-left: 16px;
            }
          }
          &:first-of-type{
            margin: 0 16px 0 0;
            @media screen and (max-width: $res){
              margin: 0;
            }
          }
          i{
            width: 6px;
            height: 4px;
            position: absolute;
            top: 50%;
            left: 12px;
            transform: translateY(-50%);
            @media screen and (max-width: $res){
              display: none;
            }
            &:before,
            &:after{
              content: '';
              width: 100%;
              height: 1px;
              background: darken($gray, 40%);
              position: absolute;
              top: 50%;
              left: 0;
              transform: rotate(45deg);
              transform-origin: left center;
            }
            &:after{
              transform: rotate(-45deg);
            }
          }
          &.next{
            border-color: $primary;
            background: $primary;
            color: #FFF;
            i{
              left: auto;
              right: 12px;
              transform: translateY(-50%) rotateY(180deg);
              &:before,
              &:after{
                background: #FFF;
              }
            }
            &:hover{
              border-color: lighten($primary, 4%);
              background: lighten($primary, 4%);
            }
          }
          &:hover{
            border: darken($gray, 4%) 2px solid;
            background: darken($gray, 4%);
          }
        }
      }
    }
  }
  @keyframes loading {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  .stepFormFade-enter-active, .stepFormFade-leave-active {
    transition: opacity 400ms;
  }
  .stepFormFade-enter, .stepFormFade-leave-to{
    opacity: 0;
  }
}