/* arena-joker.css · 8.11.2026
   ג'וקר (רעיון של ישראל פלד): עותק שיצא באקראי עם משיכה מתוכננת, פעם בקרב.
   התג על הקלף, הכפתור ליד האנרגיה, וחלון בחירת המשפחה. */

/* התג על הקלף: עיגול קטן עם אייקון בלבד, בפינה העליונה מתחת לעיגול העלות (בקשת דניאל: לא להסתיר את הציור והשם) */
.fc__joker { position: absolute; z-index: 3; top: 18px; right: 3px; left: auto; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 30%, #ff8fd0, #b44bff 60%, #6a1fc0); border: 2px solid var(--ink); box-shadow: 1px 2px 0 var(--ink), 0 0 8px rgba(255, 79, 163, .55); font-style: normal; pointer-events: none; }
.fc__joker { font: 900 .8rem/1 var(--f-brand); letter-spacing: 0; text-shadow: 1px 1px 0 var(--ink); padding-top: 1px; }
.fc--hand .fc__joker { top: 16px; right: 2px; width: 21px; height: 21px; font-size: .72rem; }
.fc--big .fc__joker { top: 30px; right: 6px; width: 32px; height: 32px; font-size: 1.1rem; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.reduce-motion) .fc__joker { animation: joker-glint 3.2s ease-in-out infinite; }
}
@keyframes joker-glint { 0%, 80%, 100% { filter: none; } 88% { filter: brightness(1.35) saturate(1.2); } }

/* הכפתור בקרב: מופיע רק כשיש ג'וקר ביד ועוד לא השתמשת */
.res-row:has(.plan:not([hidden])) { grid-template-columns: auto auto 1fr !important; }
.plan { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; justify-items: center; align-content: center; gap: 0; min-width: 58px; min-height: 52px; padding: 6px 8px; border-radius: 14px; color: #fff; background: linear-gradient(160deg, #8a3cff, #ff4fa3); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink), 0 0 16px rgba(255, 79, 163, .45); transition: transform .16s cubic-bezier(.16, 1, .3, 1), filter .16s; }
.plan[hidden] { display: none; }
.plan svg, .plan .ic { width: 20px; height: 20px; }
.plan b { font: 900 .78rem/1.1 var(--f-brand); }
.plan small { position: absolute; top: -8px; inset-inline-end: -6px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--gold, #f5c842); color: var(--ink); border: 2px solid var(--ink); font: 900 .7rem/1 var(--f-brand); }
.plan:hover { transform: translateY(-2px); }
.plan:active { transform: scale(.97); }
.plan:focus-visible { outline: 3px solid var(--gold, #f5c842); outline-offset: 3px; }
.plan.is-off { filter: grayscale(.7) brightness(.75); }

/* חלון בחירת המשפחה: שולחן קלפים קטיפתי (רקע מ-Flow), סמל הג'וקר (Flow), והמשפחות כקלפי משחק שמחולקים על השולחן */
.adlg--plan .adlg__box { width: min(520px, 100%) !important; padding: 18px 16px 18px !important; color: #f4ecff !important;
  background: #1a0f2e url(../assets/arena/joker/table.webp?v=1) center / cover no-repeat !important; border: 4px solid #0a0b22 !important; border-image: none !important;
  box-shadow: 0 0 0 3px #d4a83a, 8px 10px 0 #0a0b22, 0 30px 60px rgba(0, 0, 0, .6) !important; }
.adlg--plan .adlg__grip { background: rgba(255, 255, 255, .35); }
.plandlg { position: relative; text-align: center; }
.plandlg__emb { display: block; width: 92px; height: 92px; object-fit: contain; margin: -8px auto -12px; filter: drop-shadow(0 6px 14px rgba(255, 79, 163, .45)); }
.plandlg .kick { margin: 0; font: 900 .8rem/1 var(--f-brand); letter-spacing: .08em; color: #ff8fd0; }
.plandlg h2 { margin: 2px 0 0; font: 900 1.7rem/1.05 var(--f-brand); color: #ffd36b; -webkit-text-stroke: .06em #0a0b22; paint-order: stroke fill; text-shadow: .05em .07em 0 #0a0b22; }
.plandlg__lead { margin: 6px auto 14px; max-width: 34ch; color: #e6dcff; line-height: 1.45; font-size: .92rem; }
.plandlg__fams { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 7px; padding: 2px 2px 6px; }
/* קלף משחק: פנים לבנות-שמנת, פינות עם סמל המשפחה, אייקון גדול באמצע */
.plandlg__f { all: unset; box-sizing: border-box; position: relative; cursor: pointer; display: grid; justify-items: center; align-content: center; gap: 3px; aspect-ratio: 4 / 5; padding: 14px 4px 12px; border-radius: 9px;
  background: radial-gradient(120% 90% at 50% 40%, #fffaf0 55%, color-mix(in srgb, var(--fam) 22%, #f3e6cf)); color: #0a0b22;
  border: 2.5px solid #0a0b22; box-shadow: 0 0 0 2px color-mix(in srgb, var(--fam) 75%, #fff) inset, 3px 4px 0 #0a0b22;
  transform: rotate(calc((var(--k) - 6) * .6deg)); transition: transform .16s cubic-bezier(.16, 1, .3, 1), box-shadow .16s; }
.plandlg__pip { position: absolute; top: 4px; inset-inline-start: 4px; width: 13px; height: 13px; color: var(--fam); filter: drop-shadow(0 0 0 #0a0b22); }
.plandlg__pip svg { width: 13px; height: 13px; }
.plandlg__pip--b { top: auto; bottom: 4px; inset-inline-start: auto; inset-inline-end: 4px; transform: rotate(180deg); }
.plandlg__mid { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--fam); border: 2.5px solid #0a0b22; box-shadow: 2px 2px 0 #0a0b22; }
.plandlg__mid svg { width: 21px; height: 21px; }
.plandlg__f b { font: 900 .76rem/1.05 var(--f-brand); color: #0a0b22; }
.plandlg__f small { font: 800 .62rem var(--f-text); color: #4a4560; }
.plandlg__f:not([disabled]):hover { transform: translateY(-5px) rotate(0deg); box-shadow: 0 0 0 2px var(--fam) inset, 3px 8px 0 #0a0b22, 0 0 18px color-mix(in srgb, var(--fam) 70%, transparent); }
.plandlg__f:focus-visible { outline: 3px solid #ffd36b; outline-offset: 3px; }
.plandlg__f:not([disabled]):active { transform: translateY(-2px) scale(.97); }
/* משפחה שאין לה קלף בחפיסה: הקלף הפוך ומעומעם */
.plandlg__f.is-none { cursor: not-allowed; background: repeating-linear-gradient(45deg, #2a1748 0 6px, #3a1f63 6px 12px); box-shadow: 0 0 0 2px rgba(212, 168, 58, .6) inset, 2px 3px 0 #0a0b22; }
.plandlg__f.is-none .plandlg__mid { filter: grayscale(1) brightness(.7); }
.plandlg__f.is-none b { color: #cbbfe6; }
.plandlg__f.is-none small { color: #a99cc9; }
.plandlg__f.is-none .plandlg__pip { opacity: .4; }
/* חלוקה: הקלפים נוחתים אחד אחרי השני (קטנים זזים מעט, 240ms) */
@media (prefers-reduced-motion: no-preference) {
  html:not(.reduce-motion) .plandlg__f { animation: plan-deal .32s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--k) * 30ms); }
}
@keyframes plan-deal { from { opacity: 0; translate: 0 -14px; scale: .94; } }
.plandlg__note { margin: 12px 0 0; font: 700 .76rem var(--f-text); color: #c9b8f0; }
.plandlg__foot { margin-top: 10px; }
.adlg--plan .btn--ghost { --b-fg: #f4ecff !important; border-color: rgba(255, 255, 255, .55) !important; color: #f4ecff; }

@media (min-width: 520px) { .plandlg__fams { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 519px) { .plandlg__pip--b { display: none; } }

/* 19.11.2026: גרסת הקלף בזירה (חדש / וינטג'), רק לקלף שיש לו וינטג'. בקובץ הזה כי arena.css מחזיק עבודה של סשן אחר */
.cver { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 2px; font: 700 .85rem/1.2 inherit; color: #3b3560; }
.cver button { all: unset; cursor: pointer; min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; font: 800 .9rem/1 inherit; color: #3b3560; box-shadow: inset 0 0 0 2px rgba(59, 53, 96, .35); }
.cver button[aria-checked="true"] { background: #ffc94a; color: #1b1838; box-shadow: 0 0 0 2px #1b1838; }
.cver button:focus-visible { outline: 3px solid #6fb4ff; outline-offset: 2px; }
