/* Site-wide styles. Prefer Bootstrap utilities; add rules here only when they can't do it. */

/* Theme: Inter (self-hosted), black text, brand blue/green. */
:root,
[data-bs-theme="light"] {
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: #000;
  --bs-body-color-rgb: 0, 0, 0;
  --bs-primary-rgb: 59, 106, 168;
  --bs-success-rgb: 30, 123, 52;
  --bs-secondary-color: #686868;
}

/* Fixed-size circular icon buttons (search submit, gallery arrows). */
.icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

/* Product card titles: a fixed line height (Bootstrap's lh-* are unitless only). */
.card-title-lh {
  line-height: 1.25rem;
}

/* Category bar: the current category is underlined. */
.nav-current {
  text-decoration: underline;
  text-underline-offset: 0.4em;
  text-decoration-thickness: 2px;
}

/* Error/notice alerts htmx swaps into #global-alerts. */
.alert-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
  width: min(28rem, calc(100vw - 2rem));
}

.min-w-0 {
  min-width: 0;
}

/* Search suggestions: a dropdown under its search box (header, home)… */
.suggest-wrap {
  position: relative;
}
.suggest-list {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 1060;
  max-height: 24rem;
  overflow-y: auto;
  min-width: 16rem;
}
/* …or a plain list in the full-screen mobile search. */
.suggest-list-inline .suggest-option {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
/* Keyboard-highlighted option: a light background, not Bootstrap's blue. */
.suggest-option.active,
.suggest-option:active {
  color: var(--bs-body-color);
  background-color: var(--bs-tertiary-bg);
}

/* Search page */
/* A chevron that flips while its dropdown or section is open. */
.icon-flip {
  display: inline-block;
  transition: transform 150ms ease;
}
[aria-expanded="true"] > .icon-flip {
  transform: rotate(180deg);
}
/* "View all teams" / "Show fewer" (Bootstrap marks the closed toggle .collapsed). */
.toggle-more.collapsed .when-expanded,
.toggle-more:not(.collapsed) .when-collapsed {
  display: none;
}
/* The filters drawer on small screens. */
.filters-drawer {
  --bs-offcanvas-height: 80vh;
}

/* htmx loading indicators: add class="htmx-indicator" to a spinner. */
.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease-in;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}
