.br-blog-posts-filter {
  .posts-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
  }

  .posts-filter--desktop {
    @media screen and (max-width: 767px) {
      display: none;
    }
  }

  .posts-filter__pill {
    color: #263045;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 4px 14px;
    border: 1px solid #6e7482;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition:
      background-color 0.2s ease,
      color 0.2s ease,
      border-color 0.2s ease;

    &.is-active {
      color: #fff;
      background: #2f3553;
      border-color: #2f3553;
    }
  }

  .posts-filter-dropdown {
    display: none;
    position: relative;
    margin-top: 24px;

    @media screen and (max-width: 767px) {
      display: block;
    }

    &.is-open {
      .posts-filter-dropdown__toggle {
        border-color: #263045;
      }

      .posts-filter-dropdown__icon::before {
        transform: rotate(-135deg) translateX(-1px);
      }
    }
  }

  .posts-filter-dropdown__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 3px 3px 3px 16px;
    border: 1px solid #bcbfc5;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
  }

  .posts-filter-dropdown__icon {
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #eff4ff;

    &::before {
      content: "";
      width: 8px;
      height: 8px;
      border-right: 2px solid #1d3b62;
      border-bottom: 2px solid #1d3b62;
      transform: rotate(45deg) translateY(-1px);
      transition: transform 0.2s ease;
    }
  }

  .posts-filter-dropdown__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 10;
    width: 100%;
    padding: 4px 0;
    border: 1px solid #d9deea;
    background: #fff;
  }

  .posts-filter-dropdown__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 4px;

    &.is-active {
      background: #eef1f7;
    }

    input[type="checkbox"] {
      appearance: none;
      width: 0;
      height: 0;
      cursor: pointer;

      &:checked + span::after {
        opacity: 1;
      }
    }

    span {
      position: relative;
      display: block;
      padding-left: 32px;
      line-height: 24px;

      &::before,
      &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 24px;
        height: 24px;
        border-radius: 4px;
        overflow: hidden;
      }

      &::before {
        border: 1px solid #bcbfc5;
      }

      &::after {
        opacity: 0;
        background-color: #000;
        background-repeat: no-repeat;
        background-position: center;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        transition: opacity 0.2s ease;
      }
    }
  }

  .posts-results-target {
    position: relative;
    z-index: 1;
  }

  .new-content-target {
    margin-bottom: 30px;
  }

  .cards-section:not(.bg-secondary) {
    padding-bottom: 0;
  }

  .news-empty {
    padding: 24px 0;
  }

  &.is-loading {
    .js-posts-results-target {
      opacity: 0.6;
      pointer-events: none;
    }
  }

  @media screen and (min-width: 1200px) {
    .posts-filter {
      margin-top: 40px;
      gap: 12px;
    }
  }
}
