.ob-filters {
  margin: 36px 0 44px 0;
}

.ob-search-row {
  margin-bottom: 26px;

  .ob-search-wrap {
    max-width: 560px;

    input.search-input {
      width: 100%;
      max-width: 560px;
      font-size: 16px;
      padding: 15px 18px 15px 50px;
    }

    .search-icon {
      top: 16px;
    }
  }
}

.ob-filters-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ob-search-hint {
  margin: 10px 0 0 4px;
  font-size: 13px;
  color: #757575;
}

.ob-sort-select {
  margin-left: auto;
  min-width: 150px;

  .components-input-control__backdrop {
    border-color: transparent !important;
    box-shadow: none !important;
  }

  .components-input-control__container {
    background: $light-bg;
    border-radius: 999px;
  }

  .components-base-control__field {
    margin-bottom: 0 !important;
  }

  .components-select-control__input,
  .components-input-control__input,
  select {
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
    color: $main-text;
    padding-left: 16px;
  }
}

.ob-color-filter {
  position: relative;
}

.ob-color-filter.is-open,
.ob-color-filter:focus-within {
  .ob-color-filter__panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .ob-color-filter__chevron {
    transform: rotate(180deg);
  }
}

.ob-color-filter__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: $light-bg;
  color: $main-text;
  cursor: pointer;
  transition: box-shadow 0.18s ease, background 0.18s ease;

  &.has-selection {
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.12);
  }

  &:hover {
    background: #f2f2f2;
  }
}

.ob-color-filter__swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.ob-color-filter__wheel {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-block;
  background: conic-gradient(
    #ff5f6d 0deg,
    #ffc371 70deg,
    #7ed56f 140deg,
    #4facfe 220deg,
    #b06ab3 300deg,
    #ff5f6d 360deg
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.ob-color-filter__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.ob-color-filter__chevron {
  color: #6b7280;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.ob-color-filter__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 260px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ob-color-filter__option,
.ob-color-filter__clear {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: $main-text;
  text-align: left;
  cursor: pointer;
}

.ob-color-filter__clear {
  grid-column: 1 / -1;
}

.ob-color-filter__option:hover,
.ob-color-filter__option.is-active,
.ob-color-filter__clear:hover {
  background: rgba(17, 24, 39, 0.05);
}

.ob-color-filter__name {
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.ob-color-filter__clear {
  justify-content: center;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.ob-ranking-loader {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px 0;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #1e1e1e;
  background: linear-gradient(90deg, #f3f0ff 0%, #eaf2ff 50%, #f3f0ff 100%);
  background-size: 200% 100%;
  animation: ob-loader-sheen 1.8s ease-in-out infinite;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);

  &__dots {
    display: inline-flex;
    gap: 4px;

    span {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #6c5ce7;
      animation: ob-loader-bounce 1s ease-in-out infinite;
    }

    span:nth-child(2) {
      animation-delay: 0.15s;
    }

    span:nth-child(3) {
      animation-delay: 0.3s;
    }
  }
}

@keyframes ob-loader-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }

  40% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes ob-loader-sheen {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}
