.elementor-widget-woocommerce-product-add-to-cart form.cart:has(> .element-books-personalization) {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px 20px;
  align-items: start;
}

.element-books-personalization {
  grid-column: 1 / -1;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #dce6f1;
  border-radius: 12px;
  background: #fff;
  margin: 0;
  padding: 18px 20px 20px;
  color: #2f3b5a;
  font-family: Andulka, sans-serif;
}

.element-books-personalization legend {
  display: block;
  width: auto;
  padding: 0 6px;
  color: #2960aa;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.element-books-personalization__hint {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
}

.element-books-personalization__choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.45;
  cursor: pointer;
}

.element-books-personalization__choice input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #2960aa;
}

.element-books-personalization__recipient {
  margin: 12px 0 0;
}

.element-books-personalization__recipient[hidden] {
  display: none;
}

.element-books-personalization__recipient label {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.element-books-personalization__recipient textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 360px;
  min-height: 5.5em;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.elementor-widget-woocommerce-product-add-to-cart form.cart:has(> .element-books-personalization) > .quantity,
.elementor-widget-woocommerce-product-add-to-cart form.cart:has(> .element-books-personalization) > .single_add_to_cart_button {
  align-self: start;
  height: auto;
  min-height: 52px;
}

.elementor-widget-woocommerce-product-add-to-cart form.cart:has(> .element-books-personalization) > .single_add_to_cart_button {
  box-sizing: border-box;
  width: 100%;
  margin-left: 0 !important;
}

.elementor-widget-woocommerce-product-add-to-cart form.cart:has(> .element-books-personalization) > .quantity .qty {
  box-sizing: border-box;
  width: 58px;
  height: 52px;
  min-height: 52px;
  text-align: center;
}

@media (max-width: 480px) {
  .element-books-personalization {
    padding: 16px;
  }
}

/* Keep the cart focused on purchased options, not the book's teaser text. */
.wc-block-cart .wc-block-components-product-metadata__description {
  display: none;
}

.wc-block-cart .wc-block-cart-items__row .wc-block-components-product-details {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.4;
}

.wc-block-cart .wc-block-components-product-details > span {
  display: block;
  margin-bottom: 3px;
}

.wc-block-cart .wc-block-components-product-details > span > span[aria-hidden="true"] {
  display: none;
}

/* The order confirmation uses the same blue as the shop's headings. */
.woocommerce-order-received .woocommerce-order-details .woocommerce-table__product-name a,
.woocommerce-order-received .woocommerce-order-details .woocommerce-table__product-name a:visited {
  color: #2960aa;
}

/* Match the original price on the product overview without muting sale prices. */
.single-product .price del {
  color: #a9aaac !important;
  opacity: 1 !important;
}

.single-product .price del .woocommerce-Price-amount,
.single-product .price del .woocommerce-Price-currencySymbol {
  color: inherit !important;
}
