/*
 * DeckLab cart metadata only. Product image, title, price, removal control,
 * spacing and vertical rhythm remain entirely owned by WooCommerce and the
 * active shop theme, exactly like every other product row.
 */

/* Side Cart: keep the theme's exact native product-card structure. DeckLab
 * only replaces the product content and never redefines the card grid,
 * spacing, height, title, verified price or remove action. */
body .woocommerce-mini-cart .decklab-cart-item :is(dl.variation, .variation),
body .elementor-menu-cart__products .decklab-cart-item :is(dl.variation, .variation) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  color: transparent;
  background: transparent;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

body .woocommerce-mini-cart .decklab-cart-item .variation :is(dt, dd, p),
body .elementor-menu-cart__products .decklab-cart-item .variation :is(dt, dd, p) {
  padding: 0;
  margin: 0;
  color: transparent;
  background: transparent;
}

/* Full Cart and Checkout keep the useful options as compact secondary data. */
body.woocommerce-cart .woocommerce-cart-form .decklab-cart-item :is(dl.variation, .variation),
body.woocommerce-checkout .woocommerce-checkout-review-order-table .decklab-cart-item :is(dl.variation, .variation) {
  position: static;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 5px;
  width: 100%;
  height: auto;
  padding: 0;
  margin: 8px 0 0;
  overflow: visible;
  color: #c7d2da;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  background: transparent;
  border: 0;
  opacity: 1;
  pointer-events: auto;
}

body.woocommerce-cart .woocommerce-cart-form .decklab-cart-item .variation :is(dt, dd, p),
body.woocommerce-checkout .woocommerce-checkout-review-order-table .decklab-cart-item .variation :is(dt, dd, p) {
  min-width: 0;
  padding: 0;
  margin: 0;
  float: none;
  clear: none;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  background: transparent;
}

body.woocommerce-cart .woocommerce-cart-form .decklab-cart-item .variation dt,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .decklab-cart-item .variation dt {
  color: #c7d2da;
  font-weight: 600;
}

body.woocommerce-cart .woocommerce-cart-form .decklab-cart-item .variation dd,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .decklab-cart-item .variation dd {
  color: #c7d2da;
  font-weight: 400;
  overflow-wrap: anywhere;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table .decklab-cart-item .product-name > .product-quantity {
  display: inline;
  margin-left: 0.35em;
  white-space: nowrap;
}

/* Product sheet → DeckLab bridge. Kept independent from theme button rules. */
.decklab-mount-button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid #264b63;
  border-radius: 0;
  background: #264b63;
  color: #f5f5f5;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.decklab-pen-nib-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: url("../img/decklab-pen-nib.svg") center / contain no-repeat;
  mask: url("../img/decklab-pen-nib.svg") center / contain no-repeat;
}

.decklab-mount-button > .decklab-pen-nib-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
  color: currentColor;
}

/* Paint cart marks independently from theme rules targeting title spans. */
.decklab-pen-nib-icon.decklab-product-mark {
  width: .82em;
  height: .82em;
  margin: 0;
  color: #a32020;
  background-color: #a32020;
  vertical-align: -.04em;
}

/* Compact cart titles stay white; full Cart/Checkout retain the red mark. */
:is(.woocommerce-mini-cart, .elementor-menu-cart__products) .decklab-pen-nib-icon.decklab-product-mark {
  color: #f5f5f5;
  background-color: #f5f5f5;
}

.decklab-mount-button:hover,
.decklab-mount-button:focus-visible {
  border-color: #264b63;
  background: #142131;
  color: #f5f5f5;
  text-decoration: none;
}

.decklab-mount-button:focus-visible {
  outline: 2px solid #c7d2da;
  outline-offset: 3px;
}

.decklab-mount-button[aria-disabled="true"] {
  border-color: #637381;
  background: #334554;
  color: #c7d2da;
  cursor: not-allowed;
  opacity: .72;
}
