/* -------------------------------- 

File#: _1_list-v2
Title: List v2
Descr: Custom list component
Usage: codyhouse.co/license

-------------------------------- */

/* variables */
:root {
  /* colors */
  --lf2-color-primary-hsl: 250, 84%, 54%;
  --lf2-color-bg-hsl: 0, 0%, 100%;
  --lf2-color-contrast-high-hsl: 230, 7%, 23%;
  --lf2-color-contrast-higher-hsl: 230, 13%, 9%;
  --lf2-color-contrast-medium-hsl: 225, 4%, 47%;
  --lf2-color-accent-hsl: 342, 89%, 48%;
  --lf2-color-contrast-lower-hsl: 240, 4%, 85%;

  /* spacing */
  --lf2-space-xs: 0.5rem;
  --lf2-space-lg: 2rem;
  --lf2-space-md: 1.25rem;
  --lf2-space-sm: 0.75rem;

  /* typography */
  --lf2-text-sm: 0.833rem;
}

@media(min-width: 64rem){
  :root {
    /* spacing */
    --lf2-space-xs: 0.75rem;
    --lf2-space-lg: 3.125rem;
    --lf2-space-md: 2rem;
    --lf2-space-sm: 1.125rem;

    /* typography */
    --lf2-text-sm: 1rem;
  }
}

/* icons */
.lf2-icon {
  height: var(--lf2-size, 1em);
  width: var(--lf2-size, 1em);
  display: inline-block;
  color: inherit;
  fill: currentColor;
  line-height: 1;
  flex-shrink: 0;
  max-width: initial;
}

/* component */
:root {
  --list-v2-bullet-size: 40px;
  --list-v2-bullet-font-size: 1rem;
  --list-v2-bullet-margin-right: 1rem;
  --list-v2-gap-y: var(--lf2-space-lg);
  /* list points gap */
}

.list-v2, .lf2-text-component .list-v2 {
  padding-left: 0;
  list-style: none;
}
.list-v2 > li:not(:last-child), .lf2-text-component .list-v2 > li:not(:last-child) {
  margin-bottom: var(--list-v2-gap-y);
}

.list-v2__title {
  padding-left: calc(var(--list-v2-bullet-size) + var(--list-v2-bullet-margin-right));
}

.list-v2__bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--list-v2-bullet-size);
  height: var(--list-v2-bullet-size);
  margin-right: var(--list-v2-bullet-margin-right);
  margin-left: calc(-1 * var(--list-v2-bullet-size) - var(--list-v2-bullet-margin-right));
  vertical-align: middle;
  position: relative;
  top: -0.1em;
}

.list-v2__content {
  margin-left: calc(var(--list-v2-bullet-size) + var(--list-v2-bullet-margin-right));
}

/* ordered list */
.list-v2--ol, .lf2-text-component .list-v2--ol {
  counter-reset: list-items;
}
.list-v2--ol > li, .lf2-text-component .list-v2--ol > li {
  counter-increment: list-items;
}
.list-v2--ol .list-v2__bullet, .lf2-text-component .list-v2--ol .list-v2__bullet {
  border-radius: 50%;
  background-color: hsla(var(--lf2-color-primary-hsl), 0.2);
  color: hsl(var(--lf2-color-primary-hsl));
  font-size: var(--list-v2-bullet-font-size);
  font-weight: 500;
}
.list-v2--ol .list-v2__bullet::before, .lf2-text-component .list-v2--ol .list-v2__bullet::before {
  content: counter(list-items);
}

/* unordered list */
.list-v2--ul, .lf2-text-component .list-v2--ul {
  --list-v2-bullet-size: 10px;
}
.list-v2--ul .list-v2__bullet, .lf2-text-component .list-v2--ul .list-v2__bullet {
  border-radius: 50%;
  background-color: hsl(var(--lf2-color-primary-hsl));
}

/* icons */
.list-v2--icons, .lf2-text-component .list-v2--icons {
  --list-v2-bullet-size: 48px;
}
.list-v2--icons .list-v2__bullet, .lf2-text-component .list-v2--icons .list-v2__bullet {
  border-radius: 50%;
  background-color: hsl(0deg 0% 0% / 20%);
}
.list-v2--icons .list-v2__icon, .lf2-text-component .list-v2--icons .list-v2__icon {
  --lf2-size: 24px;
  color: hsl(0deg 0% 0%);
  /* icon color */
}

/* utility classes */
.lf2-color-contrast-medium {
  --lf2-color-o: 1;
  color: var(--color-contrast-medium);
}

.lf2-text-component :where(h1, h2, h3, h4) {
  line-height: var(--lf2-heading-line-height, 1.2);
  margin-top: calc(var(--lf2-space-md) * var(--lf2-space-multiplier, 1));
  margin-bottom: calc(var(--lf2-space-sm) * var(--lf2-space-multiplier, 1));
}

.lf2-text-component :where(p, blockquote, ul li, ol li) {
  line-height: var(--lf2-body-line-height, 1.4);
}

.lf2-text-component :where(ul, ol, p, blockquote, .lf2-text-component__block) {
  margin-bottom: calc(var(--lf2-space-sm) * var(--lf2-space-multiplier, 1));
}

.lf2-text-component :where(ul, ol) {
  padding-left: 1.25em;
}

.lf2-text-component ul :where(ul, ol), .lf2-text-component ol :where(ul, ol) {
  padding-left: 1em;
  margin-bottom: 0;
}

.lf2-text-component ul {
  list-style-type: disc;
}

.lf2-text-component ol {
  list-style-type: decimal;
}

.lf2-text-component img {
  display: block;
  margin: 0 auto;
}

.lf2-text-component figcaption {
  margin-top: calc(var(--lf2-space-xs) * var(--lf2-space-multiplier, 1));
  font-size: var(--lf2-text-sm);
  text-align: center;}

.lf2-text-component em {
  font-style: italic;
}

.lf2-text-component strong {
  font-weight: bold;
}

.lf2-text-component s {
  text-decoration: line-through;
}

.lf2-text-component u {
  text-decoration: underline;
}

.lf2-text-component mark {
  background-color: hsla(var(--lf2-color-accent-hsl), 0.2);
  color: inherit;
}

.lf2-text-component blockquote {
  padding-left: 1em;
  border-left: 4px solid hsl(var(--lf2-color-contrast-lower-hsl));
  font-style: italic;
}

.lf2-text-component hr {
  margin: calc(var(--lf2-space-md) * var(--lf2-space-multiplier, 1)) auto;
  background: hsl(var(--lf2-color-contrast-lower-hsl));
  height: 1px;
}

.lf2-text-component > *:first-child {
  margin-top: 0;
}

.lf2-text-component > *:last-child {
  margin-bottom: 0;
}

.lf2-text-component.lf2-line-height-xs {
  --lf2-heading-line-height: 1;
  --lf2-body-line-height: 1.1;
}

.lf2-text-component.lf2-line-height-sm {
  --lf2-heading-line-height: 1.1;
  --lf2-body-line-height: 1.2;
}

.lf2-text-component.lf2-line-height-md {
  --lf2-heading-line-height: 1.15;
  --lf2-body-line-height: 1.4;
}

.lf2-text-component.lf2-line-height-lg {
  --lf2-heading-line-height: 1.22;
  --lf2-body-line-height: 1.58;
}

.lf2-text-component.lf2-line-height-xl {
  --lf2-heading-line-height: 1.3;
  --lf2-body-line-height: 1.72;
}

.lf2-margin-bottom-xs {
  margin-bottom: var(--lf2-space-xs);
}