/* Locker Loadout v2 (Clement, 2026-12-04): the ten-slot kit on the MY LOADOUT page, and the colour slot's
 * finish in the game. Model: locker-loadout.js. Page: locker-room.js. */

/* ------------------------------------------------------------------ the colour slot in the game ---- */
/* The finish is a brightness / contrast / saturation filter, never a hue change (locker-loadout.js). On the
 * board locker-loadout.js puts it on the player's own figure art only (inline, so the walk / capture / home
 * clones of a figure keep it); the owner base, the selection ring, the colourblind crest and every other seat
 * are never touched. Off the board it is this one variable on your own piece. Original is "none". Static: no
 * animation, nothing for MM-14 to see move. */
/* Your piece off the board: the Home hero, the Locker stage and the kit's piece tile. */
#screen-lobby .home-hero .home-party .home-hero-piece > img,
#screen-locker .locker-stage-piece,
#screen-locker .locker-piece-lead-tile .locker-piece-tile-art {
  filter: var(--piece-colour-filter, none);
}

/* ------------------------------------------------------------------ the kit ---- */
#screen-locker.locker-room .locker-kit { --kit-gap: 12px; }
#screen-locker.locker-room .locker-kit-body {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}
#screen-locker.locker-room .locker-kit-piece .locker-piece-section { margin: 0; }
#screen-locker.locker-room .locker-kit-piece .locker-piece-lead { flex-direction: column; align-items: stretch; gap: 10px; }
#screen-locker.locker-room .locker-kit-piece .locker-piece-lead-tile { width: 100%; }
#screen-locker.locker-room .locker-kit-piece .locker-piece-change { align-self: flex-start; }
#screen-locker.locker-room .locker-kit-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--kit-gap);
  padding-top: 31px; /* level with the piece tile under its "Piece" heading */
}
#screen-locker.locker-room .locker-loadout-tile.locker-kit-slot,
#screen-locker.locker-room .locker-loadout-tile.locker-kit-option {
  width: auto;
  height: auto;
  aspect-ratio: 1 / 1;
}
#screen-locker.locker-room .locker-kit-slot .locker-kit-art,
#screen-locker.locker-room .locker-kit-option .locker-kit-art { inset: 22px 8px 30px; }
#screen-locker.locker-room .locker-kit-label {
  position: absolute;
  top: 7px;
  left: 9px;
  right: 9px;
  overflow: hidden;
  color: #e9f4ff;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#screen-locker.locker-room .locker-kit-item-name {
  position: absolute;
  right: 8px;
  bottom: 13px;
  left: 9px;
  overflow: hidden;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#screen-locker.locker-room .locker-kit-glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 2.1rem;
  line-height: 1;
}
/* The colour swatches: your own piece, head and shoulders, in that finish. */
#screen-locker.locker-room .locker-kit-swatch {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(170deg, #3a4fb5, #14123c 85%);
}
#screen-locker.locker-room .locker-kit-swatch > img { position: absolute; max-width: none; pointer-events: none; }
#screen-locker.locker-room .locker-kit-swatch > img[data-room-portrait="hires"] { top: -2%; left: -42%; width: 184%; height: auto; }
#screen-locker.locker-room .locker-kit-swatch > img[data-room-portrait="strip"] { top: -30%; left: -95%; width: 290%; height: auto; }
#screen-locker.locker-room .locker-kit-swatch > img[data-room-portrait="sprite"] { inset: 8%; width: 84%; height: 84%; object-fit: contain; }

/* Save Loadout / View All Loadouts. */
#screen-locker.locker-room .locker-kit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 18px;
}
#screen-locker.locker-room .locker-kit-name { display: flex; flex: 1 1 180px; flex-direction: column; gap: 4px; min-width: 0; }
#screen-locker.locker-room .locker-kit-name span { color: #cfe3ff; font-size: .62rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
#screen-locker.locker-room .locker-kit-name input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 10px;
  background: rgba(8, 12, 48, .55);
  color: #fff;
  font: inherit;
  font-size: 16px; /* no zoom-on-focus on phones */
}
#screen-locker.locker-room .locker-kit-name input::placeholder { color: rgba(255, 255, 255, .5); }
#screen-locker.locker-room .locker-kit-save,
#screen-locker.locker-room .locker-kit-all {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font: inherit;
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
#screen-locker.locker-room .locker-kit-save { border: 0; background: #f3ff20; color: #11132f; }
#screen-locker.locker-room .locker-kit-save[disabled] { opacity: .5; cursor: default; }
#screen-locker.locker-room .locker-kit-all { border: 1px solid rgba(255, 255, 255, .35); background: rgba(8, 12, 48, .35); color: #fff; }
#screen-locker.locker-room .locker-kit-all-count {
  display: inline-block;
  min-width: 1.5em;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  text-align: center;
}

/* Quick-select: one tap wears a saved loadout. */
#screen-locker.locker-room .locker-kit-quick { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
#screen-locker.locker-room .locker-kit-quick::-webkit-scrollbar { display: none; }
#screen-locker.locker-room .locker-kit-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(8, 12, 48, .35);
  color: #fff;
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}
#screen-locker.locker-room .locker-kit-chip[disabled],
#screen-locker.locker-room .locker-kit-saved-wear[disabled] { opacity: .55; cursor: progress; }
#screen-locker.locker-room .locker-kit-chip.is-on { border-color: #f3ff20; background: #f3ff20; color: #11132f; }

/* One slot open, and View All Loadouts. */
#screen-locker.locker-room .locker-kit-picker-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
#screen-locker.locker-room .locker-kit-picker-head h3.locker-loadout-heading { margin: 0; }
#screen-locker.locker-room .locker-kit-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
#screen-locker.locker-room .locker-kit-option.is-on { box-shadow: 0 0 0 3px #d6f1ff, 0 0 0 6px rgba(120, 200, 255, .55); }
#screen-locker.locker-room .locker-kit-on {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f3ff20;
  color: #151724;
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .04em;
}
/* Locker free defaults: the slot's free default carries a quiet mark (free forever, never sold). */
#screen-locker.locker-room .locker-kit-default {
  position: absolute;
  top: 30px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(214, 241, 255, .16);
  border: 1px solid rgba(214, 241, 255, .5);
  color: #d6f1ff;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .04em;
}
#screen-locker.locker-room .locker-kit-note { margin: 12px 0 0; color: #cfe3ff; font-size: .8rem; }
#screen-locker.locker-room .locker-kit-saved-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
#screen-locker.locker-room .locker-kit-saved-row { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
#screen-locker.locker-room .locker-kit-saved-wear {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 60px;
  padding: 8px 90px 8px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  background: rgba(176, 210, 255, .2);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
#screen-locker.locker-room .locker-kit-saved-wear b { overflow: hidden; font-size: .95rem; white-space: nowrap; text-overflow: ellipsis; }
#screen-locker.locker-room .locker-kit-saved-wear small { overflow: hidden; color: #cfe3ff; font-size: .7rem; white-space: nowrap; text-overflow: ellipsis; }
#screen-locker.locker-room .locker-kit-saved-state {
  position: absolute;
  top: 50%;
  right: 12px;
  translate: 0 -50%;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .05em;
}
#screen-locker.locker-room .locker-kit-saved-row.is-on .locker-kit-saved-wear { border-color: #f3ff20; }
#screen-locker.locker-room .locker-kit-saved-row.is-on .locker-kit-saved-state { background: #f3ff20; color: #11132f; }
#screen-locker.locker-room .locker-kit-saved-delete {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}
#screen-locker.locker-room .locker-kit-saved-delete.is-armed { border-color: #ff6b6b; background: #ff6b6b; color: #1a0b0b; }
#screen-locker.locker-room h3.locker-kit-more-title {
  margin: 8px 0 14px;
  color: #cfe3ff;
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  #screen-locker.locker-room .locker-kit-body { grid-template-columns: 1fr; gap: 12px; }
  #screen-locker.locker-room .locker-kit-piece .locker-piece-lead { flex-direction: row; align-items: flex-end; }
  #screen-locker.locker-room .locker-kit-piece .locker-piece-lead-tile { width: 132px; }
  #screen-locker.locker-room .locker-kit-slots { padding-top: 0; gap: 8px; }
  #screen-locker.locker-room .locker-kit-slot .locker-kit-art { inset: 20px 6px 28px; }
  #screen-locker.locker-room .locker-kit-label { left: 7px; right: 5px; font-size: .56rem; letter-spacing: .02em; }
  #screen-locker.locker-room .locker-kit-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #screen-locker.locker-room .locker-kit-save,
  #screen-locker.locker-room .locker-kit-all { flex: 1 1 40%; }
}
