/* system/css/account-menu.css
   תפריט פרופיל המערכת. אווטאר עגול בפינה, dropdown בדסקטופ, bottom-sheet במובייל.
   צבעי המערכת, יעדי מגע 48px+. קונצנזוס Gemini + GPT (9/6/2026). */

#account-menu { position: relative; display: flex; align-items: center; }

.am-login {
  min-height: 44px; display: inline-flex; align-items: center; padding: 8px 16px;
  background: #fdf8f2; border: 1.5px solid var(--border, #e8e0d6); border-radius: 50px;
  font-weight: 700; font-size: 0.95rem; color: var(--navy, #1a4a6b); text-decoration: none;
}

.am-avatar {
  display: flex; align-items: center; gap: 3px; min-height: 44px;
  padding: 3px 6px 3px 3px; background: transparent; border: none; cursor: pointer; border-radius: 50px;
}
.am-avatar:hover { background: #fdf8f2; }
.am-initial {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy, #1a4a6b); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem;
}
.am-caret { color: var(--navy, #1a4a6b); }

.am-backdrop { position: fixed; inset: 0; background: rgba(26, 74, 107, 0.35); z-index: 40; }
.am-backdrop[hidden] { display: none; }

.am-sheet {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  width: 290px; max-width: 84vw; background: #fff; z-index: 50;
  border: 1px solid var(--border, #e8e0d6); border-radius: 16px;
  box-shadow: 0 12px 36px rgba(26, 74, 107, 0.18); padding: 8px;
}
.am-sheet[hidden] { display: none; }
.am-grip { display: none; }

.am-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 14px; border-bottom: 1px solid #f4ece0; margin-bottom: 6px; }
.am-avatar-lg {
  width: 46px; height: 46px; border-radius: 50%; background: var(--navy, #1a4a6b); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.25rem; flex-shrink: 0;
}
.am-id { display: flex; flex-direction: column; min-width: 0; }
.am-hello { font-weight: 800; color: var(--navy, #1a4a6b); font-size: 1.02rem; }
.am-email { font-size: 0.82rem; color: var(--text-light, #8a7a66); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.am-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px;
  padding: 10px 12px; border-radius: 12px; background: none; border: none; cursor: pointer;
  text-decoration: none; font-family: inherit; font-size: 1rem; font-weight: 600;
  color: var(--navy, #1a4a6b); text-align: start;
}
.am-item:hover { background: #fdf8f2; }
.am-item svg { flex-shrink: 0; }
.am-wa svg { color: #25d366; }
.am-logout { color: var(--text-light, #6b5d49); border-top: 1px solid #f4ece0; border-radius: 0 0 12px 12px; margin-top: 4px; }

/* מתג מצב תצוגה (אדמין בלבד), אדמין / משתמש / אורח */
.am-views { border-top: 1px solid #f4ece0; margin-top: 4px; padding-top: 4px; }
.am-views-h { font-size: 0.76rem; font-weight: 700; color: var(--text-light, #8a7a66); padding: 4px 12px 2px; }
.am-view.active { background: #fdf0e6; color: var(--orange, #e8854a); }
.am-view.active:hover { background: #fce4d3; }
.am-view .am-check { margin-inline-start: auto; color: var(--orange, #e8854a); }
/* יום לבדיקה (אדמין בתצוגת אדמין, 6/10/2026). ראשון עד חמישי בשורה אחת, "היום האמיתי" בשורה מלאה מעליהם. */
.am-day-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 4px 10px 8px; }
.am-day {
  min-height: 44px; border: 1.5px solid #e8e0d6; border-radius: 12px; background: #fff;
  font: inherit; font-size: 0.95rem; font-weight: 700; color: var(--navy, #1a4a6b); cursor: pointer;
}
.am-day:hover { background: #fdf8f2; }
.am-day.active { background: #fdf0e6; border-color: var(--orange, #e8854a); color: #c4652e; }
.am-day-real { grid-column: 1 / -1; }
.am-day:focus-visible { outline: 3px solid var(--orange, #e8854a); outline-offset: 2px; }
/* במחשב הכפתורים קטנים יותר, והתפריט נגלל בתוכו אם המסך נמוך. עומר, 6/10/2026,
   "להקטין טיפה את הכפתורים של הימים, שזה ייכנס הכל לאותו מסך". בטלפון נשארים 44 למגע. */
@media (min-width: 601px) {
  .am-sheet { max-height: calc(100vh - 90px); overflow-y: auto; }
  .am-day-grid { gap: 4px; padding: 2px 10px 6px; }
  .am-day { min-height: 32px; font-size: 0.85rem; border-radius: 10px; }
}
/* כשהתפריט פתוח, הנגישות ויצירת הקשר לא יושבים עליו. כמו בסרטון פתוח (gates.css) */
body:has(#am-sheet:not([hidden])) .a11y-trigger,
body:has(#am-sheet:not([hidden])) #wa-fab { display: none !important; }

@media (max-width: 600px) {
  .am-sheet {
    position: fixed; top: auto; bottom: 0; inset-inline: 0; width: 100%; max-width: none;
    border-radius: 20px 20px 0 0; padding: 6px 14px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 36px rgba(26, 74, 107, 0.2);
  }
  .am-grip { display: block; width: 42px; height: 4px; border-radius: 2px; background: #e0d6c8; margin: 8px auto 12px; }
  .am-head { padding: 6px 8px 16px; }
  .am-item { min-height: 56px; font-size: 1.08rem; }
}

/* פס גרירה + אישור יציאה (9/6/2026) */
.am-grip { cursor: grab; touch-action: none; }
.am-confirm-overlay { position: fixed; inset: 0; background: rgba(26,74,107,0.42); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.am-confirm-card { background: #fff; border-radius: 18px; padding: 22px; width: 100%; max-width: 360px; text-align: center; box-shadow: 0 16px 48px rgba(26,74,107,0.22); }
.am-confirm-q { font-size: 1.15rem; font-weight: 800; color: var(--navy, #1a4a6b); margin: 0 0 18px; }
.am-confirm-btns { display: flex; flex-direction: column; gap: 10px; }
.am-cbtn { min-height: 50px; border-radius: 12px; font-family: inherit; font-size: 1.02rem; font-weight: 700; cursor: pointer; border: none; }
.am-cbtn.ghost { background: #fdf8f2; color: var(--navy, #1a4a6b); border: 1.5px solid var(--border, #e8e0d6); }
.am-cbtn.danger { background: #fff; color: var(--danger, #c0392b); border: 1.5px solid #e7c4c0; }
