/* Controls: game buttons, OK button, tabs (squad tabs + sort tabs), chips, element filter, form fields. */

/* ---------------------------------------------------------------- buttons: blue gold-rimmed sub_m buttons, 9-sliced */
.bfc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%;
  min-height: var(--bfc-tap); padding: 0 16px; cursor: pointer; text-decoration: none; text-align: center;
  font: 800 15px/1.1 var(--bfc-font-game); color: #fff; text-shadow: var(--bfc-outline);
  border-style: solid; border-color: transparent; border-width: 14px 16px;
  border-image: url(../assets/ui/btn-blue-1.png) 26 30 fill / 14px 16px stretch;
  background: none; border-radius: 12px;
  transition: transform var(--bfc-dur-fast), filter .15s;
}
.bfc-btn > span { margin: -14px -6px; }
.bfc-btn:hover { filter: brightness(1.15) saturate(1.1); }
.bfc-btn:active { border-image-source: url(../assets/ui/btn-blue-2.png); transform: translateY(1px); }
.bfc-btn--green { border-image-source: url(../assets/ui/btn-green-1.png); }
.bfc-btn--orange { border-image-source: url(../assets/ui/btn-orange-1.png); }
.bfc-btn--green:active, .bfc-btn--orange:active { filter: brightness(.9); }
.bfc-btn[disabled], .bfc-btn[aria-disabled="true"] { border-image-source: url(../assets/ui/btn-grey-1.png); color: #e4e4e4; cursor: not-allowed; filter: none; transform: none; }
.bfc-btn--wide { width: 100%; }
.bfc-btn--small { min-height: var(--bfc-tap); font-size: 13.5px; border-width: 12px 14px; }
.bfc-btn--small > span { margin: -12px -6px; }
.bfc-btn--big { min-height: 56px; font-size: 18px; }
.bfc-btn .bfc-spin { display: inline-block; flex: none; margin-right: 8px; vertical-align: -2px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: bfc-spin .8s linear infinite; }
@keyframes bfc-spin { to { transform: rotate(360deg); } }
.bfc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }

/* the round-cornered OK button (ok_btn) */
.bfc-ok { width: 132px; height: 52px; border: 0; cursor: pointer; border-radius: 14px; background: url(../assets/ui/ok.png) center / contain no-repeat; color: transparent; font-size: 0; }
.bfc-ok:active { background-image: url(../assets/ui/ok-down.png); }

/* ---------------------------------------------------------------- squad tabs (grand_tab1 on/off, remade without the
   baked "Squad 1": _tools/build_tab_assets.py). A 9-slice of the game's plate: as wide as its label, never a patch. */
.bfc-tabs { display: flex; align-items: flex-end; gap: 0; padding: 10px var(--bfc-gutter) 0; overflow-x: auto; scrollbar-width: none; }   /* no gap: the seat rails join into one, as on the game's tab base */
.bfc-tabs::-webkit-scrollbar { display: none; }
/* more tabs off the edge (kit.js tabEdges): that side fades out */
.bfc-tabs.is-more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.bfc-tabs.is-more-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 56px), transparent); }
.bfc-tabs.is-more-l.is-more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.bfc-tab {
  position: relative; flex: none; display: grid; place-items: center; box-sizing: border-box; min-width: 96px; height: var(--bfc-tap);
  padding: 0 10px 10px 4px; cursor: pointer; text-decoration: none; background: none;
  border-style: solid; border-width: 0 25px 0 35px; border-color: transparent;
  border-image: url(../assets/ui/tab-off.png) 0 31 0 44 fill / 0 25px 0 35px stretch;
  font: 800 15px/1 var(--bfc-font-game); color: #e9d6a6; text-shadow: var(--bfc-outline); white-space: nowrap;
}
.bfc-tab > span { position: relative; }
.bfc-tab[aria-selected="true"], .bfc-tab[aria-current="page"] { border-image-source: url(../assets/ui/tab-on.png); color: #fff; }
.bfc-tab:not([aria-selected="true"]):not([aria-current="page"]):hover { filter: brightness(1.2); }
/* phones: "Squads 10 / Raid 3 / Summoner 10" must all sit on the rail at 390 px (they ran 41 px off the edge): slimmer
   end caps (the slanted ends, 12% narrower) and 14 px words; long strips still scroll */
@media (max-width: 480px) {
  .bfc-tab { min-width: 0; padding: 0 6px 10px 2px; border-width: 0 22px 0 31px; border-image-width: 0 22px 0 31px; font-size: 14px; }
}

/* sort/filter tabs, segmented (sort_header_tab rebuilt in CSS) */
.bfc-seg { display: flex; gap: 0; padding: 3px; border-radius: 10px; background: #050a18; box-shadow: inset 0 0 0 1px rgba(214, 164, 62, .45), 0 1px 0 #000; }
.bfc-seg button {
  flex: 1; min-height: var(--bfc-tap); padding: 0 10px; border: 0; border-radius: 8px; cursor: pointer;
  background: none; font: 800 13.5px/1 var(--bfc-font-game); color: var(--bfc-ink-dim); text-shadow: 0 1px 0 #000;
}
.bfc-seg button[aria-pressed="true"] { color: var(--bfc-ink-dark); text-shadow: 0 1px 0 rgba(255, 255, 255, .5); background: linear-gradient(#fff3c4, #e2b450 60%, #b07a1c); box-shadow: 0 0 0 1px #000, inset 0 1px 0 #fffbe6; }

/* ---------------------------------------------------------------- chips and the element filter */
.bfc-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.bfc-chips::-webkit-scrollbar { display: none; }
.bfc-chip {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--bfc-tap); min-width: var(--bfc-tap); padding: 0 14px; border: 0; border-radius: 22px; cursor: pointer;
  font: 800 13px/1 var(--bfc-font-game); color: #fff; text-shadow: var(--bfc-outline-thin);
  background: linear-gradient(#1a2c63, #0b1634); box-shadow: inset 0 0 0 1px #0a2a66, inset 0 2px 0 rgba(255, 255, 255, .2), 0 0 0 2px var(--bfc-gold-3), 0 2px 0 #000;
}
.bfc-chip[aria-pressed="true"] { color: var(--bfc-ink-dark); text-shadow: none; background: linear-gradient(#fff3c4, #e2b450 60%, #b07a1c); }
.bfc-elfilter { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bfc-elfilter button {
  display: grid; place-items: center; min-height: var(--bfc-tap); border: 0; border-radius: 10px; cursor: pointer; padding: 0;
  background: linear-gradient(#1a2c63, #0b1634); box-shadow: inset 0 0 0 1px #0a2a66, 0 0 0 2px #3a2a0c, 0 2px 0 #000;
  font: 800 14px/1 var(--bfc-font-game); color: #fff; text-shadow: var(--bfc-outline-thin);
}
.bfc-elfilter button .bfc-el { width: 28px; height: 28px; filter: grayscale(.8) brightness(.65); transition: filter .15s; }
.bfc-elfilter button:hover .bfc-el, .bfc-elfilter button[aria-pressed="true"] .bfc-el { filter: none; }
.bfc-elfilter button[aria-pressed="true"] { background: linear-gradient(#4a3510, #23170a); box-shadow: inset 0 0 0 1px #000, 0 0 0 2px var(--bfc-gold-1), 0 0 12px rgba(255, 220, 120, .55); }

/* ---------------------------------------------------------------- form fields (game input boxes) */
.bfc-field { display: grid; gap: 6px; }
.bfc-field label { font: 800 13.5px/1.2 var(--bfc-font-game); color: var(--bfc-ink-gold); text-shadow: var(--bfc-outline-thin); }
.bfc-input {
  width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 8px;
  background: linear-gradient(#030712, #0a1430); color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .8), 0 0 0 1px #000, 0 0 0 3px var(--bfc-gold-3), 0 0 0 4px #000;
}
.bfc-input::placeholder { color: #7f8db3; font-weight: 600; }
.bfc-input:focus-visible { outline: none; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .8), 0 0 0 1px #000, 0 0 0 3px var(--bfc-gold-1), 0 0 0 5px #000, 0 0 14px 3px rgba(255, 224, 102, .6); border-radius: 8px; }
.bfc-input[aria-invalid="true"] { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .8), 0 0 0 1px #000, 0 0 0 3px #e0503c, 0 0 0 4px #000; }
.bfc-field__msg { min-height: 1.4em; font-size: var(--bfc-fs-s); color: var(--bfc-ink-bad); text-shadow: 0 1px 0 #000; }
.bfc-check { display: inline-flex; align-items: center; gap: 10px; min-height: var(--bfc-tap); cursor: pointer; font-size: var(--bfc-fs-s); }
.bfc-check input { width: 22px; height: 22px; accent-color: var(--bfc-gold-2); }
/* a small "share" button under a block (Rate my squad on the advisor, Share my profile in Account and History) */
.bfc-shareentry { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
