/*
 * "Ver como" (modules/verComo.js): a faixa roxa fixa, o botão do topo e a janela de escolha do perfil.
 * Só tokens de tema (claro e escuro); nenhuma transição nem keyframe (hover/aperto é do MicroMotion).
 */

/* ---- Faixa fixa: sempre por cima de tudo, e a tela desce a altura dela ---- */
html.vc-on { --vc-h: 36px; }
.vc-faixa {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483000;
  height: var(--vc-h, 36px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--brand-purple);
  color: var(--on-strong);
  font-family: Inter, 'Segoe UI', Roboto, -apple-system, Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}
.vc-faixa-texto { overflow: hidden; text-overflow: ellipsis; }
.vc-faixa-texto strong { font-weight: 700; }
.vc-faixa-nota {
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--on-strong) 18%, transparent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.vc-faixa-acoes { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.vc-faixa-traco { opacity: 0.7; }
.vc-faixa-btn {
  height: 24px;
  padding: 0 12px;
  border: 1px solid var(--on-strong);
  border-radius: 999px;
  background: var(--on-strong);
  color: var(--brand-purple);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.vc-faixa-btn--leve { background: transparent; color: var(--on-strong); border-color: color-mix(in srgb, var(--on-strong) 55%, transparent); font-weight: 600; }
.vc-faixa-btn:focus-visible { outline: 2px solid var(--on-strong); outline-offset: 2px; }

html.vc-on .app-screen { height: calc(100vh - var(--vc-h)); margin-top: var(--vc-h); }
html.vc-on .login-screen { min-height: calc(100vh - var(--vc-h)); margin-top: var(--vc-h); }
html.vc-on body.clinic-app { padding-top: var(--vc-h); min-height: calc(100vh - var(--vc-h)); }
html.vc-on .cl-app, html.vc-on .cl-boot { min-height: calc(100vh - var(--vc-h)); }
html.vc-on .cl-rail { top: var(--vc-h); }
html.vc-on .cl-top { top: var(--vc-h); }

/* ---- Botão "Ver como" (só o moderador vê) ---- */
#vc-abrir.topbar-icon-btn { width: auto; padding: 0 10px; gap: 6px; font-size: 13px; font-weight: 600; }
#vc-abrir .vc-abrir-txt { white-space: nowrap; }

/* ---- Janela de escolha ---- */
.vc-fundo {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--vc-h, 0px) + 40px) 16px 24px;
  background: color-mix(in srgb, var(--text) 45%, transparent);
  overflow-y: auto;
}
.vc-janela {
  width: min(620px, 100%);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--text) 24%, transparent);
  font-family: Inter, 'Segoe UI', Roboto, -apple-system, Helvetica, Arial, sans-serif;
}
.vc-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border-light); }
.vc-cab h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--text); }
.vc-cab p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.vc-fechar { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 16px; cursor: pointer; }
.vc-fechar:hover { background: var(--bg); color: var(--text); }
.vc-corpo { padding: 14px 20px 20px; }
.vc-corpo h3 { margin: 14px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.vc-agora { margin: 0 0 4px; padding: 8px 12px; border-radius: 8px; background: var(--brand-purple-soft); color: var(--text); font-size: 13px; }
.vc-perfis { display: flex; flex-direction: column; gap: 8px; }
.vc-perfil { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--surface); }
.vc-perfil-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vc-perfil-txt strong { font-size: 14px; color: var(--text); }
.vc-perfil-txt > span { font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
.vc-pro { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 12.5px; color: var(--text-muted); }
.vc-pro select { min-width: 0; max-width: 260px; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.vc-btn { flex-shrink: 0; height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--brand-purple); color: var(--on-strong); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.vc-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vc-btn:focus-visible, .vc-pessoa:focus-visible, .vc-fechar:focus-visible, .vc-busca:focus-visible { outline: 2px solid var(--brand-purple); outline-offset: 2px; }
.vc-busca { width: 100%; box-sizing: border-box; height: 36px; margin-bottom: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.vc-pessoas { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.vc-pessoa { display: grid; grid-template-columns: minmax(0, auto) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.vc-pessoa[hidden] { display: none; }
.vc-pessoa:hover { background: var(--bg); border-color: var(--border-light); }
.vc-pessoa-nome { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-chip { padding: 2px 8px; border-radius: 999px; background: var(--brand-purple-soft); color: var(--brand-purple-ink); font-size: 11px; font-weight: 600; }
.vc-pessoa-det { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 12px; text-align: right; }
.vc-vazio { margin: 4px 0; font-size: 13px; color: var(--text-muted); }

@media (max-width: 640px) {
  .vc-faixa { gap: 6px; padding: 0 8px; font-size: 12px; }
  .vc-faixa-nota, .vc-faixa-traco, .vc-faixa-olho { display: none; }
  .vc-perfil { flex-direction: column; align-items: stretch; }
  .vc-pessoa { grid-template-columns: minmax(0, 1fr) auto; }
  .vc-pessoa-det { grid-column: 1 / -1; text-align: left; }
  #vc-abrir .vc-abrir-txt { display: none; }
}
