/**
 * Turing Restricted Sale - restricted sale module for PrestaShop
 *
 * @author    Agence Turing <contact@turing-software.com>
 * @copyright 2026 Turing Software
 * @license   Commercial license, see LICENSE.md
 */

/* Padlock drawn in CSS (no image, no font) */
.turingrestrictedsale-lock {
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
  width: 0.7em;
  height: 0.55em;
  margin: 0.35em 0.45em 0 0;
  border-radius: 0.1em;
  background: currentColor;
  vertical-align: baseline;
}
.turingrestrictedsale-lock::before {
  content: "";
  position: absolute;
  left: 0.13em;
  bottom: 100%;
  width: 0.44em;
  height: 0.35em;
  border: 0.09em solid currentColor;
  border-bottom: 0;
  border-radius: 0.25em 0.25em 0 0;
  box-sizing: border-box;
}

/* Product page and quick view: under the disabled button */
.turingrestrictedsale-notice {
  margin-top: 0.75rem;
  color: #5c6670;
  font-size: 0.9375rem;
  line-height: 1.4;
}
/* inline-flex: follows the alignment of the add to cart block (right in some themes) */
.turingrestrictedsale-notice__label {
  display: inline-flex;
  align-items: flex-start;
  margin: 0;
  font-weight: 700;
  text-align: start;
}
.turingrestrictedsale-notice__extra:not(:empty) {
  margin-top: 0.35rem;
}

/* Product lists: under the price */
.turingrestrictedsale-listing {
  display: flex;
  align-items: flex-start;
  margin-top: 0.25rem;
  color: #5c6670;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Disabled add to cart button: greyed, not clickable; no quantity selector */
.turingrestrictedsale-blocked [data-button-action="add-to-cart"],
.turingrestrictedsale-blocked .product-actions .btn.disabled,
.product-add-to-cart:has(.js-turingrestrictedsale-notice) [data-button-action="add-to-cart"] {
  filter: grayscale(1);
  opacity: 0.55;
  cursor: not-allowed;
}
.turingrestrictedsale-blocked .product-quantity .qty,
.product-add-to-cart:has(.js-turingrestrictedsale-notice) .product-quantity .qty {
  display: none;
}

/* Favorites of the blockwishlist module: a product without add to cart URL gets the
   wishlist-product-unavailable class; its button does nothing, so it is greyed too */
.wishlist-product:has(.wishlist-product-unavailable) .wishlist-product-addtocart {
  filter: grayscale(1);
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
