main#brx-content.bricks-area div.brxe-general-sorting {
  .children-container
    > *:not(.is-active-element):not(:has(.is-active-element)) {
    display: none; /* only hide elements that are neither active nor contain an active element */
  }
}

.brxe-general-sorting {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
  .selector-dropdown-container {
    gap: 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .selector-dropdown-label {
    font-size: 20px;
    line-height: 22px;
    font-weight: 600;
    color: black;
    margin: 0;
  }

  .selector-dropdown-button-container {
    gap: 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    .dropdown-button {
      gap: 4px;
      padding: 12px 24px;
      align-items: start;
    }
  }

  .selector-dropdown-toggle,
  .selector-dropdown-toggle * {
    transition: all 0.2s cubic-bezier(0.39, 0.575, 0.565, 1);
  }

  .selector-dropdown-toggle * {
    pointer-events: none;
  }

  .selector-dropdown-options-wrapper[aria-expanded="false"] {
    display: none;
  }

  .selector-dropdown-container:has(*[aria-expanded="true"]) {
    .selector-dropdown-toggle {
      background-color: var(--bricks-color-kewken) !important;
      color: #f2fcfe;
      svg path {
        stroke: #f2fcfe;
      }
    }
    .selector-dropdown-toggle svg {
      transform: rotate(-180deg);
    }
  }

  .selector-dropdown-toggle svg {
    transform: rotate(0deg);
  }

  /* .selector-dropdown-options-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 15px 10px 15px;
    border-color: transparent transparent #ffffff transparent;
    border-top-right-radius: 200px 100px;
    border-top-left-radius: 200px 100px;
    overflow: hidden;
  } */

  .selector-dropdown-options-wrapper {
    position: absolute;
    top: 6rem;
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    z-index: 10;
    ul {
      border-radius: 20px;
      list-style: none;
      padding: 0;
      margin: 0;
      max-height: 200px;
      overflow: auto;

      scrollbar-width: thin;
      scrollbar-color: #888 transparent;
    }

    ul::-webkit-scrollbar {
      width: 1px;
      height: 1px;
    }

    ul::-webkit-scrollbar-track {
      background: transparent;
    }

    ul::-webkit-scrollbar-thumb {
      background-color: #888;
      border-radius: 1px;
    }

    ul::-webkit-scrollbar-thumb:hover {
      background-color: #555;
    }
  }

  .dropdown-options > .dropdown-option {
    padding: 10px 32px;
    cursor: pointer;
    font-size: 14px;
    .option-text {
      pointer-events: none;
    }

    .selector-dropdown-options-arrow {
      content: "";
      position: absolute;
      top: -8px;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 0 15px 10px 15px;
      border-color: transparent transparent #ffffff transparent;
      border-top-right-radius: 200px 100px;
      border-top-left-radius: 200px 100px;
      overflow: hidden;
    }

    &:first-child {
      border-top-right-radius: 20px;
      border-top-left-radius: 20px;
    }

    &:last-child {
      border-bottom-right-radius: 20px;
      border-bottom-left-radius: 20px;
    }

    &:hover,
    &:focus {
      background-color: #e1f6f9;
      div {
        border-color: transparent transparent #e1f6f9 transparent;
      }
    }
  }

  .children-container > *[aria-hidden="true"] {
    display: none;
  }

  @media (width < 780px) {
    .selector-dropdown-container {
      flex-direction: column;
    }
    .selector-dropdown-button-container {
      display: flex;
      .selector-dropdown-options {
      }
    }
  }

  @media (width <= 478px) {
    .selector-dropdown-container,
    .selector-wrapper,
    .brxe-selector {
      gap: 30px !important;
    }
  }
}
