.woocommerce-checkout {
  font-family: Noto Sans TC;

  .tutorstarter-checkout-container {
    margin: 0 !important;
    display: grid;
    justify-content: center;
    grid-template-columns: 580px 440px;
    column-gap: 20px;
  }

  .shop_table {
    .col-th {
      width: 30%;
    } /* normal th width */
    .col-td {
      width: 40%;
    } /* td part 1 */
    .col-extra {
      width: 30%;
    } /* td part 2 */
  }

  .checkout__terms-checkbox-container {
    position: relative;
    display: flex;
    gap: 0.5em;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;

    .checkout__terms-checkbox {
      height: 18px;
      width: 18px;
      border-radius: 5px;
      vertical-align: middle;
      border: 1px solid #5a5a5a;
      appearance: none;
      cursor: pointer;
      position: relative;
      display: inline-block;
    }
    .checkout__terms-checkbox:checked {
      background-color: #487764;
      border-width: 0;
    }
    .checkout__terms-checkbox:checked::after {
      content: '✔' !important;
      color: white;
      font-size: 12px;
      font-weight: bold;
      position: absolute;
      top: 52%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }
  .checkout__terms {
    font-size: 14px;
    line-height: 150%;
    color: #545454;
    font-weight: 500;
    letter-spacing: 1.1px;
    .checkout__terms-link {
      color: rgb(51, 102, 187);
      text-decoration: underline;
    }
  }
  .checkout__tbody {
    border-top: 1px solid #000;

    .order-total th,
    .order-total td {
      padding: 24px 0 24px !important;
    }

    .cart-discount {
      font-size: 18px;
      color: #487764;
      .coupon-text-title {
        padding: 18px 0 0;
      }
    }

    .coupon-code-container {
      font-size: 14px;
      letter-spacing: 1.4px;
      background-color: #f2f8f6;
      border-radius: 4px;
      margin-left: 6px;
      padding: 3px 12px;

      .coupon-code {
        display: inline-block;
        max-width: 128px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;

        position: relative;
        top: 6px;
      }

      .woocommerce-remove-coupon {
        position: relative;
        top: 3px;
        left: 4px;
      }
    }
  }
  .checkout__thead {
    img {
      width: 105px;
      height: 60px;
      border-radius: 10px;
    }

    td {
      padding-top: 0px !important;
      padding-bottom: 24px !important;
    }

    .checkout__haed-product {
      display: flex;
      justify-content: space-between;
      margin-right: 2px;
      margin-left: 12px !important;
      p {
        font-weight: 500;
        color: black;
      }
    }
  }

  .woocommerce-Price-amount {
    font-family: Noto Sans;
    font-size: 18px;
    font-weight: 500;
    color: #5a5a5a;
    position: relative;
    top: 3px;
  }
  .order-total.span {
    font-weight: 700;
  }

  .woocommerce-checkout-payment {
    .checkout__ship {
      margin-top: 24px;
      font-size: 18px;
      font-weight: 500;
      color: #000;
      line-height: 150%;
      letter-spacing: 1.8px;
    }
  }

  .required-star {
    color: red;
    border: 0 !important;
    text-decoration: none;
    position: relative;
    font-family: 'AlJazeera', Arial, sans-serif;
    font-size: 26px;
    top: 6px;

    &.large {
      margin-left: 4px;
    }

    &.small {
      font-size: 18px;
      top: 2px;
    }
  }

  .payment_method_ecpay .payment-method-description {
    font-size: 16px;
    color: #afafaf;
    line-height: 150%;
    letter-spacing: 1.6px;
    margin-left: 12px;
  }

  .woocommerce-billing-fields__field-wrapper {
    p label {
      font-family: Noto Sans TC;
    }
  }

  .payment_method_ecpay,
  .checkout__ship,
  .woocommerce-input-wrapper {
    select {
      width: 180px;
      height: 36px;
      border-radius: 5px;
      color: #5a5a5a;
      font-size: 14px;
      border: none !important;
      padding: 8px 32px 8px 8px;
      margin-left: 32px;
      font-weight: 500;
      line-height: 150%;
      letter-spacing: 2.1px;

      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      background: right no-repeat #efefef
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="%235A5A5A" d="M480-362q-8 0-15-2.5t-13-8.5L268-557q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-373q-6 6-13 8.5t-15 2.5Z"/></svg>') !important;
      background-repeat: no-repeat;
      background-position: right 8px center !important;
      background-size: 16px !important;
      cursor: pointer;
    }
  }
  .checkout__ship select {
    margin-left: 26px !important;
  }
  .woocommerce-input-wrapper select {
    margin-left: 46px !important;
  }

  .woocommerce-input-wrapper input {
    #billing_phone,
    #billing_email {
      font-family: Noto Sans;
    }
  }

  .form-row.validate-required.woocommerce-validated {
    gap: 0 !important;
  }

  .woocommerce-invoice-fields__field-wrapper {
    padding: 36px !important;
    label {
      font-family: Noto Sans TC !important;
      font-size: 18px !important;
      font-weight: 500 !important;
      line-height: 150% !important;
      letter-spacing: 1.8px !important;
      color: #000;
    }
    p {
      padding: 0 !important;
      margin-bottom: 0px !important;
    }

    p#invoice_carruer_type_field,
    p#invoice_no_field,
    p#invoice_donate_no_field {
      margin-top: 24px;
    }

    p#invoice_donate_no_field {
      margin-top: 24px !important;
      gap: 0 !important;
      span {
        margin-left: 26px;
      }
    }

    p#invoice_carruer_no_field,
    p#invoice_no_field {
      margin-top: 24px !important;
      gap: 0 !important;
      span {
        margin-left: 46px;
      }
    }
    span {
      input {
        height: 36px;
        padding: 6px 12px !important;
        color: #5a5a5a;
        font-size: 16px;
        font-style: normal;
        font-weight: 500;
        letter-spacing: 1.6px;
        border-radius: 5px !important;
        border: none !important;
        background: #efefef !important;
      }
    }
  }

  .woocommerce-invalid label {
    color: #000 !important;
  }

  .cart-coupon {
    display: flex;
    justify-content: center;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: 1.8px;
    border: none !important;
    padding: 0 0 24px;

    input#coupon-code {
      height: 48px;
      width: calc(100% - 80px);
      color: #5a5a5a;
      border-radius: 12px 0px 0px 12px;
      background: #e8e8e8;

      font-family: Noto Sans;
      font-size: 18px;
      font-style: normal;
      font-weight: 500;
      line-height: 150%;
      letter-spacing: 1.8px;
      border: none;
      outline: none;
      text-align: center;

      padding: 10px 22px;
    }
    input#coupon-code:focus {
      color: #487764;
    }
    button {
      height: 48px;
      color: #fff;
      border-radius: 0px 12px 12px 0px;
      background: #487764;
      font-size: 18px;
      font-style: normal;
      font-weight: 500;
      line-height: 150%;
      letter-spacing: 1.8px;
    }
    button:hover {
      background: #487764 !important;
    }
  }
  .coupon-notices-wrapper {
    .woocommerce-error,
    .woocommerce-message {
      margin: 0 !important;
      font-size: 16px;
    }
  }

  .woocommerce table.shop_table {
    margin: 0 !important;
  }

  .cart-page-payment-heading {
    background-color: #487764;
    padding: 9px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;

    .payment-method-title {
      font-size: 20px;
      color: white;
      font-weight: 500;
      line-height: 150%;
      letter-spacing: 3px;
    }

    .payment-method-description-mobile {
      color: #9fbcb0;
      font-size: 12px;
      line-height: 150%;
      display: none;
    }
  }
}

@media (max-width: 499px) {
  .woocommerce-checkout {
    .required-star {
      font-size: 20px !important;
      top: 4px !important;
    }

    .woocommerce-billing-fields__field-wrapper {
      > p {
        flex-direction: column !important;
        align-items: start !important;
        .woocommerce-input-wrapper {
          margin-left: 0 !important;
        }
      }
      #billing_phone_field {
        padding: 0 !important;
      }
    }

    .checkout-order-summary {
      width: 330px;
      max-width: 330px;
    }

    .woocommerce-checkout-payment {
      .checkout__ship {
        font-size: 14px !important;
        letter-spacing: 1.4px !important;

        select {
          margin-left: 1px !important;
        }
      }
      .payment-method-description-mobile {
        font-size: 14px;
        letter-spacing: 1.4px;
      }
      .payment-method-description {
        display: none;
      }
    }

    .woocommerce-invoice-fields__field-wrapper {
      padding: 24px !important;
      label {
        font-size: 14px !important;
        letter-spacing: 1.4px !important;
      }
    }

    .woocommerce-input-wrapper select,
    #invoice_no_field span,
    #invoice_donate_no_field span,
    #invoice_carruer_no_field span {
      margin-left: 5px !important;
    }

    .checkout__haed-product {
      height: 60px;
      flex-direction: column;
      font-size: 14px;
      text-align: left !important;
    }

    .checkout__summery-footer {
      margin: 0;
    }

    .cart-coupon {
      input#coupon-code {
        font-size: 16px;
      }
    }

    .coupon-code-container {
      .coupon-code {
        width: 72px;
        top: 4px;
      }
    }

    .coupon-text-title {
      font-size: 16px !important;
    }

    .shop_table {
      .col-th {
        width: 40%;
      } /* normal th width */
      .col-td {
        width: 40%;
      } /* td part 1 */
      .col-extra {
        width: 20%;
      } /* td part 2 */
    }

    .payment-method-description-mobile {
      display: block !important;
    }

    .woocommerce-Price-amount {
      font-size: 16px;
    }
  }
}
