/* MR filter chip row CSS — ITER 295 (BS-paralel)
   ─────────────────────────────────────────────────────────────────
   Horizontal scrollable filter chip row with multi-select state +
   count badge. Used for category filters, provider chips, sort tabs.

   Markup:
     <div class="bs-fc-row" data-fc-multi="true">
       <button class="bs-fc-chip is-active" data-value="all">
         Tümü
         <span class="bs-fc-count">324</span>
       </button>
       <button class="bs-fc-chip" data-value="slot">Slot</button>
       <button class="bs-fc-chip" data-value="live">Canlı Casino</button>
     </div>

   Variants:
     .bs-fc-row             default (horizontal scroll)
     .bs-fc-row--center     center-aligned content
     .bs-fc-row--wrap       multi-line wrap (no scroll)
     .bs-fc-row--compact    smaller chips (28px)

   Chip states:
     default → no class
     hover   → :hover (desktop only)
     active  → .is-active (selected)
     loading → .is-loading (disabled + spinner)
     disabled → .is-disabled

   Tokens:
     --bs-fc-h:           36px
     --bs-fc-radius:      18px (pill shape)
     --bs-fc-bg:          rgba(255,255,255,0.05)
     --bs-fc-bg-active:   var(--theme-accent, #d4af37)
     --bs-fc-text:        rgba(255,255,255,0.85)
     --bs-fc-text-active: #18120a
     --bs-fc-gap:         6px
*/

:root {
  --bs-fc-h: 36px;
  --bs-fc-radius: 18px;
  --bs-fc-bg: rgba(255, 255, 255, 0.05);
  --bs-fc-bg-hover: rgba(255, 255, 255, 0.08);
  --bs-fc-bg-active: var(--theme-accent, #d4af37);
  --bs-fc-text: rgba(255, 255, 255, 0.85);
  --bs-fc-text-active: #18120a;
  --bs-fc-border: rgba(255, 255, 255, 0.10);
  --bs-fc-gap: 6px;
}

.bs-fc-row {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--bs-fc-gap);
  padding: 8px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.bs-fc-row::-webkit-scrollbar {
  display: none;
}

.bs-fc-row--wrap {
  flex-wrap: wrap;
  overflow-x: visible;
  scroll-snap-type: none;
}

.bs-fc-row--center {
  justify-content: center;
}

.bs-fc-row--compact {
  --bs-fc-h: 28px;
  --bs-fc-radius: 14px;
  padding: 6px 8px;
}

/* Edge fade for scroll affordance (right edge) */
.bs-fc-row[data-fc-fade]::after {
  content: '';
  position: sticky;
  right: 0;
  width: 24px;
  height: var(--bs-fc-h);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5));
  pointer-events: none;
  flex: 0 0 auto;
}

/* Chip */
.bs-fc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--bs-fc-h);
  padding: 0 14px;
  border-radius: var(--bs-fc-radius);
  background: var(--bs-fc-bg);
  border: 1px solid var(--bs-fc-border);
  color: var(--bs-fc-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background-color 180ms cubic-bezier(0.4, 0, 0.2, 1),
              color 180ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 180ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 100ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  flex: 0 0 auto;
}
.bs-fc-chip:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.5);
  outline-offset: 2px;
}
.bs-fc-chip:hover {
  background: var(--bs-fc-bg-hover);
  border-color: rgba(255, 255, 255, 0.16);
}
.bs-fc-chip:active {
  transform: scale(0.96);
}

.bs-fc-chip.is-active {
  background: var(--bs-fc-bg-active);
  color: var(--bs-fc-text-active);
  border-color: var(--bs-fc-bg-active);
  font-weight: 700;
}
.bs-fc-chip.is-active:hover {
  background: var(--bs-fc-bg-active);
}

.bs-fc-chip.is-disabled,
.bs-fc-chip[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.bs-fc-chip.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.bs-fc-chip.is-loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  margin-top: -7px;
  margin-left: -7px;
  animation: bsFcSpin 800ms linear infinite;
}
@keyframes bsFcSpin {
  to { transform: rotate(360deg); }
}

/* Chip with icon */
.bs-fc-chip > .bs-i,
.bs-fc-chip > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.bs-fc-chip.is-active > .bs-i {
  background-color: var(--bs-fc-text-active);
}

/* Count badge inside chip */
.bs-fc-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 9px;
}
.bs-fc-chip.is-active .bs-fc-count {
  background: rgba(0, 0, 0, 0.16);
  color: rgba(0, 0, 0, 0.85);
}

/* Compact chip count */
.bs-fc-row--compact .bs-fc-chip {
  font-size: 12px;
  padding: 0 10px;
  gap: 4px;
}
.bs-fc-row--compact .bs-fc-count {
  min-width: 18px;
  height: 16px;
  font-size: 10px;
  padding: 0 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bs-fc-chip { transition: none !important; }
  .bs-fc-chip.is-loading::after { animation: none; }
}
