.tk-niche-filters {
  position: sticky;
  top: 0;
  z-index: 30;
  min-width: 0;
  margin-bottom: 12px;
  padding: 6px 8px;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 5px #17344e0a;
  color: #203750;
  container: tk-niche-bar / inline-size;
}
.tk-niche-toolbar, .tk-niche-scan, .tk-niche-presets { display: flex; align-items: center; gap: 5px; }
.tk-niche-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}
.tk-niche-scroll::-webkit-scrollbar { height: 7px; }
.tk-niche-scroll::-webkit-scrollbar-track { background: #edf3fa; border-radius: 6px; }
.tk-niche-scroll::-webkit-scrollbar-thumb { background: #9eb7d0; border-radius: 6px; }
.tk-niche-scroll::-webkit-scrollbar-thumb:hover { background: #7699bd; }
@supports not selector(::-webkit-scrollbar) {
  .tk-niche-scroll { scrollbar-width: thin; scrollbar-color: #9eb7d0 #edf3fa; }
}
.tk-niche-toolbar { flex: 0 0 auto; flex-wrap: nowrap; max-width: none !important; }
.tk-niche-scan { flex: 0 0 auto; margin-inline-start: auto; }
.tk-niche-filters button, .tk-niche-info, .tk-niche-panel button {
  border: 1px solid #d9e4f0;
  background: #f4f8fc;
  color: #294463;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  cursor: pointer;
}
.tk-niche-filters button, .tk-niche-info { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 4px; white-space: nowrap; min-height: 30px; }
.tk-niche-info { cursor: help; }
.tk-niche-filters .tk-niche-clear { color: #fff; background: #dc2626; border-color: #dc2626; }
.tk-niche-filters .tk-niche-clear:hover { background: #b91c1c; border-color: #b91c1c; }
.tk-niche-chip::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  flex: 0 0 5px;
  margin-inline-start: 2px;
}
.tk-niche-toolbar .tk-niche-label { color: #000; }
.tk-niche-toolbar .tk-niche-value { color: #0757b4; }
.tk-niche-value { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-niche-chip[aria-expanded="true"], .tk-niche-chip.is-active, .tk-niche-panel button[aria-pressed="true"] {
  border-color: #80b7fb;
  color: #0757b4;
  background: #e9f3ff;
}
.tk-niche-panel {
  position: fixed;
  z-index: 1000;
  width: min(275px, calc(100vw - 16px));
  max-height: 380px;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #dbe5f0;
  border-radius: 11px;
  background: #fff;
  color: #203750;
  font: 13px/1.4 Tahoma, Arial, sans-serif;
  box-shadow: 0 10px 25px #183a5b29;
}
.tk-niche-options { display: grid; gap: 2px; }
.tk-niche-options button { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; text-align: start; border-color: transparent; background: transparent; min-height: 30px; }
.tk-niche-options button:hover { background: #f1f6fb; }
.tk-niche-panel small { display: block; color: #516987; line-height: 1.45; font-size: 11px; }
.tk-niche-panel label { font-size: 12px; }
.tk-niche-presets { flex-wrap: wrap; }
.tk-niche-range { display: grid; gap: 5px; }
.tk-niche-range .tk-niche-apply { justify-self: start; }
.tk-niche-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.tk-niche-fields input { width: 100%; min-width: 0; padding: 6px; border: 1px solid #d7e4f1; border-radius: 6px; background: #fff; font-size: 12px; }
.tk-niche-country-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 180px; overflow: auto; }
.tk-niche-country-list label, .tk-niche-check { display: flex; align-items: center; gap: 6px; }
.tk-niche-panel input[type="checkbox"] { flex: 0 0 15px; width: 15px; height: 15px; min-height: 0; margin: 0; accent-color: #1661bf; }
.tk-niche-filters .tk-niche-apply, .tk-niche-panel .tk-niche-apply { background: #1661bf; color: #fff; border-color: #1661bf; gap: 0; }
.tk-niche-filters button:disabled, .tk-niche-panel button:disabled { opacity: .55; cursor: not-allowed; }
.tk-niche-scroll:focus-visible, .tk-niche-filters button:focus-visible, .tk-niche-panel :is(button, input):focus-visible { outline: 2px solid #1661bf; outline-offset: 0; }
.tk-niche-status-chip { font-variant-numeric: tabular-nums; }
.tk-niche-filters .tk-niche-status-chip.needs-attention { background: #fff6e5; border-color: #efce96; color: #7c4d09; }
.tk-niche-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tk-niche-empty { color: #526981; border: 1px dashed #c6d7e8; background: #f7fafe; border-radius: 12px; padding: 24px 12px; text-align: center; }
.tk-niche-suggestion-button { margin-top: 8px; padding: 5px 10px; border: 1px solid #a7e5cb; border-radius: 8px; color: #08704d; background: #effcf6; font-weight: 700; }
.tk-niche-suggestion-button:disabled { opacity: .55; }
@container tk-niche-bar (width < 980px) {
  .tk-niche-run-label { display: none; }
  .tk-niche-value { max-width: 74px; }
}
@container tk-niche-bar (width < 480px) {
  .tk-niche-value { max-width: 60px; }
}
@media (pointer: coarse) {
  .tk-niche-filters button, .tk-niche-panel button { min-height: 38px; }
}
