/* Menu de pessoa: visual próprio do QG (paleta neon dos tokens de style.css). */
.menu-pessoa {
  position: fixed; z-index: 85; width: min(264px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto;
  padding: 6px; display: flex; flex-direction: column; gap: 1px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(168, 85, 247, .08), 0 0 24px rgba(168, 85, 247, .12);
  animation: menu-pessoa-surge .12s ease-out; outline: none; overscroll-behavior: contain;
}
.menu-pessoa-sub { width: min(220px, calc(100vw - 16px)); }
@keyframes menu-pessoa-surge { from { opacity: 0; transform: translateY(-3px) scale(.985); } }
.reduce-motion .menu-pessoa { animation: none; }

.menu-pessoa-cabeca { display: flex; align-items: center; gap: 10px; padding: 6px 8px 8px; }
.menu-pessoa-retrato { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-3); flex: none; }
.menu-pessoa-quem { display: grid; min-width: 0; }
.menu-pessoa-quem strong, .menu-pessoa-quem span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-pessoa-quem span { color: var(--muted); font-size: 12px; }

.menu-pessoa-separador { height: 1px; margin: 4px 6px; background: var(--line); flex: none; }

.menu-pessoa-item {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 32px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text);
  text-align: left; font-size: 13px; line-height: 1.3; flex: none;
}
.menu-pessoa-item small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.menu-pessoa-rotulo { min-width: 0; overflow-wrap: anywhere; }
.menu-pessoa-item:hover, .menu-pessoa-item:focus { background: rgba(168, 85, 247, .18); outline: none; }
.menu-pessoa-item:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }
.menu-pessoa-item:hover::before, .menu-pessoa-item:focus::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2);
}
.menu-pessoa-item[aria-expanded="true"] { background: rgba(168, 85, 247, .18); }
.menu-pessoa-item[aria-disabled="true"] { color: var(--muted); cursor: default; }
.menu-pessoa-item[aria-disabled="true"]:hover, .menu-pessoa-item[aria-disabled="true"]:focus { background: rgba(255, 255, 255, .04); }

.menu-pessoa-item.perigo { color: var(--danger); }
.menu-pessoa-item.perigo:hover, .menu-pessoa-item.perigo:focus { background: rgba(255, 77, 109, .16); color: #ff8aa0; }
.menu-pessoa-item.perigo:hover::before, .menu-pessoa-item.perigo:focus::before { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.menu-pessoa-seta svg { width: 14px; height: 14px; color: var(--muted); }

/* Caixa de marcar própria: quadrado com brilho ciano quando marcado. */
.menu-pessoa-marca { width: 16px; height: 16px; flex: none; border-radius: 5px; border: 1.5px solid var(--muted); display: grid; place-items: center; }
.menu-pessoa-caixa[aria-checked="true"] .menu-pessoa-marca { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 8px rgba(34, 211, 238, .55); }
.menu-pessoa-caixa[aria-checked="true"] .menu-pessoa-marca::after {
  content: ""; width: 4px; height: 8px; margin-top: -2px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.menu-pessoa-volume { display: grid; gap: 6px; padding: 6px 10px 4px; }
.menu-pessoa-volume-topo { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.menu-pessoa-volume-topo output { color: var(--accent-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.menu-pessoa-volume input[type="range"] {
  --valor: 50%; width: 100%; height: 6px; margin: 4px 0; appearance: none; border-radius: 999px; outline: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)) 0 / var(--valor) 100% no-repeat, var(--surface-3);
}
.menu-pessoa-volume input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(168, 85, 247, .45); }
.menu-pessoa-volume input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(168, 85, 247, .45); }
.menu-pessoa-volume input[type="range"]:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.menu-pessoa-volume-escala { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }

/* Cartão de perfil */
.perfil-pessoa { display: flex; gap: 14px; align-items: center; }
.perfil-pessoa-retrato { width: 96px; height: 96px; border-radius: 18px; flex: none; background: linear-gradient(180deg, #2a1f4a, #15112a); border: 1px solid var(--line); box-shadow: 0 0 18px rgba(168, 85, 247, .18); }
.perfil-pessoa-dados { display: grid; gap: 4px; min-width: 0; align-content: center; }
.perfil-pessoa-nome { font-size: 17px; overflow-wrap: anywhere; }
.perfil-pessoa-dados .dot { margin-right: 2px; }
.menu-pessoa-cargo { justify-self: start; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .3px; border: 1px solid var(--line); color: var(--muted); }
.menu-pessoa-cargo.cargo-god { color: var(--warn); border-color: var(--warn); box-shadow: 0 0 8px rgba(250, 204, 21, .3); }
.menu-pessoa-cargo.cargo-admin { color: var(--accent); border-color: var(--accent); }
.menu-pessoa-cargo.cargo-dev { color: #5eead4; border-color: #5eead4; }
.menu-pessoa-cargo.cargo-sala { color: var(--accent-2); border-color: var(--accent-2); }
.perfil-pessoa-nota { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line); }
.perfil-pessoa-nota h3 { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.perfil-pessoa-nota p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.menu-pessoa-contador { justify-self: end; color: var(--muted); font-size: 11px; }

/* Galera: o nome abre o menu de pessoa. */
.person button.pname { max-width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.person button.pname:hover { color: var(--accent-2); }
.msg.msg-ignorada { margin-top: 6px; }
.msg-ignorada .msg-conteudo { color: var(--muted); font-size: 12px; font-style: italic; }

@media (max-width: 480px) {
  .perfil-pessoa { flex-direction: column; align-items: flex-start; }
}
