/* Pitch Rivals match: the 2 Nov 2026 match update (built and tested in labs/rivals-live, shipped 3 Nov 2026). The emote
   button on your crest, the line-up panel (formations and sides), card uses, the KEEPER! button, trick tags, shot receipts
   and big-moment banners. Board pixels where it says so (the match board is scaled to the phone). */
/* the emote button is your crest on the scoreboard (pitchlive.js wireCrest): a speech bubble on its corner says so; the
   game's own button stays hidden. The tray opens under the scoreboard */
#clEmo { display: none !important; }
body.lab-emo #clBoard .mb6-crest.me { pointer-events: auto; cursor: pointer; }
body.lab-emo #clBoard .mb6-crest.me::after { content: ""; position: absolute; right: -14px; bottom: -10px; width: 34px; height: 34px; border-radius: 50%; background: #20c997 url("assets/pro/ic_emote.webp") center / 30px no-repeat; border: 3px solid #06101f; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); pointer-events: none; }
#clEmos { pointer-events: auto; position: absolute; left: 24px; right: auto; top: 186px; z-index: 60; display: grid; grid-template-columns: repeat(4, 140px); gap: 12px; width: auto; height: auto; padding: 18px; background: rgba(6, 16, 31, 0.94); border: 3px solid #2a4570; border-radius: 26px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }
#clEmos[hidden] { display: none; }
#clEmos .mb6-emb { width: 140px; height: 140px; padding: 0; border: 0; border-radius: 20px; background: rgba(255, 255, 255, 0.04); cursor: pointer; }
#clEmos .mb6-emb img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
#clEmos .mb6-emb.mute { grid-column: 1 / -1; width: auto; height: 90px; display: flex; align-items: center; justify-content: center; gap: 14px; color: #e8f1ff; font: 800 38px "Barlow Condensed", "Arial Narrow", sans-serif; }
#clEmos .mb6-emb.mute img { width: 60px; height: 60px; }
/* Card uses: the count on a rail card (board pixels): ×3 gold, ×1 or ×0 red, ∞ for a basic card */
.mb6-tile .lab-uses { position: absolute; right: 6px; top: 6px; z-index: 6; min-width: 44px; padding: 3px 8px; border-radius: 14px; background: rgba(6, 16, 31, 0.92); border: 2px solid #ffd21f; color: #ffd21f; font: 900 italic 26px/1 "Barlow Condensed", "Arial Narrow", sans-serif; text-align: center; pointer-events: none; }
.mb6-tile .lab-uses.low { border-color: #ff5a5a; color: #ff8a80; }
.mb6-tile .lab-uses.inf { border-color: #7dff9e; color: #7dff9e; font-style: normal; }
/* the line-up panel: opened by tapping the minimap, laid over the card dock (cards, bench, energy) so the pitch stays in view */
#labForm { position: fixed; z-index: 70; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; padding: 5px 8px 6px; overflow: auto; background: rgba(5, 12, 26, 0.97); border-top: 2px solid #ffd21f; border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5); font: 800 12px/1 "Barlow Condensed", "Arial Narrow", sans-serif; color: #e8f1ff; letter-spacing: 0.04em; }
#labForm[hidden] { display: none; }
#labForm .lf-head { display: flex; align-items: center; gap: 8px; }
#labForm .lf-head b { color: #ffd21f; font-size: 15px; white-space: nowrap; }
#labForm .lf-head span { flex: 1 1 auto; color: #9fb3d6; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#labForm .lf-x { min-width: 40px; min-height: 28px; border: 1px solid #335; border-radius: 8px; background: #0f1b31; color: #e8f1ff; font: inherit; font-size: 15px; cursor: pointer; }
#labForm .lf-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
#labForm .lf-pick button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 40px; padding: 2px; border: 1px solid #335; border-radius: 8px; background: #0f1b31; color: inherit; font: inherit; font-size: 11px; cursor: pointer; }
#labForm .lf-pick button.on { border-color: #ffd21f; color: #ffd21f; }
#labForm .lf-side { position: relative; }
#labForm .lf-side > b { display: block; font-size: 11px; color: #ffd21f; }
#labForm .lf-reset { position: absolute; right: 0; top: -4px; min-height: 26px; padding: 0 10px; border: 1px solid #335; border-radius: 6px; background: #0f1b31; color: #e8f1ff; font: inherit; cursor: pointer; }
#labForm .lf-pick svg { width: 20px; height: 22px; }
#labForm .lf-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
#labForm .lf-col { display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 4px; min-height: 58px; padding: 3px 2px; border: 1px dashed #3a4f73; border-radius: 6px; }
#labForm .lf-col i { flex: 0 0 100%; font-style: normal; font-size: 10px; color: #8fa3c6; text-align: center; }
#labForm .lf-man { position: relative; z-index: 2; width: 52px; min-height: 40px; padding: 2px; border: 1px solid #39d98a; border-radius: 6px; background: #0f2a1e; color: #e8f1ff; font: inherit; cursor: grab; touch-action: none; }
#labForm .lf-man.set { border-color: #ffd21f; }
#labForm .lf-man small { display: block; margin-top: 1px; color: #b9c8e6; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#labForm .lf-none { display: block; margin-top: 4px; color: #8fa3c6; }
/* the shot receipt (a toggle): one line over the field after a shot */
.lab-receipt { position: absolute; left: 50%; bottom: 8%; z-index: 30; transform: translateX(-50%); max-width: 92%; padding: 6px 12px; border-radius: 8px; background: rgba(5, 10, 22, 0.86); border: 1px solid #2a6bff; color: #e8f1ff;
  font: 800 13px/1.25 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: 0.03em; text-align: center; pointer-events: none; animation: labrc 3.6s ease forwards; }
.lab-receipt b { color: #ffd21f; }
.lab-receipt.goal { border-color: #7dff9e; }
.lab-receipt.miss { border-color: #ff8a80; }
.lab-receipt.call { bottom: auto; top: 6%; border-color: #ff8a80; background: rgba(60, 10, 14, 0.88); animation-duration: 1.5s; }
.lab-receipt.call.man { border-color: #ffb4a8; }
@keyframes labrc { 0% { opacity: 0; transform: translate(-50%, 10px); } 8% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }
/* the big-moment banner (a toggle): a slash of colour across the field for a goal or a save */
.lab-banner { position: absolute; left: 0; right: 0; top: 38%; z-index: 31; padding: 8px 0; text-align: center; color: #fff; font: 900 italic 30px/1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: 0.06em; text-shadow: 0 2px 0 #000, 0 0 18px rgba(0, 0, 0, 0.6);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(20, 60, 140, 0.85) 18%, rgba(20, 60, 140, 0.85) 82%, rgba(0, 0, 0, 0) 100%); pointer-events: none; animation: labbn 1.5s ease forwards; }
.lab-banner small { display: block; margin-top: 4px; font: 700 14px/1 "Barlow Condensed", sans-serif; letter-spacing: 0.08em; color: #ffe08a; }
.lab-banner.goal { background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(10, 120, 60, 0.9) 18%, rgba(10, 120, 60, 0.9) 82%, rgba(0, 0, 0, 0) 100%); }
/* Keeper claims it: the KEEPER! button, bottom middle of the pitch over your goal */
.lab-gk { position: absolute; left: 50%; bottom: 14%; z-index: 32; transform: translateX(-50%); min-width: 150px; min-height: 52px; padding: 6px 16px; border: 3px solid #fff; border-radius: 16px; background: linear-gradient(180deg, #2fd0ff, #1a7bd8); color: #fff; font: 900 italic 22px/1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: 0.05em; text-shadow: 0 2px 0 #06314f; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); cursor: pointer; touch-action: none; animation: labgk 0.9s ease-in-out infinite; }
.lab-gk small { display: block; margin-top: 2px; font: 700 12px/1 "Barlow Condensed", sans-serif; font-style: normal; letter-spacing: 0.06em; }
.lab-gk[hidden] { display: none; }
@keyframes labgk { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.06); } }
/* Trick slow-mo: a small tag beside the man who did it (lab-trick: clash.js labSlowMo places it above or below him) */
.lab-trick { position: absolute; z-index: 31; transform: translateX(-50%); padding: 5px 12px 6px; border-radius: 12px; background: rgba(90, 20, 130, 0.88); border: 2px solid #e2b8ff; color: #fff; font: 900 italic 18px/1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: 0.05em; text-align: center; white-space: nowrap; text-shadow: 0 2px 0 #000; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); pointer-events: none; animation: labtk 1.4s ease forwards; }
.lab-trick small { display: block; margin-top: 2px; font: 700 11px/1 "Barlow Condensed", sans-serif; font-style: normal; letter-spacing: 0.08em; color: #ffe08a; text-shadow: none; }
.lab-trick.them { background: rgba(130, 25, 50, 0.88); border-color: #ffb4a8; }
@keyframes labtk { 0% { opacity: 0; transform: translate(-50%, 6px) scale(0.85); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.lab-banner.save { background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(150, 40, 40, 0.9) 18%, rgba(150, 40, 40, 0.9) 82%, rgba(0, 0, 0, 0) 100%); }
@keyframes labbn { 0% { opacity: 0; transform: scaleX(0.2); } 12% { opacity: 1; transform: scaleX(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
