/* Add to My Design of the chairs and of the tables in the product grids (inc/products.php, src/productButtons.ts),
   enqueued in the head of every page: the look of the Qode wishlist button it replaces (measured on the dev chair page
   13.11): Figma's heart, 21 x 20, and the text in DM Sans 14 px, 10 px apart, black, a line growing under the text on hover
   (the theme's mwse-wishlist-hover-underline); in the product grid the heart alone. A saved one has the full heart.
   The selectors carry the data attribute of either kind (a table heart without it got the theme's black button, dev
   13.11) so they beat the theme's and Elementor's button rules (Hello Elementor colours every button and its :hover). */

button.nordtisch-save-product:is([data-nordtisch-product], [data-nordtisch-table]),
button.nordtisch-save-product:is([data-nordtisch-product], [data-nordtisch-table]):hover,
button.nordtisch-save-product:is([data-nordtisch-product], [data-nordtisch-table]):focus,
button.nordtisch-save-product:is([data-nordtisch-product], [data-nordtisch-table]):active {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #000;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
}
button.nordtisch-save-product:is([data-nordtisch-product], [data-nordtisch-table]):focus:not(:focus-visible) { outline: none; }
button.nordtisch-save-product:is([data-nordtisch-product], [data-nordtisch-table]):disabled { cursor: progress; }

.nordtisch-save-product svg { flex: none; width: 21px; height: 20px; }
.nordtisch-save-product[data-saved] svg path { fill: currentColor; }

.nordtisch-save-product .nordtisch-save-product-text { position: relative; }
.nordtisch-save-product .nordtisch-save-product-text::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.nordtisch-save-product:hover .nordtisch-save-product-text::before { transform: scaleX(1); }

/* in the grid the heart alone: the text stays for screen readers (and the script's saved state) */
.nordtisch-save-product--icon .nordtisch-save-product-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nordtisch-save-product .nordtisch-save-product-text::before { transition: none; }
}
