.bm-template-market-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bm-template-market-filter__button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #e3e0ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #625d72;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.bm-template-market-filter__button:hover {
  border-color: #aaa0e7;
  color: #6253c9;
}

.bm-template-market-filter__button[aria-pressed="true"],
.bm-template-market-filter__button[aria-selected="true"] {
  border-color: #7565de;
  background: #7565de;
  color: #fff;
  box-shadow: 0 5px 14px rgba(117, 101, 222, 0.2);
}

.bm-template-market-filter__button:focus-visible {
  outline: 3px solid rgba(117, 101, 222, 0.24);
  outline-offset: 2px;
}

.bm-template-market-helper {
  margin: 8px 0 0;
  color: #8a8597;
  font-size: 12px;
  line-height: 1.6;
}

.bm-template-market-empty {
  grid-column: 1 / -1;
  padding: 32px 16px;
  color: #777181;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.bm-template-market-empty__button {
  min-height: 36px;
  margin-left: 10px;
  padding: 7px 14px;
  border: 1px solid #7565de;
  border-radius: 999px;
  background: #fff;
  color: #6253c9;
  font-weight: 650;
}

.bm-template-market-empty__button:focus-visible {
  outline: 3px solid rgba(117, 101, 222, 0.24);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .bm-template-market-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 1px 4px;
    scrollbar-width: none;
  }

  .bm-template-market-filter::-webkit-scrollbar {
    display: none;
  }

  .bm-template-market-filter__button {
    flex: 0 0 auto;
    min-height: 38px;
  }

  .bm-template-market-empty__button {
    display: block;
    margin: 10px auto 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-template-market-filter__button {
    transition: none;
  }
}
