/* #calc */

/* 共通 */
/* button */
button.toTop {
  all: unset;
  display: block;
  border-radius: 30px;
  border: 2px solid var(--button-color);
  box-shadow: none;
  background: #fff;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease-out;

  a {
    display: inline-block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--button-color);
    padding: 15px 60px;
  }
}

button.toTop:hover {
  box-shadow: 0 0 10px #0000001a;
  background: var(--main-color);
  border-color: #fff;
  transition: all 0.3s ease-out;

  a {
    color: #fff;
  }
}

#Contents{
    max-width: 1440px;
    margin: 0 auto;
}

.calculatorItemInput.textBox {
  input {
    all: unset;
    width: 80px;
    height: 25px;
    font-weight: 500;
    line-height: 1.8;
    text-align: left;
    padding: 10px 20px;
    background: #fff;
    border: 0.7px solid var(--sub-color);
    border-radius: 5px;
    margin-right: 10px;
  }

  span {
    line-height: 1.8;
  }
}
.calculatorItemInput {
  label input {
    display: none;
  }

  .imgBox {
    max-width: 100px;
    box-shadow: 0 0 7px #c5c2ae;
    cursor: pointer;
  }
}

.preferenceInput {
  display: none;
  .textBox{
    margin-bottom: 16px;
}
}

@media screen and (max-width: 768px) {
  button.toTop {
    a {
      font-size: 1.3rem;
    }
  }
  #Contents{
      max-width: 100%;
  }
}
/* // */

#fv {
    display: block;
  width: 100%;
  height: 420px;
  background: url(../Contents/Feature/calcTop.png) no-repeat center / cover;
  position: relative;

  .message {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    h1 {
      font-size: 3.2rem;
      font-weight: 700;
      color: #ffe064;
      line-height: 1;
      letter-spacing: 0.07em;
      margin-bottom: 24px;
    }

    p {
      font-size: 3.2rem;
      font-weight: 700;
      color: #fff;
      line-height: 1;
      letter-spacing: 0.07em;
    }
  }
}

@media screen and (max-width: 767px) {
  #fv {
    background: url(../Contents/Feature/calcTopSp.png) no-repeat center / cover;
  
    .message {
        width: 100%;
        h1{font-size: clamp(2.4rem, 10vw, 3.2rem);}
        p{ font-size: 2.4rem;}
    }
  }
}

#calculation .calculationInner {
  text-align: center;
  padding-top: 0;

  p.intro {
    font-size: 2rem;
    letter-spacing: 0.07em;
    line-height: 2;
    padding: 4.4445% 0;
  }

  .container {
    background: #fff;
    section.wrapper {
      max-width: 640px;
      padding: 6.667% 0;
    }

    .stepTitle {
      .stepNumber {
        display: block;
        font-size: 3.2rem;
        font-weight: 500;
        line-height: 1;
        color: var(--sub-color);
        margin-bottom: 16px;
      }
    }

    .calculatorList {
      .calculatorItem {
        align-items: stretch;
        gap: 40px;
        margin-bottom: 40px;

        .indexBlock {
          align-items: stretch;
          width: 206px;

          .listNum {
            height: 100%;
            font-size: 1.6rem;
            font-family: "Barlow Semi Condensed", Arial, sans-serif;
            font-weight: 700;
            color: #fff;
            background: var(--sub2-color);
            align-items: stretch;
            margin-right: 10px;
            padding: 5px;
          }

          .listLabel {
            font-size: 2rem;
            font-weight: 700;
            line-height: 1.4;
            letter-spacing: 0.07em;
            color: var(--main-color);
          }
        }
        .radioBox {
          .inputBlock {
            input {
              display: block;
              width: 27px;
              height: 27px;
              border-color: var(--sub-color);
              margin-right: 5px;
              accent-color: var(--main-color);
              -webkit-appearance: auto;
              -moz-appearance: auto;
              -ms-appearance: auto;
              -o-appearance: auto;
              appearance: auto;
            }

            span {
              font-weight: 500;
              line-height: 1.8;
            }
          }

          .inputBlock:first-child {
            margin-bottom: 10px;
          }
        }
      }

      .calculatorItem:nth-child(3),
      .calculatorItem:nth-child(4) {
        .calculatorItemInput {
          width: 392px;

          .calculatorItemInputBox {
            grid-template-columns: repeat(3, minmax(80px,100px));
            gap: 16px;
            margin-bottom: 10px;
          }

          .showSelected,
          .showWeightSelected {
            text-align: left;
            height: 80px;

            .selectedLabel {
              font-size: 1.6rem;
              font-weight: 700;
              line-height: 1.8;
              color: var(--main-color);
            }

            .selectedText {
              font-weight: 500;
              line-height: 1.8;
            }
          }
        }
      }

      .calculatorItem:nth-child(4) {
        margin-bottom: 0;

        .calculatorItemInputBox {
          flex-wrap: wrap;
        }
      }
    }

    .step2.wrapper {
      max-width: 1440px;
      background: #fff;
      padding-bottom: 4.445%;

      p {
        font-size: 1.6rem;
        margin-bottom: 40px;
      }

      .calculatorItemInputBox {
        max-width: 640px;
        grid-template-columns: repeat(4, 1fr);
        gap: 28.67px;
        margin-bottom: 40px;

        .imgBox {
          max-width: 138px;
          max-height: 160px;

          img {
            height: 100%;
          }
        }
      }

      .combined {
        padding: 40px 0;

        h3 {
          font-size: 2rem;
          margin-bottom: 16px;
        }

        .calculatorItemInput {
          margin-bottom: 16px;
        }

        span {
          line-height: 1.8;
        }
      }
    }

    .step3.wrapper {
      max-width: 1440px;
      padding: 4.445% 0;
      background: var(--nutritionistBg-color);

      .imgBox.Polygons {
        justify-content: center;
        gap: 32px;
        margin-bottom: 16px;

        img {
          width: auto;
        }
      }

      h2 {
        margin-bottom: 40px;
      }

      h2::before,
      h2::after {
        display: none;
      }

      p {
        font-size: 1.6rem;
        margin-bottom: 40px;

        .color {
          font-size: 1.6rem;
          font-weight: 700;
          color: var(--button-color);
        }
      }

      table {
        max-width: 640px;
        width: 100%;
        border-collapse: collapse;
        padding: 0 10px;
        margin-bottom:24px;

        tr:first-child th:first-child {
          border: none;
          background: var(--nutritionistBg-color);
        }

        th,
        td {
          font-size: 1.6rem;
          /* line-height: 1.8; */
          padding: 16px 24px;
          text-align: center;
          border: 3px solid #fff;
        }

        th {
          background-color: #edebe2;
          font-weight: bold;
        }

        th.color {
          background-color: var(--button-color);
          color: #fff;
        }

        td {
          background-color: #f8f6ec;
          font-weight: bold;
        }

        td.color {
          background-color: rgb(255, 239, 222);
        }

        tr:nth-child(2) {
          td,
          span {
            font-size: 2.4rem;
            line-height: 1;
            font-weight: 700;
          }
          td.color {
            color: var(--button-color);
          }
          span#product-amount {
            color: var(--button-color);
          }
        }

        tr:last-child span {
          font-size: 1.6rem;
          font-weight: 700;
        }
      }
      p.caution{
          font-size:1.4rem;
      }
    }

    .step4.wrapper {
      max-width: 1440px;
      background: #fff;
      padding-bottom: 4.445%;

      h2 span {
        all: inherit;
        margin-bottom: 0;
      }

      p {
        font-size: 1.6rem;
        margin-bottom: 40px;
      }

      .foodSubstitution {
        max-width: 640px;
        background: var(--substitutionBg-color);
        padding: 24px;
        margin-bottom: 40px;

        .row {
          width: 100%;
          justify-content: space-around;
          margin-bottom: 16px;

          div {
            width: 153px;
          }

          .label span {
            display: block;
            font-size: 2rem;
            font-weight: 700;
            line-height: 1.4;
            letter-spacing: 0.07em;
            padding: 15px 0;
          }

          .newFood span {
            color: var(--button-color);
          }

          .oldFood {
            width: 172px;

            span {
              display: inline-block;
              width: 100%;
            }
          }

          .step {
            padding: 10px 15px;
            background: var(--button-color);

            span {
              font-size: 1.6rem;
              font-weight: 700;
              line-height: 1.2;
              color: #fff;
            }
          }
        }
      }
    }
  }
}

@media screen and (max-width: 767px) {
  #calculation .calculationInner {
    p.intro {
      padding: 40px 0;
    }

    .container {
      background-color: inherit;
      
      section.wrapper {
        padding: 64px 24px;

        .stepTitle {
          .stepNumber {
            font-size: 2.4rem;
          }

          h2 {
            margin-bottom: 32px;
          }
        }

        /* step1 */
        .calculatorItem {
          flex-direction: column;
          gap: 8px;

          .indexBlock .listLabel {
            font-size: 1.8rem;
          }
          
            .indexBlock .listNum {
              min-height: 0;
                }

          .radioBox {
            display: flex;
            align-items: center;
            gap: 32px;

            .inputBlock:first-child {
              margin-bottom: 0 !important ;
            }
          }
        }

        .calculatorItem:nth-child(2),
        .calculatorItem:nth-child(3),
        .calculatorItem:nth-child(4) {
          gap: 16px;

          .calculatorItemInput {
            width: 100%;
            text-align: left;
          }
        }
      }

      /* step2 */
      .step2.wrapper {
        padding-bottom: 64px;

        .stepTitle {
          h2 {
            margin-bottom: 24px;
          }
        }

        p {
          font-size: 1.5rem;
          margin-bottom: 24px;
        }

        .calculatorItemInput {
          .calculatorItemInputBox {
            grid-template-columns: repeat(2, minmax(100px,138px));
            justify-content: center;
            margin-bottom: 24px;
          }
        }

        .combined {
          padding: 16px 0;
        }
      }

      /* step3 */
      .step3.wrapper {
        padding: 48px 24px;

        .imgBox.Polygons {
          width: 100px;
          margin: 0 auto 16px;
          justify-content: space-between;
          gap: 0;

          img {
            width: 22.75px;
          }
        }

        h2,
        p {
          margin-bottom: 24px;
        }
        
        p{
            text-align:left;
        }

        table {
            margin-bottom: 16px;
          th,
          td {
            padding: 9px 14px;
          }

          th.row {
            width: 80px;
            font-size: 1.4rem;
            padding: 9px;
          }

          tr:nth-child(2) {
            td,
            span {
              font-size: 1.8rem;
            }
          }

          tr:last-child {
            td span {
              font-size: 1.5rem;
            }
          }
        }
      }

      /* step4 */
      .step4.wrapper {
        padding-bottom: 64px;

        h2 {
          margin-bottom: 40px;
        }

        .foodSubstitution {
          padding: 13px;

          .row {
            gap: 16px;
            padding: 0 16px;
            margin-bottom: 8.6px;

            .label {
              width: 129px;

              span {
                width: 129px;
                font-size: 1.5rem;
              }
            }

            .label.newFood {
              text-align: left;
            }

            div {
              width: 80px;
            }

            .step {
              padding: 0 8px;
              width: 92px;

              span {
                font-size: 1.3rem;
              }
            }
          }

          .row:first-child {
            padding-right: 0;
          }
        }
      }
    }
  }
}


