.collection-toolbar {
  padding-block: var(--spacer-60) var(--spacer-40);

  @media screen and (width >= 1280px) {
    padding-block: var(--spacer-80) var(--spacer-60);
  }
}

.collection-toolbar__wrapper {
  @media screen and (width >= 1280px) {
    display: flex;
    justify-content: space-between;
  }
}

.collection-toolbar__main-dropdown {
  label {
    color: var(--color-indigo);
    display: block;
    font-weight: var(--font-weight-700);
    padding: 0 0 var(--spacer-10) var(--spacer-20);

    @media screen and (width >= 1280px) {
      display: none;
    }
  }

  & nav {
    display: none;
    gap: var(--gap-40);

    @media screen and (width >= 1280px) {
      display: flex;
    }

    a {
      color: var(--color-indigo);
      text-decoration: underline 04px transparent;
      text-underline-offset: 0;
      transition: text-decoration-color 0.3s, text-underline-offset 0.3s;

      &:hover,
      &.active {
        text-decoration-color: var(--color-indigo);
        text-underline-offset: 14px;
      }

      &.active {
        font-weight: var(--font-weight-700);
      }
    }
  }
}

.collection-toolbar__secondary-dropdowns {
  display: flex;
  flex-direction: row;
  gap: var(--gap-40);
  padding-block-start: var(--gap-40);

  @media screen and (width >= 1280px) {
    gap: var(--gap-20);
    padding-block-start: 0;
    place-content: flex-end;
  }

  & .collection-toolbar__sort {
    @media screen and (width >= 1280px) {
      padding-inline: 0;
    }
  }

  & .collection-toolbar__sort-wrapper {
    color: var(--color-indigo);
    display: flex;
    flex-direction: column;
    gap: var(--gap-10);
    position: relative;

    @media screen and (width >= 1280px) {
      align-items: center;
      flex-direction: row;
      height: 22px;
    }

    p {
      font-weight: var(--font-weight-700);
    }

    select {
      @media screen and (width >= 1280px) {
        display: inline-block;
        padding-inline-end: 50px;
      }
    }
  }
}

.collection-toolbar__flavor-filter {
  .collection-toolbar__flavor-toggle {
    background: transparent;
    border: none;
    color: var(--color-indigo);
    cursor: pointer;
    font-weight: var(--font-weight-700);
    padding: 0;
    text-align: left;

    &:hover {
      opacity: 0.8;
    }

    &:focus-visible {
      outline: 2px solid var(--color-indigo);
      outline-offset: 2px;
    }
  }

  .collection-toolbar__flavor-label {
    align-items: center;
    display: flex;
    gap: 4px;
      @media screen and (width <=700px) {
        font-size: var(--font-size-16);
      }
  }

  .collection-toolbar__flavor-select {
    clip: rect(0 0 0 0);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;

    &.is-visible {
      clip: auto;
      height: auto;
      overflow: visible;
      position: static;
      white-space: normal;
      width: auto;
    }
  }

  .collection-toolbar__sort-wrapper[aria-expanded="true"] {
    .collection-toolbar__flavor-toggle {
      clip: rect(0 0 0 0);
      height: 1px;
      overflow: hidden;
      position: absolute;
      white-space: nowrap;
      width: 1px;
    }

    .collection-toolbar__flavor-select {
      clip: auto;
      height: auto;
      overflow: visible;
      position: static;
      white-space: normal;
      width: auto;
    }
  }
}

.collection-toolbar__sort-filter {
  .collection-toolbar__sort-toggle {
    background: transparent;
    border: none;
    color: var(--color-indigo);
    cursor: pointer;
    font-weight: var(--font-weight-700);
    padding: 0;
    text-align: left;

    &:hover {
      opacity: 0.8;
    }

    &:focus-visible {
      outline: 2px solid var(--color-indigo);
      outline-offset: 2px;
    }
  }

  .collection-toolbar__sort-label {
    align-items: center;
    display: flex;
    gap: 4px;
    text-transform: var(--text-lowercase);
     @media screen and (width <=700px) {
        font-size: var(--font-size-16);
      }
  }

  .collection-toolbar__sort-select {
    clip: rect(0 0 0 0);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;

    &.is-visible {
      clip: auto;
      height: auto;
      overflow: visible;
      position: static;
      white-space: normal;
      width: auto;
    }
  }

  .collection-toolbar__sort-wrapper[aria-expanded="true"] {
    .collection-toolbar__sort-toggle {
      clip: rect(0 0 0 0);
      height: 1px;
      overflow: hidden;
      position: absolute;
      white-space: nowrap;
      width: 1px;
    }

    .collection-toolbar__sort-select {
      clip: auto;
      height: auto;
      overflow: visible;
      position: static;
      white-space: normal;
      width: auto;
    }
  }
}
