/* כפתורים שמרגישים כמו באפליקציה — ui-buttons.css (משותף לכל המסכים)
   לחיצה מכווצת מעט, ריחוף מרים מעט, בלי הבזק אפור של הדפדפן במובייל,
   ובלי הריבוע של מיקוד אחרי נגיעה: טבעת מיקוד מופיעה רק בניווט במקלדת
   והיא עגולה כמו הכפתור. */
button,[role=button],a.button,a.btn,.btn,.mini,.aibtn,.tile,.chip,.simple-action,.simple-primary,.app-home-launchers button,#appDock button,nav button,nav a,.modebtn,.conscell,.launcher,.pill,.cell.assigned,.cell.unassigned,button.cell,summary,.settoggle,.iconbtn,.langsw,.tohq{
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;
  transition:transform .12s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease,filter .18s ease,background-color .18s ease,border-color .18s ease,opacity .18s ease;
  will-change:transform;
}
@media(hover:hover) and (pointer:fine){
  button:not(:disabled):hover,[role=button]:hover,a.button:hover,a.btn:hover,.btn:not(:disabled):hover,.mini:not(:disabled):hover,.aibtn:not(:disabled):hover,.tile:hover,.chip:hover,.simple-action:hover,.simple-primary:hover,.modebtn:hover,.conscell:hover,button.cell:hover,.iconbtn:hover,.tohq:hover{
    transform:translateY(-1px);filter:brightness(1.07);
  }
}
button:not(:disabled):active,[role=button]:active,a.button:active,a.btn:active,.btn:not(:disabled):active,.mini:not(:disabled):active,.aibtn:not(:disabled):active,.tile:active,.chip:active,.simple-action:active,.simple-primary:active,.modebtn:active,.conscell:active,button.cell:active,.iconbtn:active,.tohq:active,#appDock button:active,nav button:active,nav a:active,.app-home-launchers button:active{
  filter:brightness(.94);transition-duration:.06s;/* הכיווץ והקפיץ — ui-dialog.js (Web Animations, scale), כדי שלא ייערמו שני כיווצים */
}
/* מיקוד: אף פעם ריבוע אחרי נגיעה; טבעת עגולה רק במקלדת */
button:focus:not(:focus-visible),[role=button]:focus:not(:focus-visible),a:focus:not(:focus-visible),summary:focus:not(:focus-visible),.cell:focus:not(:focus-visible){outline:none!important;box-shadow:none}
button:focus-visible,[role=button]:focus-visible,a.button:focus-visible,a.btn:focus-visible,.btn:focus-visible,.mini:focus-visible,.aibtn:focus-visible,.tile:focus-visible,.chip:focus-visible,.simple-action:focus-visible,.simple-primary:focus-visible,.iconbtn:focus-visible,.tohq:focus-visible,#appDock button:focus-visible,nav button:focus-visible{
  outline:2px solid var(--accent,var(--gold,#c9a468));outline-offset:3px;border-radius:inherit;
}
/* כפתורי סגירה (×) — עגולים, בלי מסגרת מרובעת */
#closeDetail,.dialog-head button,.mifkada-dialog button[aria-label],[data-close],[data-scan-close],#appSheet header button,.close,.x{
  width:40px;height:40px;min-height:40px;padding:0;border-radius:50%!important;display:inline-flex;align-items:center;justify-content:center;line-height:1;
}
#closeDetail:focus,.dialog-head button:focus,#appSheet header button:focus{outline:none!important}
/* בעלים 8.10: סידור עבודה — ה-× של לוח הסידור (#closeDetail) מקבל טבעת בהירה, לא כתומה, רק במקלדת: החלון ממקד את הכותרת בפתיחה,
   כך שה-× ממוקד רק ב-Tab ואין טבעת אחרי הקשה. שאר הדיאלוגים — ללא שינוי */
#closeDetail:focus-visible{outline:2px solid #f5f2eb!important;outline-offset:3px}
@media(prefers-reduced-motion:reduce){button,[role=button],a.button,.btn,.mini,.aibtn,.tile,.chip,.simple-action,.simple-primary{transition:none!important;transform:none!important}}

/* כפתור מצב (מסנן, בחירה, מתג): לחוץ = צבוע בזהב, לחיצה נוספת מחזירה לצבע הקודם — אותו כלל בכל האתר */
button[aria-pressed="true"],[role=button][aria-pressed="true"],.chip[aria-pressed="true"],.modebtn.on,.filter-chips .chip.on{background:var(--accent,var(--gold,#c9a468))!important;color:var(--mf-on-accent,#0E0E10)!important;border-color:var(--accent,var(--gold,#c9a468))!important;font-weight:700}
button[aria-pressed="true"] svg,[role=button][aria-pressed="true"] svg{stroke:var(--mf-on-accent,#0E0E10);color:var(--mf-on-accent,#0E0E10)}

/* כפתור × — עגול, קו נקי (SVG, לא גליף מתוח), מסתובב בריחוף, נלחץ בלחיצה. משותף לכל הדיאלוגים. */
.x-close{width:40px!important;min-width:40px!important;max-width:40px!important;flex:0 0 40px!important;height:40px!important;min-height:40px!important;padding:0!important;box-sizing:border-box;border-radius:50%!important;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:1.5px solid var(--accent,var(--gold,#c9a468));color:var(--accent,var(--gold,#c9a468));box-shadow:0 0 0 0 #c9a46800;transition:transform .22s cubic-bezier(.2,.8,.2,1),background-color .2s ease,color .2s ease,box-shadow .25s ease}
.x-close .x-icon{width:18px;height:18px;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;fill:none;transition:transform .28s cubic-bezier(.2,.8,.2,1)}
@media(hover:hover) and (pointer:fine){.x-close:hover{background:var(--accent,var(--gold,#c9a468));color:var(--mf-on-accent,#0E0E10);box-shadow:0 0 0 6px #c9a46826;transform:translateY(-1px)}.x-close:hover .x-icon{transform:rotate(90deg)}}
.x-close:active{transition-duration:.06s}.x-close:active .x-icon{transform:rotate(90deg) scale(.9)}
.x-close:focus-visible{outline:2px solid var(--accent,var(--gold,#c9a468));outline-offset:3px}
@media(prefers-reduced-motion:reduce){.x-close,.x-close .x-icon{transition:none!important}.x-close:hover .x-icon{transform:none}}

/* בעלים 21.10 ("האיקס במובייל לא אמור להיות שם — אלא בקצה וברמה הכי גבוהה"): חוזה ה-× של כל חלון קופץ בטלפון — CLOSE X 26.10.
   .x-corner — ה-× עצמו: יוצא מזרימת שורת הכותרת ויושב בפינה העליונה בצד הסוף (inset-inline-end: בעברית שמאל, באנגלית ימין,
   בלי כלל נפרד לכל מהדורה), 44×44 (יעד מגע), בלי מסגרת/טבעת (נשאר מה שיש לכל × — ui-buttons/attendance/app-shell).
   .x-head — שורת הכותרת של אותו חלון: דביקה לראש החלון (נשארת במקום כשהחלון עצמו נגלל), נמשכת עד קצות החלון
   (--x-pad = הריפוד של החלון; 0 כשהכותרת כבר יושבת בקצה), ומשאירה 58px ריקים בצד הסוף — שום כפתור אחר לא נכנס מתחת ל-×
   ולא נוגע בו (≥10px, כלל "כפתורים לא נוגעים"). מחוץ ל-620px (שולחן העבודה) — שום שינוי. */
@media (max-width:620px){
  /* CLOSE (26.10, QA): top:0 הצמיד את הכותרת הדביקה לקצה התוכן של החלון (מתחת לריפוד) — ה-× ישב 21–23px מתחת לקצה ותוכן נגלל
     נראה מעליו; top:-var(--x-pad) מרשה לה להגיע לקצה החלון עצמו. padding-inline-start מחזיר לכותרת את ריפוד הצד שהשוליים השליליים לקחו. */
  .x-head{position:sticky!important;top:calc(-1*var(--x-pad,0px))!important;z-index:3;box-sizing:border-box;
    margin:calc(-1*var(--x-pad,0px)) calc(-1*var(--x-pad,0px)) 8px!important;
    padding-block-start:var(--x-pad,12px)!important;padding-inline-end:58px!important;padding-inline-start:var(--x-pad,0px);min-height:52px;
    background:inherit}
  .x-head>h2,.x-head>h3{margin-block:0}
  /* הכפתור של #appSheet נבחר לפי מקומו (בלי class) — חתימת הצבעים של theme-default-unchanged ("dialog#appSheet › button") נשארת כפי שנרשמה */
  .x-corner,#appSheet>header>button{position:absolute!important;inset-block-start:4px!important;inset-inline-end:4px!important;top:auto;left:auto;right:auto;
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:none!important;max-height:none!important;
    margin:0!important;padding:0!important;flex:none!important;float:none!important;z-index:2;box-sizing:border-box;
    display:inline-flex!important;align-items:center;justify-content:center;line-height:1}
  .x-corner:not(.x-close),#appSheet>header>button{font-size:1.4rem}
}
