.customDataField .customQuestion {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  min-width: 0;
  margin-bottom: 0.35em;
}

.customDataField .customQuestion label {
  min-width: 0;
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.customDataField .customQuestion[data-collapsed="true"] label {
  /* Checkout themes use ID selectors for label display; clamping needs this layout. */
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.customDataField .customQuestion[data-collapsed="true"][data-overflowing="true"] {
  padding-bottom: 10px;
}

.customDataField .customQuestion[data-collapsed="true"][data-overflowing="true"] label {
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 25%, transparent 100%);
}

.customDataField .customQuestion[data-collapsed="true"][data-overflowing="true"] button {
  position: absolute;
  top: calc(var(--custom-question-line-height, 1.5em) * 2.5);
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
}

.customDataField .customQuestion button {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 48px;
  min-height: 36px;
  height: auto;
  margin: 0 auto;
  padding: 6px 12px;
  border: 2px solid var(--ink, #111);
  border-radius: 999px;
  background: #beefd8;
  color: #000;
  box-shadow: 2px 2px 0 var(--ink, #111);
  font: inherit;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.customDataField .customQuestion button[hidden] {
  display: none;
}

.customDataField .customQuestion button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
