/****************************************
入力
****************************************/
/**********パーツ**********/
input,
textarea,
button {
  font-family: 'Noto Sans Japanese', sans-serif;
  display: block;
  line-height: 1.6;
  color: #333;
  margin-top: 5px;
  font-size: 1.6rem;
}

input,
textarea {
  padding: 10px 15px !important;
  width: 100% !important;
  border: 1px solid #CCC;
  border-radius: 5px;
}

input[type="date"] {
  position: relative;
  width: 200px !important;

  &::after {
    font-family: "Font Awesome 5 Free";
    content: "\f073";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    pointer-events: none;
  }

  &::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    width: 40px;
    height: 100%;
    cursor: pointer;
  }
}

textarea {
  resize: vertical;
  min-height: 150px;
}

.toggleCts {
  & input {
    display: inline-block;
    width: 88% !important;
    padding: 5px !important;
    margin-bottom: 5px;
  }
}

input:focus,
textarea:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
}

input:disabled {
  background: #EEE;
}

::placeholder {
  color: #BBB;
  letter-spacing: 1px;
  font-size: 1.4rem;
}

button,
label {
  user-select: none;
  cursor: pointer;
}

button {
  border: none;
  cursor: pointer;
  outline: none;
  appearance: none;
  margin: 20px 5px;
  background-color: #370000;
  color: #FFF;
  font-size: 1.6rem;
  padding: 15px 40px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1;
  border-radius: 50px;
  transition: 0.2s linear;
  width: fit-content;

  &:hover {
    opacity: 0.6;
  }
}

input[type=radio],
input[type=checkbox] {
  display: none;

  & + span {
    position: relative;
    cursor: pointer;
    display: block;
    padding-left: 20px;
    margin-right: 5px;
    border: 1px solid #CCC;
    background-color: #FFF;
    padding: 5px 15px 5px 30px;
    border-radius: 5px;
    margin-top: 5px;

    &:before {
      content: "";
      display: block;
      position: absolute;
      width: 15px;
      height: 15px;
      border: 1px solid #CCC;
      background-color: #FFF;
      border-radius: 2px;
      top: 50%;
      left: 10px;
      transform: translateY(-50%);
    }
  }

  &:checked {
    & + span {
      background-color: #F4F1E0;
      border: 1px solid #CCC;

      &:before {
        border: 1px solid #BAA223;
      }

      &:after {
        content: "";
        display: block;
        position: absolute;
      }
    }
  }
}

input[type=radio] {
  & + span {
    &:before {
      border-radius: 50%;
    }
  }

  &:checked {
    & + span {
      &:after {
        top: 50%;
        left: 13px;
        transform: translateY(-50%);
        width: 9px;
        height: 9px;
        background-color: #BAA223;
        border-radius: 50%;
      }
    }
  }
}

/*-----削除しない-----*/
.memo {
  display: none !important;
}

@media only screen and (max-width: 768px) {
  input[type="date"] {
    width: 50% !important;

    &::-webkit-date-and-time-value {
      text-align: left;
    }
  }

  .toggleCts {
    & input {
      display: block;
      width: 100% !important;
    }
  }
}

/**********フォーム**********/
.formCts {
  font-weight: 600;
  font-size: 1.6rem;
  margin-top: 15px;
  width: 60%;

  & dt {
    user-select: none;

    &:before {
      content: "■";
    }

    &:not(:first-child) {
      margin-top: 20px;
    }

    & span {
      background-color: #E50000;
      font-size: 80%;
      color: #FFF;
      border-radius: 20px;
      padding: 2px 10px;
      margin-left: 5px;
      font-size: 1.2rem;
    }
  }

  & dd {
    &.flexInput {
      display: flex;
      flex-wrap: wrap;

      & label {
        width: 200px;
      }
    }
  }

  & + button {
    margin: 30px auto 0;
    font-size: 1.8rem;
  }
}

@media only screen and (max-width: 768px) {
  .formCts {
    width: 100%;

    & dd {
      &.flexInput {
        & label {
          width: 100%;
        }
      }
    }
  }
}

/**********エラー**********/
.error {
  background-color: #FEE !important;
  border: solid 1px #E50000;
}

.errorMsg {
  color: #E50000;
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 5px;
  width: 100%;
  line-height: 1.6;
  text-indent: -1.5em;
  padding-left: 1.5em;

  &:before {
    content: "▲";
    margin-right: 5px;
  }
}

.formCts {
  & dd {
    &.error {
      margin-top: 5px;
      padding: 5px 10px 10px;

      & .errorMsg {
        margin-top: 0;
      }
    }
  }
}

/****************************************
確認画面
****************************************/
.confirmTable {
  & caption {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: #370000;
  }

  & tr {
    &:nth-child(odd) {
      background-color: #FFF;
    }

    &:nth-child(even) {
      background-color: #F4F1F1;
    }

    & th,
    td {
      padding: 10px;
      vertical-align: top;
    }

    & th {
      width: 10px;
      white-space: nowrap;

      &:before {
        content: "■";
      }
    }
  }
}

.btnArea {
  display: flex;
  justify-content: center;

  & button {
    padding: 15px 20px;

    &:first-child {
      background-color: #BBB;
      font-weight: 400;

      & i {
        margin-right: 5px;
      }
    }

    &:last-child {
      padding-right: 20px;
      padding-left: 30px;
      background-color: #370000;
      font-weight: 600;

      & i {
        margin-left: 5px;
      }
    }
  }
}

@media only screen and (max-width: 768px) {
  .confirmTable {
    margin-top: -30px;

    & tr {

      & th,
      td {
        padding: 0 20px;
        display: block;
      }

      & th {
        padding-top: 10px;
      }

      & td {
        padding-top: 5px;
        padding-bottom: 10px;
      }
    }
  }
}

/****************************************
送信完了画面
****************************************/
.finishCts {
  text-align: center;

  & dt {
    font-size: 2rem;
    color: #370000;
    font-weight: 600;
  }

  & dd {
    margin-top: 20px;
    line-height: 2;
  }

  & + a {
    border: 1px solid #000;
    display: block;
    width: fit-content;
    margin: 30px auto 0;
    border: 1px solid #370000;
    color: #370000;
    padding: 15px 20px;
    line-height: 1;
    border-radius: 50px;
    font-weight: 600;

    & i {
      margin-right: 5px;
    }
  }
}

@media only screen and (max-width: 768px) {
  .finishCts {
    & dd {
      text-align: justify;
    }
  }
}
