/* The team builder: the formation, the slots and their star buttons, and the phone rules for the rosters. Loaded in the order base, roster, fighter, team, companions, panels, pages, insights: a later file wins over an earlier one at equal weight. */
/* team builder */
.teams { padding-top: 32px; padding-bottom: 72px; }
.teams-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.teams-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.team-name { width: 100%; max-width: 560px; padding: 0 0 4px; background: transparent; border: 0; border-bottom: 2px dashed var(--line-2); outline: none;
  font: 400 52px/1.05 var(--display); text-transform: uppercase; }
.team-name:focus { border-bottom-color: var(--accent); }
.team-name::placeholder { color: #3A3D4A; }
.teams-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.teams-main { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.teams-col { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.teams-picker { flex: 1 1 460px; min-width: 0; position: sticky; top: 16px; }
.team-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.team-panel .h-row { margin-bottom: 0; }
.teams-pair { display: flex; flex-wrap: wrap; gap: 20px; }
.teams-pair > .team-panel { flex: 1 1 280px; }
/* the formation: a grid of half-slot columns, each slot lifted by its column (see formation() in js/team/formation.js) */
.formation { display: grid; grid-template-columns: var(--cols); row-gap: 10px; padding: var(--pad) 0 8px; border-radius: 12px;
  background: radial-gradient(ellipse at 50% 70%, rgba(54,209,255,.10), rgba(54,209,255,0) 65%); }
.tslot { position: relative; min-width: 0; padding: 0 5px; grid-column: var(--col); grid-row: var(--row); transform: translateY(var(--lift)); }
.tslot.is-pet { align-self: center; }
.tslot-card { display: flex; flex-direction: column; width: 100%; padding: 0; background: var(--panel-2); border: 2px solid var(--line-2); border-radius: 12px;
  overflow: hidden; text-align: left; cursor: pointer; }
.tslot-card:hover, .tslot-empty:hover, .tslot-pet:hover { border-color: #5A5D6B; }
.tslot-card.is-sel, .tslot-empty.is-sel { border-color: var(--accent); }
/* dragging the selected fighter: only the selected card takes touches, a copy follows the pointer, and the
   slot under it is outlined as the drop target */
.team-panel[hidden] { display: none; }
.tslot-card.is-sel { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tslot-card img { -webkit-user-drag: none; user-select: none; }
.tslot-card.is-dragging { opacity: .35; }
.tslot-ghost { position: fixed; left: 0; top: 0; z-index: 1000; margin: 0; pointer-events: none; opacity: .92; cursor: grabbing; box-shadow: 0 14px 34px rgba(0,0,0,.6); }
body.dragging-slot { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.tslot.is-target .tslot-card, .tslot.is-target .tslot-empty { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 3px rgba(54,209,255,.35); }
.team-info-head { display: flex; align-items: center; gap: 14px; }
.team-info-head > img, .team-info-head > .ph { width: 84px; height: 84px; flex: none; border-radius: 12px; object-fit: cover; background: var(--tint); border: 2px solid var(--rc); }
.team-info-head > div { min-width: 0; }
.team-info-head p { margin: 2px 0 0; }
.team-info-head .glyph { margin-right: 3px; }
.team-info-stats { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.team-info-stats .stat { padding: 8px 10px; }
.team-info-stats .stat-max { font-size: 22px; }
.team-info-skills { display: flex; flex-direction: column; gap: 8px; }
.team-info-skills .h-row { margin-bottom: 0; }
.team-info-skills .h-sub { margin: 0; font-size: 18px; }
.team-info-skill { padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--kc); border-radius: 8px; background: var(--ink); }
.team-info-skill p { margin: 0; }
.team-info-skill-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; }
.team-info-skill .skill-type { margin-left: 0; }
.team-info-skill-dmg { margin-top: 2px !important; font-size: 13px; color: var(--muted); }
.team-info-skill-text { margin-top: 6px !important; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.team-info-skill-text b { color: var(--tag); font-weight: 600; }
.team-info-fx { display: flex; flex-wrap: wrap; gap: 6px; }
.info-fx { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--ink); font-size: 13px; }
.info-fx svg { color: var(--fx); }
.team-info-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.team-info-actions select { height: 36px; padding: 0 10px; background: var(--ink); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; max-width: 100%; }
.tslot-art { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--tint); }
.tslot-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc); }
.tslot-art img, .tslot-art .ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.tslot-name { padding: 6px 8px 0; font: 700 16px/1.1 var(--cond); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tslot-meta { display: flex; align-items: center; gap: 4px; padding: 2px 8px 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.tslot-x { position: absolute; top: 6px; right: 11px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(13,14,18,.9); font: 600 18px/1 var(--body); cursor: pointer; }
.tslot-x:hover { border-color: var(--accent); }
/* the stars button, top left of a fighter's card: like the x, grey with no stars, yellow up to 5 and blue from 6 (as on the fighter page) */
.tslot-star { position: absolute; top: 6px; left: 11px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(13,14,18,.9); color: #9094A8; font: 400 17px/1 var(--body); cursor: pointer; padding: 0; }
.tslot-star:hover { border-color: var(--accent); }
.tslot-star.is-on { color: #FFD21F; border-color: #8A7410; }
.tslot-star.is-on.is-evo { color: #3BA7FF; border-color: #1F5F9A; }
.tslot-star b { position: absolute; right: -3px; bottom: -3px; min-width: 15px; height: 15px; padding: 0 3px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  background: var(--ink); border: 1px solid currentColor; font: 700 10px/1 var(--body); }
.star-pop { position: absolute; z-index: 60; width: 270px; max-width: calc(100vw - 16px); padding: 8px 10px 6px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; }
.star-pop p { margin: 0 0 2px; }
.tslot-x.is-static { position: static; flex: none; }
.tslot-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; aspect-ratio: 1 / 1.32; padding: 8px;
  background: var(--ink); border: 2px dashed #3A3D4A; border-radius: 12px; color: var(--faint); font: 600 13px var(--body); cursor: pointer; }
.tslot-empty.is-sel { background: rgba(54,209,255,.08); color: var(--accent-hover); }
.tslot-pet { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; aspect-ratio: 1 / 1; padding: 8px;
  background: var(--ink); border: 2px dashed var(--accent-hover); border-radius: 50%; color: var(--accent-hover); font: 600 13px var(--body); cursor: pointer; overflow: hidden; }
.tslot-pet.is-set { border-style: solid; border-color: var(--accent); }
.tslot-pet img { width: 86%; height: 86%; object-fit: contain; }
.form-seg { align-self: flex-start; flex-wrap: wrap; }
.form-seg[hidden] { display: none; }
.form-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 6px; font: 600 15px var(--cond); }
.form-icon { flex: none; }
.formation-legend { display: flex; justify-content: space-between; margin: 0; font: 600 12px var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.team-pet { display: flex; align-items: center; gap: 14px; }
.team-pet > img, .team-pet > .ph { width: 96px; height: 96px; flex: none; border-radius: 12px; background: var(--tint); border: 2px solid var(--rc); }
.team-pet > div { flex: 1; min-width: 0; }
.team-pet p { margin: 2px 0 0; }
.team-pet .glyph { margin-right: 4px; }
.team-pet-name { font: 700 22px/1.1 var(--cond); text-transform: uppercase; text-decoration: none; }
p.is-hot, .team-hint.is-hot { color: var(--accent-hover); }
.team-add-pet { display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 12px 16px; background: var(--ink); border: 2px dashed var(--line-2); border-radius: 12px;
  color: var(--muted); font: 600 15px var(--body); cursor: pointer; text-align: left; }
.team-add-pet:hover { border-color: #5A5D6B; color: var(--text); }
.team-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-dmg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 14px; color: var(--text-2); }
.team-dmg span { display: inline-flex; align-items: center; gap: 6px; }
.type-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); }
.team-warn { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(255,74,28,.12); border: 1px solid rgba(255,74,28,.4); color: #FFB59E; font-size: 14px; }
.syn-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 6px 18px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.syn-row p { margin: 0; }
.syn-name { display: flex; align-items: center; gap: 8px; font: 700 18px var(--cond); letter-spacing: .05em; text-transform: uppercase; }
.syn-name > i { width: 12px; height: 12px; border-radius: 3px; background: var(--faint); }
.syn-name span { color: var(--muted); }
.syn-pips { display: flex; gap: 4px; margin-top: 6px; }
.syn-pips i { flex: 1; max-width: 34px; height: 6px; border-radius: 3px; background: var(--line); }
.syn-pips i.is-on { background: var(--sc); }
.syn-pips i.is-capped { outline: 1px dashed #3A3D4A; outline-offset: -1px; background: transparent; }
.syn-state { font: 600 13px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.syn-row.is-on .syn-state { color: var(--text); }
.syn-bonus { font-size: 15px; color: var(--faint); white-space: pre-line; }
.syn-row.is-on .syn-bonus { color: var(--text-2); }
.team-fx-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px 28px; }
.team-fx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.team-fx-item { border-radius: 6px; border: 1px solid var(--line-2); background: var(--ink); min-width: 0; }
.team-fx-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; width: 100%; padding: 6px 10px; background: none; border: 0; color: inherit; font-size: 14px; text-align: left; cursor: pointer; min-width: 0; }
.team-fx-row b { font-weight: 600; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.team-fx-row .muted { margin-left: auto; font-size: 12px; white-space: nowrap; }
.team-fx-item.is-warn { border-color: rgba(255,138,61,.5); }
.is-warn-text { color: #FF8A3D; font-size: 12px; white-space: nowrap; }
.is-chg-text { color: var(--chg); font-size: 12px; white-space: nowrap; }
.team-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.team-tabs button { min-height: 44px; padding: 0 14px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font: 600 17px var(--cond); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.team-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.team-tabs small { opacity: .7; font-size: inherit; }
.teams-picker .search { flex: none; }
.team-hint { margin: 0; min-height: 22px; font-size: 14px; color: var(--muted); }
.teams-picker .chip { height: 32px; padding: 0 10px; gap: 6px; font-size: 13px; }
.teams-picker .chip .glyph { width: 16px; height: 16px; }
.pick-scroll { max-height: 70vh; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.pick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pick { position: relative; display: flex; flex-direction: column; padding: 0; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  text-align: left; cursor: pointer; }
.pick:hover { border-color: #5A5D6B; }
.pick.is-in { border-color: var(--accent); }
.pick.is-dim { opacity: .55; }
.pick-art { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--tint); }
.pick-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc); }
.pick-art img, .pick-art .ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick-in { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(13,14,18,.6);
  font: 700 13px var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.pick-name { padding: 6px 8px 0; font: 700 14px/1.15 var(--cond); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-sub { padding: 0 8px 8px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .teams-picker { position: static; } }
@media (max-width: 640px) { .pick-grid { gap: 6px; } .pick-name { padding: 4px 5px 0; font-size: 12px; } .pick-sub { padding: 0 5px 5px; font-size: 10px; } }
@media (max-width: 640px) {
  .team-name { font-size: 36px; }
  .tslot { padding: 0 2px; }
  .tslot-name { font-size: 12px; padding: 4px 4px 0; }
  .tslot-meta { display: none; }
  .tslot-x { width: 20px; height: 20px; top: 3px; right: 5px; font-size: 13px; }
  .tslot-star { width: 20px; height: 20px; top: 3px; left: 5px; font-size: 12px; }
  .tslot-star b { right: -4px; bottom: -4px; min-width: 11px; height: 11px; font-size: 8px; }
  .tslot .tslot-k { width: 20px; height: 20px; right: 3px; bottom: 5px; }
  .tslot-empty { font-size: 11px; gap: 2px; }
  .tslot-empty svg, .tslot-pet svg { width: 24px; height: 24px; }
  .syn-row { grid-template-columns: minmax(0, 1fr); }
}
