/* Smart Wishlist page: brand tokens, listing ATC in table, bulk/share chrome */

/* Fallback if quantity column is re-enabled in plugin settings. */
.wlfmc-wishlist-table .quantity {
  display: none;
}

/* Product titles — match grid medium preset */
.wlfmc-wishlist-table a.product-name,
.wlfmc-wishlist-table a.product-name strong {
  font-family: var(--wp--preset--font-family--bogart);
  font-size: var(--wp--preset--font-size--medium);
  font-weight: var(--wp--custom--font-weight--heading);
  color: var(--wp--preset--color--forest-night);
  text-decoration: none;
}

/* Space between title and price in the center column stack. */
.wlfmc-wishlist-table a.product-name {
  margin-bottom: var(--wp--preset--spacing--10);
}

.wlfmc-wishlist-table a.product-name:hover,
.wlfmc-wishlist-table a.product-name:hover strong {
  color: var(--wp--preset--color--organic-green);
}

/* Row price (single source of truth; ATC price is hidden and mirrored here). */
.wlfmc-wishlist-table .product-price,
.wlfmc-wishlist-table .product-price .price,
.wlfmc-wishlist-table .product-price .amount,
.wlfmc-wishlist-table .product-price del,
.wlfmc-wishlist-table .product-price ins {
  font-family: var(--wp--preset--font-family--bogart);
  font-size: var(--wp--preset--font-size--medium);
  font-weight: var(--wp--custom--font-weight--heading);
  color: var(--wp--preset--color--organic-green);
}

.wlfmc-wishlist-table .product-price del {
  opacity: 0.65;
}

/* Remove X — stamp red, larger, heavier */
.wlfmc-wishlist-table a.product-remove,
.wlfmc-wishlist-table a.wlfmc-remove-from-list {
  color: var(--wp--preset--color--stamp) !important;
}

.wlfmc-wishlist-table a.product-remove .wlfmc-icon-close,
.wlfmc-wishlist-table a.wlfmc-remove-from-list .wlfmc-icon-close {
  font-size: 1.3em;
  font-weight: 700;
  color: inherit;
}

.wlfmc-wishlist-table a.product-remove:hover,
.wlfmc-wishlist-table a.wlfmc-remove-from-list:hover {
  color: var(--wp--preset--color--stamp) !important;
  opacity: 0.85;
}

/* Listing ATC in wishlist last column */
.wlfmc-wishlist-table td.last-column .frodig-wishlist-atc {
  width: 100%;
  max-width: none;
}

.wlfmc-wishlist-table td.last-column .frodig-listing-atc {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.wlfmc-wishlist-table td.last-column .frodig-listing-atc__attrs {
  width: 100%;
}

.wlfmc-wishlist-table td.last-column .frodig-listing-atc__pills {
  flex-wrap: wrap;
}

.wlfmc-wishlist-table td.last-column .frodig-listing-atc__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: none;
}

/* Wishlist already shows .product-price — hide duplicate ATC price. */
.wlfmc-wishlist-table td.last-column .frodig-listing-atc__price {
  display: none;
}

.wlfmc-wishlist-table td.last-column .frodig-listing-atc__buy {
  display: flex;
  margin-left: 0;
  width: 100%;
  max-width: none;
  flex: 1 1 100%;
}

/*
 * Push the add-all group to the right of the actions row.
 * Plugin footer uses space-between, but nonce/hidden inputs after the
 * button wrapper steal the “end” slot — margin-left:auto fixes both
 * surfaces (standalone + My Account) when bulk actions are present or not.
 */
.wlfmc-wishlist-table
  .wlfmc-wishlist-footer
  .action-wrapper
  > .d-flex:has(.add-all-to-cart-btn),
.wlfmc-list .action-wrapper > .d-flex:has(.add-all-to-cart-btn) {
  margin-left: auto;
}

/* Add all — keep weight/shadow; primary fill comes from Smart Wishlist Appearance. */
.wlfmc-wishlist-table .add-all-to-cart-btn,
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  .add-all-to-cart-btn,
.wlfmc-list .action-wrapper .add-all-to-cart-btn {
  font-weight: 600 !important;
  box-shadow: none !important;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.frodig-wishlist-add-all-notice {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--wp--preset--color--stamp);
}

/* Bulk select — translucent green wash (not opacity on the whole control). */
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  #bulk_actions,
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  select#bulk_actions,
.wlfmc-list .action-wrapper #bulk_actions {
  background-color: color-mix(
    in srgb,
    var(--wp--preset--color--organic-green) 35%,
    transparent
  ) !important;
  background: color-mix(
    in srgb,
    var(--wp--preset--color--organic-green) 35%,
    transparent
  ) !important;
  border-color: var(--wp--preset--color--organic-green) !important;
  border-radius: 3px !important;
  color: var(--wp--preset--color--forest-night) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.wlfmc-wishlist-table #bulk_actions option {
  background-color: var(--wp--preset--color--white);
  color: var(--wp--preset--color--forest-night);
}

/* Apply — secondary outline next to primary add-all and soft bulk select. */
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  .apply-btn,
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  button.apply-btn,
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  button[type="submit"].apply-btn {
  background-color: transparent !important;
  background: transparent !important;
  border: 1px solid var(--wp--preset--color--organic-green) !important;
  border-radius: 3px !important;
  color: var(--wp--preset--color--forest-night) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  .apply-btn:hover,
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  button.apply-btn:hover {
  background-color: color-mix(
    in srgb,
    var(--wp--preset--color--sage) 40%,
    transparent
  ) !important;
  background: color-mix(
    in srgb,
    var(--wp--preset--color--sage) 40%,
    transparent
  ) !important;
  border-color: var(--wp--preset--color--moss) !important;
  color: var(--wp--preset--color--forest-night) !important;
}

/* Share label — normal weight, muted */
.wlfmc-share .wlfmc-share-title,
.wlfmc-wishlist-table .wlfmc-wishlist-footer .wlfmc-share-title {
  font-weight: 400 !important;
  color: var(--wp--preset--color--sage);
}

/* Guest login + GDPR notices — theme tokens (override plugin gray/red). */
.wlfmc-guest-notice-wrapper,
.wlfmc-gdpr-notice-wrapper {
  box-sizing: border-box;
  max-width: 100%;
  background-color: color-mix(
    in srgb,
    var(--wp--preset--color--organic-green) 25%,
    transparent
  ) !important;
  background: color-mix(
    in srgb,
    var(--wp--preset--color--organic-green) 25%,
    transparent
  ) !important;
  border-radius: 8px;
  color: var(--wp--preset--color--forest-night);
}

.wlfmc-guest-notice-wrapper .wlfmc-notice-content,
.wlfmc-guest-notice-wrapper .wlfmc-notice-content p,
.wlfmc-gdpr-notice-wrapper .wlfmc-notice-content,
.wlfmc-gdpr-notice-wrapper .wlfmc-notice-content p {
  color: var(--wp--preset--color--forest-night) !important;
  font-family: var(--wp--preset--font-family--body);
}

/* Guest headline is a <p><span><strong>…; GDPR uses <h4>. */
.wlfmc-guest-notice-wrapper .wlfmc-notice-content p:first-child,
.wlfmc-guest-notice-wrapper .wlfmc-notice-content strong,
.wlfmc-guest-notice-wrapper .wlfmc-notice-content span,
.wlfmc-guest-notice-wrapper .wlfmc-notice-content span[style],
.wlfmc-gdpr-notice-wrapper .wlfmc-notice-content h4 {
  font-family: var(--wp--preset--font-family--bogart) !important;
  font-size: var(--wp--preset--font-size--medium);
  font-weight: var(--wp--custom--font-weight--heading);
  color: var(--wp--preset--color--forest-night) !important;
}

/* Login / Accept — primary CTA (same as add-all). */
.wlfmc-guest-notice-wrapper .wlfmc-notice-buttons a.button.wlfmc_btn_0,
.wlfmc-guest-notice-wrapper .wlfmc-notice-buttons a.wlfmc-btn.wlfmc_btn_0,
.wlfmc-gdpr-notice-wrapper .wlfmc-notice-buttons a.button.wlfmc-accept-btn,
.wlfmc-gdpr-notice-wrapper .wlfmc-notice-buttons a.wlfmc-btn.wlfmc-accept-btn {
  background-color: var(--wp--preset--color--organic-green) !important;
  background: var(--wp--preset--color--organic-green) !important;
  border: 1px solid var(--wp--preset--color--organic-green) !important;
  border-radius: 3px !important;
  color: var(--wp--preset--color--white) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.wlfmc-guest-notice-wrapper .wlfmc-notice-buttons a.button.wlfmc_btn_0:hover,
.wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn.wlfmc_btn_0:hover,
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.button.wlfmc-accept-btn:hover,
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn.wlfmc-accept-btn:hover {
  background-color: var(--wp--preset--color--moss) !important;
  background: var(--wp--preset--color--moss) !important;
  border-color: var(--wp--preset--color--moss) !important;
  color: var(--wp--preset--color--white) !important;
}

/* Sign-up / Deny — secondary outline (same as Apply). */
.wlfmc-guest-notice-wrapper .wlfmc-notice-buttons a.button.wlfmc_btn_1,
.wlfmc-guest-notice-wrapper .wlfmc-notice-buttons a.wlfmc-btn.wlfmc_btn_1,
.wlfmc-gdpr-notice-wrapper .wlfmc-notice-buttons a.button.wlfmc-denied-btn,
.wlfmc-gdpr-notice-wrapper .wlfmc-notice-buttons a.wlfmc-btn.wlfmc-denied-btn {
  background-color: transparent !important;
  background: transparent !important;
  border: 1px solid var(--wp--preset--color--organic-green) !important;
  border-radius: 3px !important;
  color: var(--wp--preset--color--forest-night) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.wlfmc-guest-notice-wrapper .wlfmc-notice-buttons a.button.wlfmc_btn_1:hover,
.wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn.wlfmc_btn_1:hover,
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.button.wlfmc-denied-btn:hover,
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn.wlfmc-denied-btn:hover {
  background-color: color-mix(
    in srgb,
    var(--wp--preset--color--sage) 40%,
    transparent
  ) !important;
  background: color-mix(
    in srgb,
    var(--wp--preset--color--sage) 40%,
    transparent
  ) !important;
  border-color: var(--wp--preset--color--moss) !important;
  color: var(--wp--preset--color--forest-night) !important;
}

/* Share icons — soft tinted disc (DB border/icon colors + theme wash). */
.wlfmc-share ul.share-items i {
  background-color: color-mix(
    in srgb,
    var(--wp--preset--color--organic-green) 12%,
    transparent
  );
}

.wlfmc-share ul.share-items .share-item a:hover i,
.wlfmc-share ul.share-items .share-item a:focus-visible i {
  background-color: color-mix(
    in srgb,
    var(--wp--preset--color--organic-green) 22%,
    transparent
  );
}

/* -------------------------------------------------------------------------- */
/* Keyboard-only focus (:focus-visible); suppress mouse rings                 */
/* Plugin sets outline:none !important on .wlfmc-wishlist-form a:focus —      */
/* focus-visible rules need !important (and checkbox paints on the span).     */
/* -------------------------------------------------------------------------- */

.wlfmc-wishlist-table
  .checkbox-label
  input[type="checkbox"]:focus:not(:focus-visible)
  + span:before,
.wlfmc-list
  .checkbox-label
  input[type="checkbox"]:focus:not(:focus-visible)
  + span:before,
.wlfmc-wishlist-table a.product-remove:focus:not(:focus-visible),
.wlfmc-wishlist-table a.wlfmc-remove-from-list:focus:not(:focus-visible),
.wlfmc-wishlist-table a.product-name:focus:not(:focus-visible),
.wlfmc-wishlist-table a.product-thumbnail:focus:not(:focus-visible),
.wlfmc-wishlist-table .add-all-to-cart-btn:focus:not(:focus-visible),
.wlfmc-list .action-wrapper .add-all-to-cart-btn:focus:not(:focus-visible),
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  .apply-btn:focus:not(:focus-visible),
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  button.apply-btn:focus:not(:focus-visible),
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  #bulk_actions:focus:not(:focus-visible),
.wlfmc-list .action-wrapper #bulk_actions:focus:not(:focus-visible),
.wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.button:focus:not(:focus-visible),
.wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn:focus:not(:focus-visible),
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.button:focus:not(:focus-visible),
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn:focus:not(:focus-visible),
.wlfmc-share ul.share-items .share-item a:focus:not(:focus-visible),
.wlfmc-share
  .wlfmc-copy-container
  .copy-link-trigger:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none;
}

/*
 * Checkbox input is opacity:0 / 0×0 — ring the custom box (span:before).
 * Match plugin .wlfmc-list input[type=checkbox] + span:before specificity.
 */
.wlfmc-wishlist-table
  .checkbox-label
  input[type="checkbox"]:focus-visible
  + span:before,
.wlfmc-list .checkbox-label input[type="checkbox"]:focus-visible + span:before,
.wlfmc-wishlist-table.wlfmc-default-table
  .checkbox-label
  input[type="checkbox"]:focus-visible
  + span:before {
  outline: 2px solid var(--wp--preset--color--organic-green) !important;
  outline-offset: 2px;
}

/*
 * Remove — stamp-tinted chip without padding growth (fixed 30×30 hit area).
 */
.wlfmc-wishlist-table a.product-remove,
.wlfmc-wishlist-table a.wlfmc-remove-from-list {
  box-sizing: border-box;
  border-radius: 4px;
  background-color: transparent;
  transition: background-color 0.15s ease;
}

.wlfmc-wishlist-table a.product-remove:focus-visible,
.wlfmc-wishlist-table a.wlfmc-remove-from-list:focus-visible {
  outline: none !important;
  color: var(--wp--preset--color--stamp) !important;
  background-color: color-mix(
    in srgb,
    var(--wp--preset--color--stamp) 18%,
    transparent
  );
  border-radius: 4px;
  opacity: 1;
}

/* Product title — underline link cue */
.wlfmc-wishlist-table a.product-name:focus-visible,
.wlfmc-wishlist-table a.product-name:focus-visible strong {
  outline: none !important;
  color: var(--wp--preset--color--organic-green);
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
}

/*
 * Product image thumbnail — match shop product img radius (style.css
 * .woocommerce ul.products li.product a img { border-radius: 4px }).
 */
.wlfmc-wishlist-table a.product-thumbnail,
.wlfmc-wishlist-table a.product-thumbnail img {
  border-radius: 4px;
}

/* Product image thumbnail link — organic-green ring (beat plugin a:focus). */
.wlfmc-wishlist-table a.product-thumbnail:focus-visible,
.wlfmc-wishlist-form .wlfmc-wishlist-table a.product-thumbnail:focus-visible {
  outline: 2px solid var(--wp--preset--color--organic-green) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}

/* Add-all — primary green ring */
.wlfmc-wishlist-table .add-all-to-cart-btn:focus-visible,
.wlfmc-list .action-wrapper .add-all-to-cart-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--forest-night) !important;
  outline-offset: 2px;
}

/* Apply — secondary moss ring */
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  .apply-btn:focus-visible,
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  button.apply-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--moss) !important;
  outline-offset: 2px;
}

/* Bulk select — organic-green ring */
.wlfmc-wishlist-table.wlfmc-default-table:not(.is-elementor)
  .wlfmc-wishlist-footer
  #bulk_actions:focus-visible,
.wlfmc-list .action-wrapper #bulk_actions:focus-visible {
  outline: 2px solid var(--wp--preset--color--organic-green) !important;
  outline-offset: 2px;
}

/* Guest + GDPR notice buttons — match primary / secondary; beat form a:focus reset. */
.wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.button.wlfmc_btn_0:focus-visible,
.wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn.wlfmc_btn_0:focus-visible,
.wlfmc-wishlist-form
  .wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc_btn_0:focus-visible,
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.button.wlfmc-accept-btn:focus-visible,
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn.wlfmc-accept-btn:focus-visible,
.wlfmc-wishlist-form
  .wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-accept-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--forest-night) !important;
  outline-offset: 2px !important;
}

.wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.button.wlfmc_btn_1:focus-visible,
.wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn.wlfmc_btn_1:focus-visible,
.wlfmc-wishlist-form
  .wlfmc-guest-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc_btn_1:focus-visible,
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.button.wlfmc-denied-btn:focus-visible,
.wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-btn.wlfmc-denied-btn:focus-visible,
.wlfmc-wishlist-form
  .wlfmc-gdpr-notice-wrapper
  .wlfmc-notice-buttons
  a.wlfmc-denied-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--moss) !important;
  outline-offset: 2px !important;
}

/* Share — mirror hover on keyboard focus (soft bg + full opacity). */
.wlfmc-share ul.share-items .share-item a:focus-visible,
.wlfmc-share ul.share-items .share-item a.copy-link-trigger:focus-visible {
  outline: none !important;
  opacity: 1;
}

/*
 * Copy-link lives in share-items (icon row), not .wlfmc-copy-container.
 * Soft wash on the icon matches sibling share controls (see a:focus-visible i above).
 * Container variant (URL field + button) keeps an organic-green ring.
 */
.wlfmc-share .wlfmc-copy-container .copy-link-trigger:focus-visible {
  outline: 2px solid var(--wp--preset--color--organic-green) !important;
  outline-offset: 2px !important;
}
