/* One complete View Order link. The label is real anchor text in PHP. */
body.woocommerce-account.woocommerce-view-order .woocommerce-table--order-details tr.order_item td.product-name > .ujc-yayreviews-action {
  display: block;
  clear: both;
  width: 100%;
  margin-top: 6px;
}
body.woocommerce-account.woocommerce-view-order .woocommerce-table--order-details tr.order_item .ujc-yayreviews-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: 32px;
  max-width: 100%;
  padding: 0 3px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #302920;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
}
body.woocommerce-account.woocommerce-view-order .woocommerce-table--order-details tr.order_item .ujc-yayreviews-link:hover,
body.woocommerce-account.woocommerce-view-order .woocommerce-table--order-details tr.order_item .ujc-yayreviews-link:focus {
  color: #6a5541;
  text-decoration: underline;
}
body.woocommerce-account.woocommerce-view-order .woocommerce-table--order-details tr.order_item .ujc-yayreviews-link:focus-visible {
  outline: 2px solid #65533f;
  outline-offset: 2px;
}
@media (max-width: 1024px) {
  body.woocommerce-account.woocommerce-view-order .woocommerce-table--order-details tr.order_item td.product-name > .ujc-yayreviews-action {
    grid-column: 2;
    grid-row: 4;
    justify-self: end;
    width: auto;
    max-width: 100%;
    margin: 6px 0 0;
    text-align: right;
  }
  body.woocommerce-account.woocommerce-view-order .woocommerce-table--order-details tr.order_item .ujc-yayreviews-link {
    justify-content: flex-end;
    min-height: 42px;
    text-align: right;
  }
}
/* Eligibility is enforced again at submission; this only hides an unusable form. */
body.single-product.ujc-yayreviews-form-ineligible #review_form_wrapper {
  display: none;
}

/* Match the requested title without changing YayReviews' optional/required logic. */
body.single-product .yayrev-purchase-variation-field label .optional {
  text-transform: capitalize;
}

/* Keep YayReviews' variable-product form inside the mobile Reviews panel. */
@media (max-width: 767px) {
  body.single-product .woocommerce-Tabs-panel--reviews .yayrev-reviews {
    grid-template-columns: minmax(0, 1fr);
  }

  body.single-product .woocommerce-Tabs-panel--reviews .yayrev-reviews #review_form_wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.single-product .woocommerce-Tabs-panel--reviews .yayrev-reviews #commentform > .yayrev-purchase-variation-field,
  body.single-product .woocommerce-Tabs-panel--reviews .yayrev-reviews #commentform > .yayrev-review-title-field,
  body.single-product .woocommerce-Tabs-panel--reviews .yayrev-reviews #commentform > .comment-form-comment {
    max-width: 100%;
    min-width: 0;
  }

  body.single-product .woocommerce-Tabs-panel--reviews .yayrev-reviews .yayrev-purchase-variation-select {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.single-product .woocommerce-Tabs-panel--reviews .yayrev-reviews .yayrev-variation-details-content {
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
