.woocommerce-checkout{
  #primary.content-area {
    max-width: 770px;
    margin-left: auto;
    margin-right: auto;
  }
  .woocommerce-info,
  .woocommerce-order{
    margin-top: 50px;
  }
}
.woocommerce .checkout.woocommerce-checkout {
  .woocommerce-billing-fields {
    > h3 {
      margin-bottom: 40px;
    }
  }
  .woocommerce-billing-fields,
  .woocommerce-additional-fields,
  .shipping_address {
    .form-row {
      display: flex;
      align-items: center;
      width: 100%;
      margin-bottom: 20px;
      clear: both;
      > span {
        flex: 1;
      }
    }
  }
  #billing_first_name_field,
  #billing_email_field {
    width: 59%;
    float: left;
    clear: none;
  }
  #billing_last_name_field,
  #billing_phone_field {
    width: calc(41% - 30px);
    float: right;
    clear: none;
    label {
      display: none;
    }
  }
  #billing_company_field,
  #shipping_company_field,
  #order_comments_field {
    clear: both;
    label span {
      display: none;
    }
  }
  #order_comments_field {
    label {
      align-self: flex-start;
    }
  }
  #customer_details {
    display: flex;
    flex-wrap: wrap;
    .col-1,
    .col-2 {
      padding-left: 0;
      padding-right: 0;
      flex: 0 0 100%;
      max-width: 100%;
      width: auto;
      float: none;
    }
  }
  #customer_details > .col-2 {
    display: flex;
    flex-wrap: wrap;
    .woocommerce-shipping-fields {
      order: 2;
      width: 100%;
      margin-bottom: 28px;
    }
    .woocommerce-additional-fields {
      order: 1;
      width: 100%;
      > h3 {
        margin-bottom: 20px;
      }
    }
  }
  .select2-selection {
    height: 50px;
    span {
      height: 50px;
      line-height: 50px;
      padding-left: 20px;
    }
    .select2-selection__placeholder {
      padding-left: 0;
    }
  }
  label {
    position: relative !important;
    line-height: inherit;
    font-weight: 500;
    color: #2a2a2a;
    max-width: 140px;
    width: 100%;
    margin-right: 30px;
    .required {
      color: #fd4170;
    }
  }
  h3 label {
    max-width: 100%;
  }
  textarea {
    width: 100%;
    min-height: 150px;
    padding: 13px 20px;
  }
  #order_review {
    border-top: 1px solid #e7e7e7;
    padding-top: 40px;
    display: flex;
    .review-order,
    #payment {
      flex: 0 0 50%;
      max-width: 50%;
    }
    table {
      margin: 0;
      padding-right: 15px;
      border: 0;
      flex: 0 0 50%;
      max-width: 50%;

      th,
      td {
        border: 0;
      }

      th.product-name,
      td.product-name {
        text-align: left;
        padding-left: 0;
      }

      td.product-total {
        text-align: right;
      }

      tr.woocommerce-shipping-totals td {
        font-weight: 500;
        ul {
          padding-left: 0;
          margin-bottom: 0;
          list-style-type: none;
          label {
            width: auto;
            max-width: inherit;
            margin-right: 0;
          }
          input {
            margin-right: 8px;
          }
        }
      }
      thead {
        tr th.product-name {
          font-size: 24px;
          line-height: 36px;
          font-weight: 500;
          padding-left: 0;
          color: var(--civi-color-primary);;
          padding-top: 0;
          padding-bottom: 20px;
        }
      }
      tbody {
        padding-bottom: 15px;
        border-bottom: 1px solid #e7e7e7;
        td.product-name {
          font-size: 15px;
          strong {
            color: var(--civi-color-primary);;
          }
        }
        td.product-total {
          .amount {
            font-size: 15px;
            color: #ababab;
            font-weight: 500;
          }
        }
        tr:last-child td {
          padding-bottom: 18px;
        }
        tr:first-child td {
          padding-top: 0;
        }
      }
      tfoot {
        th,
        td {
          padding-top: 13px;
          padding-bottom: 13px;
        }
        th {
          text-align: left;
          font-size: 18px;
          font-weight: 500;
          color: #2a2a2a;
          padding-left: 0;
        }
        td {
          text-align: right;
          .amount {
            font-size: 15px;
            font-weight: 500;
          }
        }
        tr {
          border-bottom: 1px solid #e7e7e7;
          &.cart-subtotal td .amount {
            color: var(--civi-color-primary);;
          }
          &.shipping th {
            display: flex;
            align-self: flex-start;
          }
          &:last-child {
            border-bottom: 0;
          }
          &.order-total {
            th,
            td {
              padding-top: 24px;
            }
            td .amount {
              font-size: 20px;
              color: var(--civi-color-accent);
            }
          }
        }
      }
    }
    #payment {
      padding-left: 15px;
      background: none;
      .order-title {
        font-size: 24px;
        line-height: 36px;
        font-weight: 500;
        color: var(--civi-color-primary);;
        margin-bottom: 20px;
      }
      ul.payment_methods {
        padding-top: 0;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0;
        list-style-type: none;
        li {
          margin-bottom: 20px;
          line-height: 28px;
        }
        p {
          margin-bottom: 0;
        }
        li.wc_payment_method {
          width: 100%;
          border: 1px solid #ccc;
          position: relative;
          label {
            display: block;
            padding: 20px;
            cursor: pointer;
          }
          input {
            position: absolute;
            right: 0;
            top: 26px;
            margin-right: 20px;
          }
          .payment_box {
            margin: 0;
            padding: 20px;
            background: var(--civi-color-accent);
            border-color: var(--civi-color-accent);
            color: #fff;
            &:before {
              border-bottom-color: var(--civi-color-accent);
            }
          }
        }
      }
      label {
        max-width: inherit;
        width: auto;
        margin-right: 0;
        margin-bottom: 0;
        vertical-align: -1px;
      }

      .place-order {
        padding: 0;
        margin-top: 30px;
      }
      .place-order .button {
        padding: 20px;
        background: var(--civi-color-primary);
        border-radius:30px;
        color: #fff;
        text-transform: uppercase;
        width: 100%;
        border: 0;
        outline: 0;
        transition: all 0.3s;
        &:hover {
          background: var(--civi-color-accent);
          transition: all 0.3s;
        }
      }
    }
  }
}
.woocommerce-privacy-policy-text {
  margin-bottom: 30px;
}
.woocommerce ul.order_details {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 30px;
  list-style-type: none;
  border: 1px dashed #e7e7e7;
  li {
    flex: 1;
    margin: 0;
    padding: 15px;
    border-bottom: 1px dashed #e7e7e7;
    border-left: 1px dashed #e7e7e7;
    border-right: 0;
    &:first-child {
      border-left: 0;
    }
  }
  li > span {
    min-width: 140px;
    display: inline-block;
    margin-bottom: 10px;
  }
  li strong {
    color: var(--civi-color-primary);
    font-weight: 500;
  }
}
.woocommerce {
  .woocommerce-order-details__title,
  .woocommerce-column__title {
    font-size: 24px;
    line-height: 36px;
    font-weight: 500;
    color: var(--civi-color-primary);
    margin-bottom: 20px;
  }
}
.woocommerce .woocommerce-order-details .order_details {
  margin-bottom: 30px;
  .amount {
    color: var(--civi-color-primary);
    font-weight: 500;
  }
  thead th {
    border: 0;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    color: var(--civi-color-primary);
    &.product-name {
      text-align: left;
    }
  }
  tbody td {
    &.product-name {
      text-align: left;
      padding: 15px;
      a {
        color: var(--civi-color-primary);
        font-size: 15px;
        line-height: 24px;
      }
      a:hover {
        color: var(--civi-color-accent);
      }
      strong {
        color: var(--civi-color-primary);
      }
    }
    &.product-total {
      .amount {
        font-weight: 500;
      }
    }
  }
  tfoot {
    td,
    th {
      padding: 15px;
      font-weight: 500;
      color: var(--civi-color-primary);
    }
    tr th {
      color: var(--civi-color-primary);
    }
    tr:last-child td .amount {
      color: var(--civi-color-accent);
      font-size: 18px;
    }
  }
}
.woocommerce .woocommerce-customer-details {
  .woocommerce-columns {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
    .col-1,
    .col-2 {
      padding-left: 15px;
      padding-right: 15px;
      flex: 0 0 50%;
      max-width: 50%;
      width: auto;
      float: none;
    }
  }
  .woocommerce-column__title {
    font-weight: 500;
    margin-bottom: 20px;
  }
}

@media only screen and (max-width: 767px) {
  .woocommerce .checkout.woocommerce-checkout {
    .shipping_address .form-row:last-child {
      margin-bottom: 12px;
    }
    label {
      margin-right: 15px;
    }
    #billing_first_name_field,
    #billing_email_field {
      width: 62%;
    }
    #billing_last_name_field,
    #billing_phone_field {
      width: calc(38% - 30px);
    }
    #order_review {
      display: block;
      padding-top: 40px;
      table,
      #payment {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
      }
    }
  }
}

@media only screen and (max-width: 600px) {
  .woocommerce .checkout.woocommerce-checkout {
    .woocommerce-billing-fields > h3 {
      font-size: 28px;
      margin-bottom: 20px;
    }
    label {
      margin-bottom: 10px;
    }
    .woocommerce-billing-fields .form-row,
    .woocommerce-additional-fields .form-row,
    .shipping_address .form-row {
      display: block;
      margin-bottom: 20px;
    }
    #billing_first_name_field,
    #billing_email_field,
    #billing_last_name_field,
    #billing_phone_field {
      width: 100%;
    }
    .shipping_address {
      margin-top: 30px;
      label {
        margin-right: 0;
        margin-bottom: 10px;
      }
    }
    #order_review {
      table thead tr th.product-name {
        padding-bottom: 20px;
      }
      #order_review #payment .order-title {
        margin-bottom: 20px;
      }
    }
  }
}

@media only screen and (max-width: 479px) {
  .woocommerce .woocommerce-order-overview li > span {
    min-width: inherit;
  }
}