/* ---------- SBC ---------- */
/* המגרש, המשבצות, בחירת השחקן והאריחים לקוחים מ-myteam.css ו-gallery.css (אותם class-ים). כאן רק מה שייחודי ל-SBC */
#sbc {
  justify-content: flex-start;
  align-items: stretch;
  gap: 1.6vh;
  padding: 3vh 2.5vw 2.5vh;
}
#sbc.entering { animation: home-in .8s var(--ease-out) both; }
#sbc.active .gal-top > * { animation: gal-drop .7s var(--ease-out) backwards; }
#sbc.active .gal-top > :nth-child(2) { animation-delay: .1s; }
#sbc.active .gal-top > :nth-child(3) { animation-delay: .2s; }

.sbc-note { --u: max(1.4px, .28vh); flex: none; display: flex; justify-content: center; text-align: center; }
.sbc-note[hidden] { display: none; }

/* ---------- רשימת האתגרים: אריח (כמו אריח אוסף בגלריה) עם קלף הפרס ---------- */
#sbc.active .col-tile { animation: tile-in .7s cubic-bezier(.34, 1.56, .64, 1) calc(.25s + min(var(--i, 0) * .07s, .6s)) backwards; }
.sbc-prize { flex: 1 1 0; min-height: 0; width: 100%; display: flex; justify-content: center; }
.sbc-prize-card {
  height: 100%;
  aspect-ratio: 728 / 999;
  filter: drop-shadow(0 1vh 1.2vh rgba(0, 0, 0, .5));
  transition: transform .5s var(--ease-out);
}
body.input-mouse .sbc-tile:hover .sbc-prize-card,
.sbc-tile.nav-focus .sbc-prize-card { transform: translateY(-3%) scale(1.05); }
.sbc-tile:disabled { pointer-events: none; }
.sbc-reqs { --u: max(1.3px, .26vh); display: flex; flex-direction: column; align-items: center; gap: .7vh; }

/* ---------- שחקן החודש: אריח קבוצה עם מסגרת בצבעי הלוגו של ליגת העל (אדום, כתום, צהוב, ירוק, כחול) ---------- */
.sbc-tile.sbc-potm {
  background: linear-gradient(170deg, rgba(30, 60, 150, .65), rgba(6, 12, 34, .92) 62%);
  box-shadow: inset 0 0 0 4px #0b1636, inset 0 -1.2vh 0 rgba(0, 0, 0, .25);
}
.sbc-tile.sbc-potm::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 4px;
  background: linear-gradient(135deg, #e01b23, #ea661a 25%, #f7de14 50%, #0e803a 75%, #1e50a8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
body.input-mouse .sbc-tile.sbc-potm:hover,
.sbc-tile.sbc-potm.nav-focus { background: linear-gradient(170deg, rgba(60, 100, 220, .7), rgba(8, 16, 44, .92) 62%); box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .85), inset 0 -1.2vh 0 rgba(0, 0, 0, .2); }
.sbc-reward-tile { cursor: default; }
.sbc-reward-tile .sbc-prize-card { filter: drop-shadow(0 0 1.6vh rgba(247, 222, 20, .35)) drop-shadow(0 1vh 1.2vh rgba(0, 0, 0, .5)); }

/* סקוואד בתוך קבוצה: צללית קלף עם הדירוג הנדרש */
.sbc-part-badge { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vh; }
.sbc-part-bg { position: absolute; inset: 0; width: 100%; height: 100%; filter: grayscale(.6) brightness(.38); opacity: .9; }
.sbc-part-num { position: relative; font-size: clamp(22px, 6vh, 64px); font-weight: 800; color: #ffd54a; text-shadow: 0 .5vh 0 #0a1e4a; }
.sbc-part-step { --u: max(1.4px, .28vh); position: relative; display: flex; }
.sbc-part.claimed .sbc-part-num { color: #8ff0a8; }

/* ---------- בניית הרכב ---------- */
.sbc-build { display: flex; gap: 1.6vw; }
.sbc-build:not([hidden]) .sbc-side { animation: sbc-side-in .6s var(--ease-out) .1s backwards; }
@keyframes sbc-side-in { from { opacity: 0; transform: translateX(5vw); } }

.sbc-side {
  flex: none;
  width: min(25vw, 50vh);
  display: flex;
  flex-direction: column;
  gap: 1.6vh;
  padding: 2vh 1.3vw;
  background: linear-gradient(170deg, rgba(22, 48, 104, .7), rgba(5, 12, 27, .95) 62%);
  box-shadow: inset 0 0 0 4px #1c4fa8, inset 0 0 0 7px rgba(120, 180, 255, .14);
  clip-path: var(--notch);
}
.sbc-side-head { --u: max(1.9px, .38vh); display: flex; }

.sbc-reqs-list { display: flex; flex-direction: column; gap: 1vh; }
.sbc-req {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .8vw;
  padding: 1.1vh .9vw;
  background: rgba(6, 16, 31, .6);
  box-shadow: inset 0 0 0 2px rgba(60, 110, 200, .5);
  transition: background .3s, box-shadow .3s;
}
.sbc-req.ok { background: rgba(20, 70, 40, .45); box-shadow: inset 0 0 0 2px #2f9e44; }
.sbc-req-label { --u: max(1.4px, .28vh); display: flex; }
.sbc-req-val { display: flex; align-items: baseline; gap: .5vw; direction: ltr; }
.sbc-now { font-size: clamp(11px, 2vh, 20px); color: #ff8a78; }
.sbc-req.ok .sbc-now { color: #8ff0a8; }
.sbc-need { font-size: clamp(8px, 1.4vh, 14px); opacity: .75; }
.sbc-tick {
  position: relative;
  width: 2.6vh;
  height: 2.6vh;
  flex: none;
  border-radius: 50%;
  background: #3a2230;
  box-shadow: inset 0 0 0 .3vh #ff6a55;
  transition: background .3s, box-shadow .3s;
}
.sbc-tick::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: .7vh;
  height: 1.3vh;
  border: solid #fff;
  border-width: 0 .35vh .35vh 0;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0;
}
.sbc-req.ok .sbc-tick { background: #2f9e44; box-shadow: inset 0 0 0 .3vh #aef0bb; }
.sbc-req.ok .sbc-tick::after { opacity: 1; animation: sbc-tick-pop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes sbc-tick-pop { from { transform: translate(-50%, -50%) rotate(45deg) scale(0); } }

.sbc-side-prize { --u: max(1.4px, .28vh); flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.sbc-side-card { flex: 1 1 0; min-height: 0; max-height: 30vh; aspect-ratio: 728 / 999; filter: drop-shadow(0 .8vh 1vh rgba(0, 0, 0, .5)); }

.sbc-actions { display: flex; flex-direction: column; gap: 1.2vh; }
.sbc-btn { width: 100%; display: flex; justify-content: center; }
.btn-buy.sbc-btn { cursor: not-allowed; }
.pk-btn:disabled { opacity: .4; cursor: not-allowed; }
.pk-btn:disabled .px { opacity: .8; }

.sbc-field { width: auto; min-width: 0; --cw: min(8.6vh, 6.2vw); }

/* ---------- בחירת שחקן: קלף שכבר בשימוש, ותווית אזהרה ---------- */
.pk-card:disabled { cursor: not-allowed; }
.pk-card:disabled .card { filter: grayscale(.85) brightness(.5); }
.pk-tag.warn { background: #a8321c; box-shadow: inset 0 0 0 2px #ff9a86; }

/* ---------- אישור הגשה ---------- */
.cf-panel {
  position: relative;
  width: min(44vw, 86vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2vh;
  padding: 3vh 2.2vw 2.6vh;
  text-align: center;
  background: linear-gradient(170deg, rgba(22, 48, 104, .72), rgba(5, 12, 27, .96) 62%);
  box-shadow: inset 0 0 0 4px #1c4fa8, inset 0 0 0 7px rgba(120, 180, 255, .14), 0 2vh 6vh rgba(0, 0, 0, .55);
  clip-path: var(--notch);
}
.modal.open .cf-panel { animation: gal-drop .5s var(--ease-out) backwards; }
.cf-title { --u: max(2.1px, .42vh); display: flex; }
.cf-lines { display: flex; flex-direction: column; align-items: center; gap: 1.2vh; }
.cf-line { --u: max(1.6px, .32vh); display: flex; }
.cf-warn { --u: max(1.4px, .28vh); display: flex; padding: .6vh 1vw; background: rgba(168, 50, 28, .35); box-shadow: inset 0 0 0 2px #a8321c; }
.cf-prize { --u: max(1.4px, .28vh); display: flex; align-items: center; gap: 1vw; direction: rtl; }
.cf-prize-name { font-size: clamp(10px, 1.8vh, 18px); color: #ffd54a; }
.cf-prize-px { --u: max(1.5px, .3vh); display: flex; }
.cf-btns { display: flex; gap: 1.4vw; width: 100%; margin-top: .6vh; }
.cf-btns .sbc-btn { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  #sbc.active .col-tile, .sbc-build:not([hidden]) .sbc-side, .sbc-req.ok .sbc-tick::after, .modal.open .cf-panel { animation: none !important; }
}
