.cdm-expandable-text {
  position: relative;
}

.cdm-expandable-text [hidden] {
  display: none !important;
}

.cdm-expandable-text p {
  margin-top: 0;
  margin-bottom: 1em;
}

.cdm-expandable-text p:last-of-type {
  margin-bottom: 0;
}

.cdm-expandable-text__stage {
  transition-duration: var(--cdm-animation-duration, 300ms);
  transition-property: height;
  transition-timing-function: ease;
}

.cdm-expandable-text__action {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  appearance: none;
}

.cdm-expandable-text__action:hover,
.cdm-expandable-text__action:focus {
  color: inherit;
  background: transparent;
}

.cdm-expandable-text__action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.cdm-expandable-text__more {
  display: inline;
  white-space: nowrap;
}

.cdm-expandable-text__less {
  display: block;
  margin-top: 0.75em;
}

.cdm-expandable-text__measurement[aria-hidden="true"] {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  display: block;
  height: auto;
  overflow: visible;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .cdm-expandable-text__stage {
    transition-duration: 0ms;
  }
}
