/* Adjust font sizes for WooCommerce info messages */
.woocommerce-info {
  font-size: 0.875rem;
}

/* Adjust size of WooCommerce login form on checkout */
.woocommerce-checkout form.checkout_coupon,
.woocommerce form.login {
  font-size: 0.875rem;
  max-width: 100%;
  width: 560px;
  margin: 0px auto 28px;
  box-shadow: 4px 0 11px 1px #e4e4e4;
  border-color: #e4e4e4;
  padding: 15px 34px 14px;
}
/* Adjust input field sizes for WooCommerce login form on checkout */
.woocommerce-checkout .woocommerce-form-login .input-text {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  height: 2.25rem;
  border-color: #dedede;
}

/* Adjust checkout page form font sizes */
form.woocommerce-checkout {
  font-size: 0.875rem;
}

/* Reduce padding for form rows on checkout page */
.woocommerce-checkout form .form-row {
  margin: 0 0 10px;
}

/* Adjust checkout page text input element font size */
.woocommerce-checkout .input-text,
.woocommerce-checkout .input-text::placeholder {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  height: 2.25rem;
  border-color: #dedede;
}

/* Adjust checkout page dropdown input element font size */
.woocommerce-checkout .select2-container .select2-search__field,
.woocommerce-checkout .select2-container .select2-selection,
.woocommerce-checkout .select2-container .select2-search__field::placeholder {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  height: 2.25rem;
  border-color: #dedede;
}
/* Adjust checkout page dropdown arrow */
.woocommerce-checkout
  .select2-container
  .select2-selection
  .select2-selection__arrow {
  height: 2.25rem;
}
/* Adjust selected choice */
.woocommerce-checkout
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 1.125rem;
}
/* Adjust checkout page dropdown container padding */
.woocommerce-checkout .select2-container .select2-dropdown {
  padding: 0.5rem 0.75rem;
}
.woocommerce-checkout .select2-container .select2-results__options {
  padding: 0.5rem 0.75rem;
}
/* Adjust checkout page dropdown input element font size */
.woocommerce-checkout .select2-container .select2-results__options {
  font-size: 0.875rem;
  padding: 0;
}

/* Reset customer details width (mobile first) */
.woocommerce-checkout .col2-set {
  width: 100%;
}

/* Keep Billing and Shipping details in the same column */
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
  float: none;
  width: 100%;
  border: 1px solid #dedede;
  border-radius: 5px;
  padding: 30px;
  background: white;
}

/* Add margin on top of shipping section */
.woocommerce-checkout .col2-set .col-2 {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Remove bottom margin from ship to a different address heading */
.woocommerce-checkout .col2-set .col-2 h3#ship-to-different-address {
  margin-bottom: 0;
}

/* Remove top margin from billing details heading */
.woocommerce-checkout .woocommerce-billing-fields > h3,
.woocommerce-checkout .woocommerce-shipping-fields > h3,
.woocommerce-checkout #order_review_heading {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
}

/* Lower padding and font size for billing and shipping input field labels */
.woocommerce-checkout .col2-set label {
  font-size: 13px;
  font-weight: 600;
  color: hsl(0deg 0% 10% / 70%);
  margin: 0;
}

/* Hide Order review heading */
.woocommerce-checkout #order_review_heading {
  display: none;
}

/* Make order review section 100% (mobile first) */
.woocommerce-checkout #order_review {
  width: 100%;
}

/* Make WooCommerce order table 100% */
.woocommerce-checkout #order_review table.shop_table {
  width: 100%;
}

/* Add a rounded border to WooCommerce order table */
.woocommerce-checkout #order_review table.shop_table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 5px;
  border: solid 1px #dedede;
  overflow: hidden; /* This ensures the inner content does not bleed out of the corners */
  background: #ffffff;
}

/* Style the first and last cells in each row to respect the table's border-radius */
.woocommerce-checkout
  #order_review
  table.shop_table
  tr:first-child
  th:first-child {
  border-top-left-radius: 5px;
}
.woocommerce-checkout
  #order_review
  table.shop_table
  tr:first-child
  th:last-child {
  border-top-right-radius: 5px;
}
.woocommerce-checkout
  #order_review
  table.shop_table
  tr:last-child
  td:first-child {
  border-bottom-left-radius: 5px;
}
.woocommerce-checkout
  #order_review
  table.shop_table
  tr:last-child
  td:last-child {
  border-bottom-right-radius: 5px;
}

/* Resize table header text */
.woocommerce-checkout thead .product-name,
.woocommerce-checkout thead .product-total {
  font-size: 0.875rem;
  color: hsl(0deg 0% 10% / 70%);
}

/* Adjust styling for product name */
.woocommerce-checkout .cart_item .product-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Remove background from payment section */
.woocommerce-checkout #payment {
  background: white;
  border: 1px solid#dedede;
  padding: 20px;
  margin-top: 30px;
}

/* Remove padding from the payment section */
#add_payment_method #payment ul.payment_methods,
.woocommerce-cart #payment ul.payment_methods,
.woocommerce-checkout #payment ul.payment_methods {
  padding: 0;
}
/* Hide Stripe payment method label */
.woocommerce-checkout label[for="payment_method_stripe"] {
  display: none;
}
/* Change the background of the payment section */
#add_payment_method #payment div.payment_box,
.woocommerce-cart #payment div.payment_box,
.woocommerce-checkout #payment div.payment_box {
  background: none;
  padding: 0;
}
/* Change the background color of its pseudo before arrow */
#add_payment_method #payment div.payment_box::before,
.woocommerce-cart #payment div.payment_box::before,
.woocommerce-checkout #payment div.payment_box::before {
  border: none;
}

/* Remove coupon toggle section */
/*
.woocommerce-checkout .woocommerce-form-coupon-toggle {
  display: none;
}
*/

/* Adjust styling for buttons */
.woocommerce-checkout .wp-element-button,
.wp-block-button__link {
  font-size: 0.875rem;
  background-color: var(--wp--preset--color--secondary);
  font-weight: 600;
  width: 100%;
}

/* Adjust font-size for terms and conditions checkbox */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper,
.woocommerce-checkout .form-row.privacy {
  font-size: 0.75rem;
}
/* Adjust padding in place order section */
.woocommerce-checkout #payment div.form-row {
  padding: 0;
}
/* Styling for cancel subscription legend */
.woocommerce-checkout .mpc-pause-cancel-legend {
  font-size: 0.75rem;
  text-align: center;
}

/* Make the checkout button full width */
.woocommerce-checkout .woocommerce-checkout-payment #place_order {
  font-size: 1.125rem;
  width: 100%;
  font-weight: 600;
  padding: 1em;
  background-color: var(--wp--preset--color--primary);
}

/* Make shipping row text smaller */
.woocommerce-checkout-review-order-table .shipping {
  font-size: 0.75rem;
  color: hsl(0deg 0% 10% / 70%);
}
.woocommerce table.shop_table tfoot .shipping th,
.woocommerce table.shop_table tfoot .shipping td {
  font-weight: 600;
}

/* Hide Initial Shipment row */
.woocommerce-shipping-totals.shipping {
  display: none;
}
/* Hide Cart Subtotal row */
.woocommerce-checkout-review-order-table .cart-subtotal {
  display: none;
}

/* Hide .order-total only when .woocommerce-checkout-review-order-table contains .recurring-total */
.woocommerce-checkout-review-order-table:has(.recurring-total) .order-total {
  display: none;
}

/* Keep .order-total visible when .order-total also has .recurring-total */
.woocommerce-checkout-review-order-table .order-total.recurring-total {
  display: table-row;
}

/* Hide Recurring totals summary row */
.woocommerce-checkout-review-order-table .recurring-totals {
  display: none;
}

/* Increase totals price size */
.woocommerce-checkout-review-order-table
  .order-total
  .woocommerce-Price-amount {
  font-weight: 700;
  font-size: 1.5rem;
}

/* -- Order Confirmation Page Styles --  */
/* Order confirmation main heading */
h1.wp-block-woocommerce-legacy-template {
  font-size: var(--wp--preset--font-size--large);
  font-weight: var(--wp--custom--font-weight--semi-bold);
}
/* Main Thank you message */
.woocommerce-page .woocommerce-thankyou-order-received {
  font-size: var(--wp--preset--font-size--base);
}
/* Order review table */
.woocommerce-page ul.woocommerce-order-overview {
  font-size: var(--wp--preset--font-size--x-small);
}
/* Membership thank you message */
.mpc-membership-thank-you {
  font-size: var(--wp--preset--font-size--small);
}
.mpc-thank-you-title {
  font-weight: var(--wp--custom--font-weight--semi-bold);
  display: block;
}
.mpc-thank-you-link {
  color: var(--wp--preset--color--primary);
  font-weight: var(--wp--custom--font-weight--semi-bold);
}
/* Hide order details */
.woocommerce-order-details {
  display: none;
}
.woocommerce-customer-details {
  display: none;
}

/* Media Queries */
@media screen and (min-width: 960px) {
  /* Set .woocommerce-checkout as a flex container */
  form.woocommerce-checkout {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 100px;
  }

  /* Make customer details section constrained */
  .woocommerce-checkout .col2-set {
    width: 440px;
    max-width: 100%;
  }
  /* Make order review section constrained */
  .woocommerce-checkout #order_review {
    width: 450px;
    max-width: 100%;
  }
}
