/* ---------- עמוד נבחרת השבוע (מחשב ושלט). הלוגיקה ב-js/totw.js ---------- */
/* הכותרת, החלון והרמזים משתמשים בעיצוב של השוק (mk-top, mk-dlg-deal, mk-foot ב-css/market.css) */

#totw {
  --mk-panel: linear-gradient(180deg, rgba(48, 60, 80, .78), rgba(32, 41, 58, .82));
  --mk-line: rgba(255, 255, 255, .1);
  --mk-teal: #5fd3c4;
  display: block;
  direction: ltr;
  font-family: var(--fc-font, "Segoe UI", Arial, sans-serif);
  color: #fff;
}
#totw::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 30% 50%, rgba(60, 120, 230, .25), transparent 70%),
    linear-gradient(180deg, rgba(6, 12, 26, .74), rgba(4, 8, 18, .88));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
body[data-screen="totw"] #hints { display: none; }
#tw-modal .mk-dlg { --mk-line: rgba(255, 255, 255, .1); }

.tw-round { font-size: clamp(13px, 2.3vh, 26px); color: rgba(225, 232, 242, .78); direction: rtl; }

.tw-body {
  position: absolute;
  left: 4vw; right: 4vw;
  top: 12.5vh; bottom: 9.5vh;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 31vw);
  gap: 2vw;
}

/* ---------- המגרש ---------- */
.tw-field { display: flex; align-items: center; justify-content: center; min-height: 0; }
.tw-pitch {
  --cw: min(9.6vh, 6.6vw);
  position: relative;
  height: 100%;
  aspect-ratio: .95;
  max-width: 100%;
}
.tw-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tw-p {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--cw);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  translate: -50% -55%;
  scale: var(--s);
  transition: transform .25s var(--ease-out), filter .25s;
}
#totw.active .tw-p { animation: tw-pop .7s cubic-bezier(.2, 1.2, .4, 1) calc(.2s + var(--i) * 55ms) backwards; }
@keyframes tw-pop { from { opacity: 0; transform: translateY(3vh) scale(.6); } }
.tw-card .card { width: 100%; }
body.input-mouse .tw-p:hover, .tw-p.nav-focus { transform: translateY(-1vh) scale(1.12); outline: none; z-index: 200 !important; filter: drop-shadow(0 0 1.6vh rgba(120, 200, 255, .55)); }

/* ציון המחזור (ירוק), שחקן המחזור בכחול עם כוכב */
.tw-score {
  display: inline-flex;
  align-items: center;
  gap: .2em;
  padding: .25em .55em;
  border-radius: 99px;
  font: 800 clamp(10px, 1.7vh, 18px) var(--fc-font, sans-serif);
  color: #fff;
  background: #1fb35a;
  box-shadow: 0 .3vh .8vh rgba(0, 0, 0, .35);
}
.tw-score.potw { background: #1d7fe0; }
.tw-score.potw::after { content: "★"; font-size: .9em; }
.tw-p .tw-score { position: absolute; top: -1vh; right: -1.2vh; z-index: 2; }

/* ---------- הרשימה בצד ---------- */
.tw-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 2.6vh 1.6vw 2vh;
  border-radius: 1.3vh;
  background: var(--mk-panel);
  box-shadow: inset 0 0 0 1px var(--mk-line), 0 2vh 5vh rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  direction: rtl;
}
.tw-head h2 { margin: 0; font-size: clamp(17px, 3.4vh, 36px); font-weight: 800; }
.tw-head p { margin: 1vh 0 0; font-size: clamp(11px, 1.9vh, 20px); line-height: 1.45; color: rgba(220, 228, 240, .72); }
.tw-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .7vh; margin-top: 2vh; padding: 0 .3vw; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.tw-row {
  display: grid;
  grid-template-columns: 6.4vh minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .9vw;
  padding: .9vh .9vw;
  border: 0;
  border-radius: .8vh;
  color: #fff;
  font: 600 clamp(12px, 2vh, 21px) var(--fc-font, sans-serif);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  text-align: right;
}
.tw-row .tw-score { justify-self: start; }
.tw-row.potw { background: rgba(29, 127, 224, .2); box-shadow: inset 0 0 0 1px rgba(110, 180, 255, .45); }
body.input-mouse .tw-row:hover, .tw-row.nav-focus { background: rgba(255, 255, 255, .16); outline: none; box-shadow: inset 0 0 0 .25vh rgba(170, 245, 240, .8); }
.tw-rname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.tw-rcrest { height: 3.2vh; width: 3.2vh; object-fit: contain; }
.tw-up { display: inline-flex; align-items: baseline; gap: .4vw; font-weight: 700; }
.tw-up i { font-style: normal; color: rgba(225, 232, 242, .6); }
.tw-up b { color: rgba(225, 232, 242, .5); font-weight: 400; }
.tw-up strong { color: #86c8ff; font-size: 1.1em; }
.tw-up em { font-style: normal; color: #8be04e; font-size: .85em; }

.tw-inline { display: inline-flex; align-items: center; gap: .5vw; }
.tw-ico { height: 3vh; width: 3vh; object-fit: contain; }

/* כפתור "לנבחרת המלאה" בשקופית החדשות */
.ns-cta {
  display: inline-flex;
  align-items: center;
  gap: .9vw;
  margin-top: 2.6vh;
  height: 5.6vh;
  padding: 0 1.8vw 0 1.1vw;
  border: 0;
  border-radius: .7vh;
  cursor: pointer;
  font: 800 clamp(13px, 2.3vh, 26px) var(--fc-font, sans-serif);
  color: #0d0f14;
  background: #fff;
  direction: rtl;
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.ns-slide.on .ns-cta { animation: ns-rise .7s var(--ease-out) .8s backwards; }
body.input-mouse .ns-cta:hover, .ns-cta.nav-focus { transform: translateY(-.35vh); box-shadow: 0 1.2vh 2.6vh rgba(0, 0, 0, .45); }
.ns-cta.nav-focus { outline: .35vh solid var(--fc-green, #8be04e); outline-offset: .45vh; }
.ns-cta-x { position: relative; width: 3.2vh; height: 3.2vh; border-radius: 50%; background: #0d0f14; }
.ns-cta-x::before, .ns-cta-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 52%; height: .38vh; background: #fff; border-radius: 1px; }
.ns-cta-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.ns-cta-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.ns-click { cursor: pointer; }
