.wc-block-cart,
.wp-block-woocommerce-cart,
.wc-block-checkout,
.wp-block-woocommerce-checkout {
  .wc-block-components-product-details {
    margin-top: 8px;

    .arraysubs-subscription-meta {
      display: block;
      margin-top: 6px;
      line-height: 1.5;

      [aria-hidden="true"] {
        display: none;
      }
    }

    .wc-block-components-product-details__name {
      display: block;
      margin-bottom: 2px;
      color: #50575e;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.01em;
      text-transform: none;
    }

    .wc-block-components-product-details__value {
      display: block;
      color: #1e1e1e;
      font-size: 13px;
    }
  }
}

.wc-block-cart table.wc-block-cart-items,
.wp-block-woocommerce-cart table.wc-block-cart-items {
  .arraysubs-trial-cart-item {
    .wc-block-cart-item__prices,
    .wc-block-components-sale-badge {
      display: none;
    }

    .wc-block-cart-item__total .wc-block-components-product-price {
      max-width: 180px;
      margin-left: auto;
      font-size: 13px;
      line-height: 1.4;
      white-space: normal;
    }
  }
}

.woocommerce-cart,
.woocommerce-checkout {
  .shop_table dl.variation {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    align-items: start;
    margin: 8px 0 0;
    padding: 0;
    text-align: left;
    font-size: 12px;
  }

  .shop_table dl.variation dt,
  .shop_table dl.variation dd {
    float: none;
    clear: none;
    margin: 0;
    padding: 0;
    text-align: left;
    line-height: 1.45;
    font-size: inherit;
  }

  .shop_table dl.variation dt {
    color: #50575e;
    font-weight: 600;
    white-space: normal;
  }

  .shop_table dl.variation dt:not(:first-child) {
    margin-top: 6px;
  }

  .shop_table dl.variation dd {
    min-width: 0;
    color: #1e1e1e;
  }

  .shop_table dl.variation dd p {
    display: block;
    margin: 0;
    padding: 0;
    text-align: left;
    line-height: inherit;
  }

  .shop_table dl.variation dd small {
    color: #646970;
    font-size: 12px;
  }
}

#order_review.woocommerce-checkout-review-order table.woocommerce-checkout-review-order-table,
.woocommerce-checkout-review-order table.woocommerce-checkout-review-order-table {
  tbody td.product-name,
  tbody td.product-total {
    vertical-align: top;
    line-height: 1.45;
  }

  tbody td.product-name {
    overflow-wrap: anywhere;
  }

  tbody td.product-total {
    text-align: right;
    white-space: normal;
  }

  tbody td.product-total .subscription-subtotal {
    display: inline-block;
    max-width: 100%;
  }

  tbody td.product-total .subscription-schedule {
    display: inline;
    font-size: 1em;
    line-height: inherit;
  }

  tbody td.product-name .checkout-subscription-item {
    display: inline;
    font-size: inherit;
    line-height: inherit;
  }

  tbody td.product-name .checkout-subscription-item .subscription-schedule {
    display: block;
    margin-top: 4px;
    color: #50575e;
    font-size: 1em;
    line-height: 1.4;
  }

  tbody td.product-name dl.variation {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2px;
    align-items: start;
    margin: 22px 0 0;
    padding: 0;
    text-align: left;
    font-size: 12px;
    line-height: 1.4;
  }

  tbody td.product-name dl.variation dt,
  tbody td.product-name dl.variation dd {
    display: block;
    float: none !important;
    clear: none !important;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left !important;
    font-size: inherit !important;
    line-height: 1.4 !important;
  }

  tbody td.product-name dl.variation dt {
    color: #50575e;
    font-weight: 600;
    white-space: normal;
  }

  tbody td.product-name dl.variation dt:not(:first-child) {
    margin-top: 8px;
  }

  tbody td.product-name dl.variation dd {
    color: #1e1e1e;
  }

  tbody td.product-name dl.variation dd p {
    display: block !important;
    margin: 0;
    padding: 0;
    text-align: left !important;
    font-size: inherit !important;
    line-height: inherit !important;
  }
}

.woocommerce-cart,
.woocommerce-checkout,
.woocommerce-page {
  .wc-item-meta {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;

    li {
      display: grid;
      grid-template-columns: max-content minmax(0, 1fr);
      gap: 4px 8px;
      align-items: start;
      margin: 6px 0 0;
      line-height: 1.5;
      text-align: left;
    }

    .wc-item-meta-label {
      margin: 0;
      color: #50575e;
      font-size: 12px;
      font-weight: 600;
      float: none;
      white-space: nowrap;
    }

    p {
      min-width: 0;
      margin: 0;
      color: #1e1e1e;
      font-size: 13px;
      text-align: left;
      line-height: inherit;
    }
  }

  @media (max-width: 480px) {
    .wc-item-meta li {
      grid-template-columns: 1fr;
      gap: 2px;
    }

    .wc-item-meta-label {
      white-space: normal;
    }
  }
}

@media (max-width: 480px) {
  .woocommerce-cart,
  .woocommerce-checkout {
    .shop_table dl.variation {
      grid-template-columns: 1fr;
      gap: 2px;
    }

    .shop_table dl.variation dt {
      white-space: normal;
    }
  }

  #order_review.woocommerce-checkout-review-order table.woocommerce-checkout-review-order-table,
  .woocommerce-checkout-review-order table.woocommerce-checkout-review-order-table {
    tbody td.product-name dl.variation {
      grid-template-columns: 1fr !important;
      gap: 4px;
    }

    tbody td.product-name dl.variation dt {
      white-space: normal;
    }
  }
}
