/* ==========================================================================
   Module: Blog Categories
   ========================================================================== */

@media only screen and (max-width: 67.438em) { /* 1079px */
  .blog-categories-mobile {
    position: relative;
  }

  .blog-categories-desktop {
    display: none;
  }
}

@media only screen and (min-width: 67.5em) { /* 1080px */
  .blog-categories-desktop {
    --cluster-gap: calc(var(--gutter) * 0.5);
  }

  .blog-categories-mobile {
    display: none;
  }
}

/* Desktop
   ========================================================================== */

.blog-categories-desktop a {
  border-radius: var(--corner-radius);
  box-shadow: inset 0 0 0 2px var(--background-color, rgb(var(--rgb-grey-4)));
  color: rgb(var(--rgb-grey-2));
  font-family: var(--font-family-text);
  font-size: var(--font-size-text-md);
  line-height: 5.2rem;
  padding-inline: 0.75em;
  transition: background-color 0.2s,
    box-shadow 0.2s,
    color 0.2s;
  white-space: nowrap;
}

.blog-categories-desktop a:active,
.blog-categories-desktop a:visited {
  color: rgb(var(--rgb-grey-2));
}

.blog-categories-desktop a:hover,
.blog-categories-desktop a:focus {
  background-color: var(--background-color, rgb(var(--rgb-grey-4)));
  color: var(--foreground-color, rgb(var(--rgb-grey-2)));
  text-decoration: none;
}

.blog-categories-desktop p {
  background-color: var(--background-color, rgb(var(--rgb-grey-4)));
  border-radius: var(--corner-radius-lg);
  color: var(--foreground-color, rgb(var(--rgb-grey-2)));
  flex-basis: 100%;
  font-size: 8rem;
  line-height: 13.6rem;
  order: 99;
  padding-inline: 0.5em;
}

/* Mobile
   ========================================================================== */

.blog-categories-mobile a {
  color: rgb(var(--rgb-grey-2));
  display: block;
  font-family: var(--font-family-text);
  font-size: 2rem;
  padding-block: 1rem;
  padding-inline: clamp(
    var(--gutter) / 1.5, 5vw - 1rem, var(--gutter) * 1.5
  );
  transition: background-color .2s,
    color .2s;
}

.blog-categories-mobile a:active,
.blog-categories-mobile a:visited {
  color: rgb(var(--rgb-grey-2));
}

.blog-categories-mobile a:hover,
.blog-categories-mobile a:focus {
  background-color: var(--background-color, rgb(var(--rgb-grey-4)));
  color: var(--foreground-color, rgb(var(--rgb-grey-2)));
  text-decoration: none;
}

.blog-categories-mobile a[aria-current] {
  background-color: var(--background-color, rgb(var(--rgb-grey-4)));
  color: var(--foreground-color, rgb(var(--rgb-grey-2)));
}

.blog-categories-mobile [type="button"] {
  align-items: center;
  background-color: rgb(var(--rgb-grey-5));
  border-radius: var(--corner-radius);
  display: flex;
  font-family: var(--font-family-head);
  font-size: var(--font-size-heading-3);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  height: 6.4rem;
  justify-content: space-between;
  padding-inline: clamp(
    var(--gutter) / 1.5, 5vw - 1rem, var(--gutter) * 1.5
  );
  transition: background-color 0.2s,
    border-radius 0s 0.2s;
  width: 100%;
}

.blog-categories-mobile [type="button"]:hover,
.blog-categories-mobile [type="button"]:focus,
.blog-categories-mobile [type="button"][aria-expanded="true"] {
  background-color: rgb(var(--rgb-highlighter));
}

.blog-categories-mobile [type="button"][aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  transition: background-color 0.2s;
}

.blog-categories-mobile [type="button"] svg {
  transition: transform 0.2s;
}

.blog-categories-mobile [type="button"][aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/**
 * Important: Respect users' motion preferences.
 */

@media (prefers-reduced-motion: reduce) {
  .blog-categories-mobile [type="button"] svg {
    transition: none;
  }
}

@media only screen and (max-width: 67.438em) { /* 1079px */
  .blog-categories-mobile__menu {
    background-color: rgb(var(--rgb-grey-5));
    border-bottom-left-radius: var(--corner-radius);
    border-bottom-right-radius: var(--corner-radius);
    box-shadow: var(--box-shadow);
    display: none;
    height: 0;
    left: 0;
    overflow: hidden;
    padding-block: calc(var(--gutter) * 0.5);
    position: absolute;
    right: 0;
    top: 100%;
    transition: height 0.2s;
    z-index: 99;
  }

  .blog-categories-mobile__menu.is-visible {
    display: block;
    height: auto;
  }
}

/* Search
   ========================================================================== */

.blog-categories__search {
  position: relative;
}

.blog-categories__search [type="search"] {
  --field-background-color: var(--search-background-color, initial);
  --field-border-color: var(--search-border-color, initial);
  --field-border-width: var(--search-border-width, initial);
  --field-border-radius: var(--search-border-radius, initial);
  --field-text-color: var(--search-text-color, rgb(var(--rgb-grey-2)));

  font-family: var(--search-font-family, inherit);
  font-size: var(--search-font-size, inherit);
  line-height: var(--search-height, auto);
  padding: 0;
  width: 100%;
}

.blog-categories__search [type="submit"] {
  height: var(--search-height, auto);
  position: absolute;
}

@media only screen and (max-width: 67.438em) { /* 1079px */
  .blog-categories__search {
    --search-border-color: rgb(var(--rgb-grey-3));
    --search-border-width: -1px;
    --search-font-family: var(--font-family-text);
    --search-font-size: 2rem;
    --search-height: 5.2rem;

    padding-inline: clamp(
      var(--gutter) / 1.5, 5vw - 1rem, var(--gutter) * 1.5
    );
  }

  .blog-categories__search [type="search"] {
    box-shadow: inset 0 var(--field-border-width) 0 0 var(--field-border-color);
    padding-inline-end: 5.6rem;
  }

  .blog-categories__search [type="search"]:focus-within {
    outline: none;
  }

  .blog-categories__search [type="submit"] {
    right: clamp(
      var(--gutter) / 1.5, 5vw - 1rem, var(--gutter) * 1.5
    );
    width: 5.6rem;
  }
}

@media only screen and (min-width: 67.5em) { /* 1080px */
  .blog-categories__search {
    --search-background-color: rgb(var(--rgb-true-white));
    --search-border-color: rgb(var(--rgb-grey-4));
    --search-border-width: 2px;
    --search-border-radius: var(--corner-radius);
    --search-font-family: var(--font-family-text);
    --search-font-size: var(--font-size-text-md);
    --search-height: 5.2rem;
  }

  .blog-categories__search [type="search"] {
    padding-inline-start: 0.75em;
    padding-inline-end: 5.6rem;
  }

  .blog-categories__search [type="submit"] {
    right: 0;
    width: 5.6rem;
  }

  .blog-categories__search--big {
    --search-background-color: rgb(var(--rgb-grey-5));
    --search-border-radius: var(--corner-radius-lg);
    --search-border-color: rgb(var(--rgb-grey-5));
    --search-border-width: 3px;
    --search-font-family: var(--font-family-head);
    --search-font-size: 8rem;
    --search-height: 13.6rem;

    flex-basis: 100%;
    order: 99;
  }

  .blog-categories__search--big [type="search"] {
    padding-inline-start: 12rem;
    padding-inline-end: 0.5em;
  }

  .blog-categories__search--big [type="submit"] {
    left: 0;
    width: 12rem;
  }

  .blog-categories__search--big [type="submit"] svg {
    height: 4.9rem;
    width: 4.8rem;
  }
}