/**
 * Wishlist plugin hardening.
 *
 * Loaded late so YITH/TI Wishlist can keep behavior while Alpha Wetsuits owns
 * the visual layer. Feedback popups are intentionally suppressed: wishlist
 * state is shown only by the button state and header count.
 */

body.has-wishlist-adapter {
  --wishlist-ui-surface: var(--color-bg);
  --wishlist-ui-text: var(--color-text);
  --wishlist-ui-border: var(--color-text);
  --wishlist-ui-muted-border: rgba(17, 17, 17, 0.14);
  --wishlist-ui-touch: 2.75rem;
}

body.has-wishlist-adapter :where(.product-form__wishlist, .page-wishlist) {
  color: var(--wishlist-ui-text);
}

.page-product .product-form__wishlist :where(.yith-wcwl-add-to-wishlist, .tinv-wraper, .tinvwl_add_to_wishlist_button, .yith-wcwl-add-button, .yith-wcwl-wishlistaddedbrowse, .yith-wcwl-wishlistexistsbrowse) {
  width: 100% !important;
  margin: 0 !important;
}

.page-product .product-form__wishlist :where(.yith-wcwl-wishlistaddedbrowse, .yith-wcwl-wishlistexistsbrowse) {
  display: block !important;
}

.page-product .product-form__wishlist :where(a, button, .tinvwl_add_to_wishlist_button) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: var(--button-height-commerce) !important;
  border-color: var(--wishlist-ui-border) !important;
  border-radius: 0 !important;
  background: var(--wishlist-ui-surface) !important;
  background-color: var(--wishlist-ui-surface) !important;
  background-image: none !important;
  color: var(--wishlist-ui-text) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
}

.page-product .product-form__wishlist :where(a:hover, a:focus-visible, button:hover, button:focus-visible, .tinvwl_add_to_wishlist_button:hover, .tinvwl_add_to_wishlist_button:focus-visible),
.page-product .product-form__wishlist :where(.yith-wcwl-wishlistaddedbrowse a, .yith-wcwl-wishlistexistsbrowse a, .tinvwl-product-in-list) {
  border-color: var(--wishlist-ui-border) !important;
  background: var(--wishlist-ui-text) !important;
  background-color: var(--wishlist-ui-text) !important;
  color: var(--wishlist-ui-surface) !important;
}

.page-product .product-form__wishlist :where(.separator, .yith-wcwl-icon, .yith-wcwl-icon-svg, i, img, .ajax-loading, .blockUI, .loader) {
  display: none !important;
}

.page-product .product-form__wishlist :where(a, button) {
  font-size: 0 !important;
}

.page-product .product-form__wishlist :where(a, button)::after {
  content: attr(data-theme-label);
  color: inherit !important;
  font-size: var(--button-font-size-commerce) !important;
}

.page-product .product-form__wishlist :where(.feedback, .yith-wcwl-wishlistaddedbrowse .feedback, .yith-wcwl-wishlistexistsbrowse .feedback, .yith-wcwl-add-to-wishlist__feedback),
body.has-wishlist-adapter :where(#yith-wcwl-popup-message, .yith-wcwl-popup-message, .yith-wcwl-feedback-modal, .yith-wcwl-feedback-messages-container, .yith-wcwl-add-to-wishlist__feedback, .yith-wcwl-notice, .tinvwl-notice, .tinvwl_added_to_wishlist, .tinvwl-error) {
  position: absolute !important;
  inset: auto !important;
  display: none !important;
  overflow: hidden !important;
  width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.page-wishlist :where(.woocommerce-info, .woocommerce-message, .woocommerce-error),
.page-product.has-wishlist-adapter .woocommerce-notices-wrapper :where(.woocommerce-info, .woocommerce-message, .woocommerce-error) {
  --notice-surface: var(--wishlist-ui-surface);
  --notice-border: var(--wishlist-ui-border);
  --notice-accent: var(--wishlist-ui-text);
  border-color: var(--wishlist-ui-border) !important;
  background: var(--wishlist-ui-surface) !important;
  background-color: var(--wishlist-ui-surface) !important;
  background-image: none !important;
  color: var(--wishlist-ui-text) !important;
  box-shadow: none !important;
}

.page-wishlist :where(.woocommerce-info, .woocommerce-message, .woocommerce-error)::before,
.page-product.has-wishlist-adapter .woocommerce-notices-wrapper :where(.woocommerce-info, .woocommerce-message, .woocommerce-error)::before {
  background: var(--wishlist-ui-text) !important;
  color: var(--wishlist-ui-text) !important;
}

.page-wishlist :where(.wishlist_table td.product-add-to-cart, .wishlist_table .product-add-to-cart, .tinvwl-table-manage-list .product-action),
body.has-wishlist-adapter.page-wishlist :where(.wishlist_table td.product-add-to-cart, .wishlist_table .product-add-to-cart, .tinvwl-table-manage-list .product-action) {
  text-align: center !important;
  vertical-align: middle !important;
}

.page-wishlist :where(.wishlist_table .add_to_cart, .wishlist_table .product-add-to-cart a, .wishlist_table .product-add-to-cart .button, #yith-wcwl-form .button, #yith-wcwl-form button, #yith-wcwl-form input[type="submit"], .tinv-wishlist .button, .tinv-wishlist button, .tinv-wishlist input[type="submit"], .wishlist-empty .button, .wishlist-empty button, .wishlist-empty input[type="submit"], .return-to-shop .button, .return-to-shop button, .return-to-shop input[type="submit"]),
body.has-wishlist-adapter.page-wishlist :where(.wishlist_table .add_to_cart, .wishlist_table .product-add-to-cart a, .wishlist_table .product-add-to-cart .button, #yith-wcwl-form .button, #yith-wcwl-form button, #yith-wcwl-form input[type="submit"], .tinv-wishlist .button, .tinv-wishlist button, .tinv-wishlist input[type="submit"], .wishlist-empty .button, .wishlist-empty button, .wishlist-empty input[type="submit"], .return-to-shop .button, .return-to-shop button, .return-to-shop input[type="submit"]) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: var(--button-height-ui, 2.75rem) !important;
  padding: 0.7rem 0.95rem !important;
  border-color: var(--wishlist-ui-border) !important;
  border-radius: 0 !important;
  background: var(--wishlist-ui-text) !important;
  background-color: var(--wishlist-ui-text) !important;
  background-image: none !important;
  color: var(--wishlist-ui-surface) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: var(--button-font-size-ui, 0.72rem) !important;
  letter-spacing: 0.12em !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  vertical-align: middle !important;
  white-space: normal !important;
}

.page-wishlist :where(.wishlist_table .remove, .tinvwl-table-manage-list .product-remove button, .tinvwl-table-manage-list .product-remove a) {
  border-color: var(--wishlist-ui-muted-border) !important;
  background: var(--wishlist-ui-surface) !important;
  color: var(--wishlist-ui-text) !important;
  box-shadow: none !important;
}

.page-wishlist :where(.wishlist_table .product-stock-status span, .wishlist_table .price-variation.decrease .variation-rate) {
  color: var(--wishlist-ui-text) !important;
}

body.has-wishlist-adapter .header-actions__desktop {
  align-items: center !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}

body.has-wishlist-adapter .header-utility-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.36rem !important;
  border-width: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: rgba(17, 17, 17, 0.72) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

body.has-wishlist-adapter .header-utility-link--cart {
  border-left: 1px solid rgba(17, 17, 17, 0.12) !important;
}

body.has-wishlist-adapter .search-form .search-field {
  border-color: rgba(17, 17, 17, 0.12) !important;
  border-radius: 0 !important;
  background: var(--color-bg) !important;
  color: var(--color-text) !important;
  box-shadow: none !important;
}

body.has-wishlist-adapter .search-form--drawer .search-field {
  background: transparent !important;
}

body.has-wishlist-adapter .search-form__submit,
body.has-wishlist-adapter .cart-drawer__footer .cart-drawer__action--primary,
body.has-wishlist-adapter.page-cart :where(.shop_table.cart .actions .button, .cart-collaterals .button.alt, .wc-proceed-to-checkout .checkout-button) {
  border-color: var(--color-text) !important;
  border-radius: 0 !important;
  background: var(--color-text) !important;
  background-color: var(--color-text) !important;
  background-image: none !important;
  color: var(--color-bg) !important;
  box-shadow: none !important;
  font-family: inherit !important;
}

body.has-wishlist-adapter .cart-drawer__footer .cart-drawer__action--ghost,
body.has-wishlist-adapter.page-cart :where(.return-to-shop .button, .alphawetsuits-cart-continue-shopping .button, .shop_table.cart .actions .button[name="apply_coupon"]) {
  border-color: var(--color-text) !important;
  border-radius: 0 !important;
  background: var(--color-bg) !important;
  background-color: var(--color-bg) !important;
  background-image: none !important;
  color: var(--color-text) !important;
  box-shadow: none !important;
  font-family: inherit !important;
}

@media (max-width: 767px) {
  body.has-wishlist-adapter .header-actions__mobile {
    gap: 0.12rem !important;
  }

  body.has-wishlist-adapter .header-actions__mobile .icon-button--header {
    width: var(--wishlist-ui-touch) !important;
    min-width: var(--wishlist-ui-touch) !important;
    height: var(--wishlist-ui-touch) !important;
    min-height: var(--wishlist-ui-touch) !important;
    padding: 0.62rem !important;
    border: 0 !important;
  }

  body.has-wishlist-adapter .header-actions__mobile .icon-button--header svg,
  body.has-wishlist-adapter .header-actions__mobile .header-action__svg {
    width: 1.2rem !important;
    height: 1.2rem !important;
    stroke-width: 1.7 !important;
  }
}
