/*
 * chat-theme.css
 * רק: name overlay + כפתור נגישות + מצב a11y
 * כל שאר העיצוב → chat-layout.css
 */

/* ══ NAME OVERLAY ══ */
#nameOverlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
}
.name-box {
  background: #fff;
  border: 1px solid #c8d0dc;
  border-top: 3px solid #c70d16;
  border-radius: 6px;
  padding: 24px 22px 20px;
  width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 10px;
  text-align: center;
}
.name-box h2 {
  font-size: 18px; font-weight: 900;
  color: #101828; margin-bottom: 4px;
}
.name-box p { font-size: 13px; color: #68758a; }
.name-box input, .name-box select {
  height: 36px; border: 1px solid #b0bfcf; border-radius: 4px;
  padding: 0 10px; font-size: 14px; font-family: inherit;
  background: #fff; color: #101828; width: 100%;
}
.name-box input:focus, .name-box select:focus {
  outline: none; border-color: #c70d16;
}
.reg-extra { display: flex; gap: 8px; }
.reg-extra input, .reg-extra select { flex: 1; }
#nameBtn {
  height: 38px; background: #c70d16; color: #fff;
  border: none; border-radius: 4px; font-size: 16px; font-weight: 900;
  cursor: pointer; transition: background .15s;
}
#nameBtn:hover { background: #a8050c; }
.name-err { color: #c70d16; font-size: 12px; min-height: 16px; }

/* ══ ACCESSIBILITY BUTTON ══ */
#a11yBtn {
  position: fixed; bottom: 24px; left: 24px; z-index: 200;
  width: 44px; height: 44px; border-radius: 50%;
  background: #222233; color: #aaaacc;
  border: 2px solid #444455; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 16px rgba(0,0,0,.4);
  transition: transform .15s, background .2s;
}
#a11yBtn::after {
  content: 'נגישות';
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: #666677; white-space: nowrap;
}
#a11yBtn:hover { transform: scale(1.08); }
#a11yBtn[aria-pressed="true"] {
  background: #fff; color: #111; border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.3), 0 3px 16px rgba(0,0,0,.4);
}
#a11yBtn[aria-pressed="true"]::after { content: '✓ פעיל'; color: #25a55b; }

/* ══ ACCESSIBILITY MODE ══ */
body.a11y { filter: contrast(1.15); }
body.a11y p, body.a11y .msg { font-size: 1.05rem !important; line-height: 1.9 !important; }

/* ══ FOCUS ══ */
a:focus-visible, button:focus-visible {
  outline: 3px solid #c70d16; outline-offset: 2px; border-radius: 2px;
}

/* ═══════════════════════════════════════════════
   מצב נגישות ♿ — גובר על כל צבעי ההודעות
   ═══════════════════════════════════════════════ */
body.a11y-mode .msg,
body.a11y-mode .msg.black,
body.a11y-mode .msg.blue,
body.a11y-mode .msg.red,
body.a11y-mode .msg.green,
body.a11y-mode .msg.orange,
body.a11y-mode .msg.purple,
body.a11y-mode .msg.gray,
body.a11y-mode .msg.me,
body.a11y-mode .msg span,
body.a11y-mode .nick,
body.a11y-mode .msg.gender-f .nick,
body.a11y-mode .msg.gender-m .nick,
body.a11y-mode .msg.manager .nick,
body.a11y-mode .system,
body.a11y-mode .msg.system,
body.a11y-mode .user-item,
body.a11y-mode .room-badge,
body.a11y-mode .cb-tab-label,
body.a11y-mode #roomTitle {
  color: #111 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}
body.a11y-mode .msg {
  line-height: 1.85 !important;
  border-bottom: 1px solid #eee;
  padding: 2px 4px;
}
#a11yBtn[aria-pressed="true"] {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
  font-weight: 900 !important;
}
