/**
 * @file
 * Styles for custom markup add-to-cart triggers.
 */

.custom-add-to-cart-widget {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 16rem;
}

.custom-add-to-cart-widget.is-busy .custom-add-to-cart-qty {
  opacity: 0.65;
  pointer-events: none;
}

.custom-add-to-cart-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.custom-add-to-cart-qty__btn {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid #d5d5d5;
  border-radius: 50%;
  background: #fff;
  color: #9a9a9a;
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.custom-add-to-cart-qty__btn:hover {
  border-color: #b8b8b8;
  color: #666;
}

.custom-add-to-cart-qty__btn:focus-visible {
  outline: 2px solid #9bc96a;
  outline-offset: 2px;
}

.custom-add-to-cart-qty__input {
  box-sizing: border-box;
  width: 4.25rem;
  height: 2.5rem;
  margin: 0;
  padding: 0 0.5rem;
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
}

.custom-add-to-cart-qty__input:focus {
  border-color: #b8b8b8;
  outline: none;
  box-shadow: 0 0 0 2px rgba(197, 232, 132, 0.45);
}

.custom-add-to-cart {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: 0.65rem;
  background: #c5e884;
  color: #000;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.custom-add-to-cart:hover {
  background: #b9dd72;
}

.custom-add-to-cart:focus-visible {
  outline: 2px solid #7aad3f;
  outline-offset: 2px;
}

.custom-add-to-cart.is-busy {
  cursor: wait;
  opacity: 0.75;
  pointer-events: none;
}

.custom-add-to-cart.disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.custom-add-to-cart.disabled:hover {
  background: #c5e884;
}

.custom-add-to-cart__message {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
}

.custom-add-to-cart__message--success {
  color: #0a6629;
}

.custom-add-to-cart__message--error {
  color: #a51b1b;
}

.custom-add-to-cart__message a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}
