/* Global styles for the .bt-filter-bar* family used by JS-rendered
   pages (/sets, /brands/[brand]). These rules apply to DOM that is
   built at runtime in src/lib/sets-ui.ts and src/lib/brand-ui.ts,
   so they MUST be global (not Astro component-scoped). */

.bt-filter-bar {
  border: var(--bt-border-width) solid var(--bt-border);
  padding: var(--bt-space-md) var(--bt-space-lg);
  margin-bottom: var(--bt-space-lg);
  background: var(--bt-bg);
}

.bt-filter-bar__groups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bt-space-md) var(--bt-space-lg);
  min-width: 0;
}

.bt-filter-bar__group {
  display: flex;
  align-items: center;
  gap: var(--bt-space-sm);
  flex-wrap: wrap;
  min-width: 0;
}

.bt-filter-bar__chips {
  display: flex;
  gap: var(--bt-space-xs);
  flex-wrap: wrap;
}

.bt-filter-bar__chip {
  font-family: var(--bt-font-ui);
  font-size: var(--bt-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bt-text);
  text-decoration: none;
  padding: var(--bt-space-xs) var(--bt-space-md);
  border: var(--bt-border-width) solid var(--bt-border);
  background: var(--bt-bg);
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.bt-filter-bar__chip:hover {
  background: var(--bt-muted-surface);
  text-decoration: none;
}

.bt-filter-bar__chip:focus-visible {
  outline: 2px solid var(--bt-yellow);
  outline-offset: 2px;
}

.bt-filter-bar__chip--active {
  background: var(--bt-yellow);
  color: var(--bt-text);
  border-color: var(--bt-text);
}

.bt-filter-bar__chip--active:hover {
  background: var(--bt-yellow);
}

.bt-filter-bar__divider {
  width: 1px;
  height: 32px;
  background: var(--bt-border);
  align-self: center;
  flex-shrink: 0;
}

.bt-filter-bar__label {
  font-family: var(--bt-font-ui);
  font-size: var(--bt-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bt-muted);
  white-space: nowrap;
}

.bt-filter-bar__select {
  min-width: min(320px, 100%);
  min-height: 44px;
  padding: 8px 36px 8px 12px;
  border: var(--bt-border-width) solid var(--bt-border);
  background: var(--bt-bg);
  color: var(--bt-text);
  font: 700 var(--bt-text-sm)/1 var(--bt-font-ui);
}

.bt-filter-bar__select:focus-visible {
  outline: 2px solid var(--bt-yellow);
  outline-offset: 2px;
}

.bt-filter-bar__clear {
  margin-left: auto;
}

.bt-filter-bar__clear-link {
  font-family: var(--bt-font-ui);
  font-size: var(--bt-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bt-text);
  text-decoration: underline;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: var(--bt-space-xs) var(--bt-space-md);
}

.bt-filter-bar__clear-link:hover {
  background: var(--bt-yellow);
}

/* Mobile: hide the vertical divider and let groups stack */
@media (max-width: 767px) {
  .bt-filter-bar {
    padding: var(--bt-space-md);
  }

  .bt-filter-bar__groups {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--bt-space-md);
  }

  .bt-filter-bar__divider {
    display: none;
  }

  .bt-filter-bar__clear {
    margin-left: 0;
  }

  .bt-filter-bar__group,
  .bt-filter-bar__select {
    width: 100%;
    max-width: 100%;
  }
}
