.font-display {
  font-family: var(--font-body-family);
}

.font-pre-heading {
  font-family: var(--font-pre-heading-family);
}

.font-heading {
  font-family: var(--font-heading-family);
}

/* base-details-summary */
summary {
  cursor: pointer;
  list-style: none;
  position: relative;
}

summary .icon-caret {
  position: absolute;
  height: 0.6rem;
  right: 1rem;
  top: calc(50% - 0.2rem);
}

summary::-webkit-details-marker {
  display: none;
}

details > * {
  box-sizing: border-box;
}

/* Remove arrows from number input */
input[type="number"].number-input {
  -moz-appearance: textfield; /* Firefox */
  -webkit-appearance: none; /* Chrome, Safari, Edge */
  appearance: none;
  text-align: center;
  background: transparent;
}

/* Optionally remove spin buttons in some browsers */
input[type="number"].number-input::-webkit-inner-spin-button,
input[type="number"].number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-select {
  border: unset;

  width: 100%;
  max-width: 40rem;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);

  appearance: none;
  background-image: url("./arrow-down-swell.svg");
  background-repeat: no-repeat;
  background-position: right 0.7rem top 50%;
  background-size: 0.65rem auto;
}

.placeholder-svg {
  width: 100%;
  height: 100%;
}

.svg-placeholder {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;

  svg {
    width: 100%;
    height: 100%;
  }
}

.w-fit {
  width: w-fit-moz-fit-content;
  width: fit-content;
}

.scrollbar-hidden {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.scrollbar-hidden::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* FROALA editors */
.formatted-text {
  h1,
  h2,
  h3,
  h4 {
    font-weight: bolder;
  }

  h1 {
    font-size: 2rem;
    line-height: 3.2rem;
  }

  h2 {
    font-size: 1.5rem;
    line-height: 2.4rem;
  }

  h3 {
    font-size: 1.18rem;
    line-height: 1.872rem;
  }

  h4 {
    font-size: 1rem;
    line-height: 1.6rem;
  }

  ul,
  ol {
    margin: 1rem;
    padding: 1rem;
    padding-inline-start: 2.5rem;
    width: fit-content;
    > li {
      text-align: left;
    }
  }

  ul {
    list-style: disc;
  }

  ol {
    list-style: auto;
  }
}

/* heading styles */
.text-heading-small {
  font-size: calc(2.4rem * var(--font-scale));
  line-height: calc(3.2rem * var(--font-scale));
  font-weight: 400;
}

.text-heading-medium {
  font-size: calc(3.6rem * var(--font-scale));
  line-height: calc(4.4rem * var(--font-scale));
  font-weight: 400;
}

.text-heading-large {
  font-size: calc(4.8rem * var(--font-scale));
  line-height: calc(6rem * var(--font-scale));
  font-weight: 400;
}

.text-heading-extra-large {
  font-size: calc(6rem * var(--font-scale));
  line-height: calc(7.2rem * var(--font-scale));
  font-weight: 400;
}

.text-pre-heading {
  font-size: calc(1.4rem * var(--font-scale));
  line-height: calc(1.8rem * var(--font-scale));
  font-weight: 400;
}

.text-display-large {
  font-size: calc(6.4rem * var(--font-scale));
  line-height: calc(7.2rem * var(--font-scale));
  font-weight: 600;
}

.text-display-medium {
  font-size: calc(4rem * var(--font-scale));
  line-height: calc(5rem * var(--font-scale));
  font-weight: 600;
}

.text-display-small {
  font-size: calc(3.2rem * var(--font-scale));
  line-height: calc(4rem * var(--font-scale));
  font-weight: 600;
}

.text-headline-large {
  font-size: calc(4rem * var(--font-scale));
  line-height: calc(5rem * var(--font-scale));
  font-weight: 600;
}

.text-headline-medium {
  font-size: calc(3.2rem * var(--font-scale));
  line-height: calc(4rem * var(--font-scale));
  font-weight: 600;
}

.text-headline-small {
  font-size: calc(2.4rem * var(--font-scale));
  line-height: calc(3.6rem * var(--font-scale));
  font-weight: 600;
}

/* content styles */
.text-title-extra-large {
  font-size: calc(3rem * var(--font-scale));
  line-height: calc(3.8rem * var(--font-scale));
  font-weight: 500;
}

.text-title-large {
  font-size: calc(2.2rem * var(--font-scale));
  line-height: calc(2.8rem * var(--font-scale));
  font-weight: 500;
}

.text-title-medium {
  font-size: calc(1.6rem * var(--font-scale));
  line-height: calc(2.4rem * var(--font-scale));
  font-weight: 500;
}

.text-title-small {
  font-size: calc(1.4rem * var(--font-scale));
  line-height: calc(2rem * var(--font-scale));
  font-weight: 500;
}

.text-body-extra-large {
  font-size: calc(1.8rem * var(--font-scale));
  line-height: calc(2.8rem * var(--font-scale));
  font-weight: 400;
}

.text-body-large {
  font-size: calc(1.6rem * var(--font-scale));
  line-height: calc(2.4rem * var(--font-scale));
  font-weight: 400;
}

.text-body-medium {
  font-size: calc(1.4rem * var(--font-scale));
  line-height: calc(2rem * var(--font-scale));
  font-weight: 400;
}

.text-body-small {
  font-size: calc(1.2rem * var(--font-scale));
  line-height: calc(1.6rem * var(--font-scale));
  font-weight: 400;
}

.text-label-large {
  font-size: calc(1.4rem * var(--font-scale));
  line-height: calc(1.8rem * var(--font-scale));
  font-weight: 500;
}

.text-label-medium {
  font-size: calc(1.2rem * var(--font-scale));
  line-height: calc(1.4rem * var(--font-scale));
  font-weight: 500;
}

.text-label-small {
  font-size: calc(1.1rem * var(--font-scale));
  line-height: calc(1.4rem * var(--font-scale));
  font-weight: 500;
}

.text-logo-text {
  font-size: calc(2.2rem * var(--font-scale));
  line-height: calc(3.3rem * var(--font-scale));
  font-weight: 700;
}

.text-content {
  font-size: calc(1.6rem * var(--font-scale));
  line-height: calc(2.4rem * var(--font-scale));
  font-weight: 400;
}

.shadow-md {
  box-shadow: 0px 3px 8px -1px rgba(71, 71, 71, 0.18);
}

/* Apply border radius to all input fields and dropdowns */
input,
select,
textarea {
  border-radius: calc(1rem * var(--border-radius));
}

.disabled,
[disabled] {
  opacity: 0.6;
  pointer-events: none;
}
