/* Central de Ajuda v2 — navegação persistente e guias orientados a tarefas. */

.ajd-root[data-help-version="2"] {
  --ajd-sidebar-width: 256px;
  --ajd-shell-gap: 1rem;
  --ajd-accent: #0d6efd;
  --ajd-accent-soft: #eaf2ff;
  --ajd-border: #dbe3ec;
  --ajd-surface: #fff;
  --ajd-muted: #64748b;
  align-items: flex-start;
  gap: var(--ajd-shell-gap);
  box-sizing: border-box;
  min-height: calc(100dvh - var(--navbar-offset, 58px));
  padding: var(--ajd-shell-gap);
  position: relative;
}

.ajd-skip-link {
  position: fixed;
  top: calc(var(--navbar-offset, 58px) + .5rem);
  left: 50%;
  z-index: 100;
  transform: translate(-50%, -160%);
  border-radius: .5rem;
  padding: .55rem .85rem;
  background: #0d6efd;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease;
}

.ajd-skip-link:focus { transform: translate(-50%, 0); }

.ajd-root[data-help-version="2"] .ajd-sidebar {
  width: var(--ajd-sidebar-width);
  min-width: var(--ajd-sidebar-width);
  height: auto;
  max-height: none;
  overflow: visible;
  position: sticky;
  /* O main já começa abaixo da navbar; somar o offset novamente desloca o menu
     quando o conteúdo do tópico é substituído via History API. */
  top: var(--ajd-shell-gap);
  z-index: 20;
  align-self: flex-start;
  border: 1px solid var(--ajd-border);
  border-radius: .9rem;
  background: var(--ajd-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  transition: width .2s ease, min-width .2s ease, transform .2s ease;
}

.ajd-root[data-help-version="2"] .ajd-nav {
  overflow: visible;
}

.ajd-root[data-help-version="2"] .ajd-sidebar-hd {
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.ajd-root[data-help-version="2"] .ajd-sidebar-hd > span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.ajd-sidebar-close,
.ajd-sidebar-open,
.ajd-mobile-menu-button,
.ajd-copy-link {
  border: 1px solid var(--ajd-border);
  border-radius: .55rem;
  background: var(--ajd-surface);
  color: #334155;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  cursor: pointer;
}

.ajd-sidebar-close {
  width: 2rem;
  min-height: 2rem;
  flex: 0 0 auto;
}

.ajd-sidebar-open {
  display: none;
  position: sticky;
  top: var(--ajd-shell-gap);
  z-index: 19;
  margin: 0;
  padding: .45rem .65rem;
  align-self: flex-start;
}

.ajd-root.ajd-sidebar-collapsed .ajd-sidebar {
  display: none;
  width: 0;
  min-width: 0;
  overflow: hidden;
  border: 0;
  box-shadow: none;
}

.ajd-root.ajd-sidebar-collapsed .ajd-sidebar-open {
  display: inline-flex;
}

.ajd-search-control {
  position: relative;
  display: flex;
  align-items: center;
}

.ajd-search-control > i {
  position: absolute;
  left: .65rem;
  color: var(--iaf-texto-fraco);
  pointer-events: none;
}

.ajd-root[data-help-version="2"] .ajd-search-input {
  min-height: 2.45rem;
  padding-left: 2rem;
  font-size: .82rem;
}

.ajd-search-status {
  min-height: 1.2rem;
  padding: .35rem .15rem 0;
  color: var(--ajd-muted);
  font-size: .72rem;
}

.ajd-search-results {
  display: none;
  margin-top: .35rem;
  border-top: 1px solid var(--ajd-border);
  padding-top: .35rem;
}

.ajd-search-results.is-open { display: block; }

.ajd-search-result {
  display: block;
  padding: .55rem .45rem;
  border-radius: .45rem;
  color: #334155;
  text-decoration: none;
}

.ajd-search-result:hover,
.ajd-search-result:focus-visible {
  background: var(--ajd-accent-soft);
  color: #0b57d0;
}

.ajd-search-result strong,
.ajd-search-result small,
.ajd-search-result span { display: block; }

.ajd-search-result small {
  color: var(--ajd-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .65rem;
}

.ajd-search-result span {
  margin-top: .15rem;
  color: var(--iaf-texto-fraco);
  font-size: .72rem;
  line-height: 1.35;
}

.ajd-search-result mark {
  background: #fde68a;
  color: inherit;
  padding: 0 .1em;
}

.ajd-root[data-help-version="2"] .ajd-content {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  min-width: 0;
  overflow: visible;
  position: relative;
  padding: 1.25rem 1.5rem 2rem;
  border: 1px solid var(--ajd-border);
  border-radius: .9rem;
  background: var(--ajd-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  transition: margin .2s ease;
}

.ajd-root[data-help-version="2"] .ajd-h3 {
  margin: 1.65rem 0 .7rem;
  color: #1e3a5f;
  font-size: clamp(1.05rem, .98rem + .3vw, 1.25rem);
  line-height: 1.3;
  font-weight: 750;
}

.ajd-root[data-help-version="2"] .ajd-sec > p:not(.ajd-sub):not(.ajd-eyebrow) {
  max-width: 82ch;
  color: #475569;
  line-height: 1.65;
}

.ajd-root.ajd-sidebar-collapsed .ajd-content {
  max-width: none;
}

.ajd-content-toolbar {
  position: static;
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  min-height: 2.5rem;
  padding: 0 0 .85rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--ajd-border);
  background: transparent;
}

.ajd-mobile-menu-button { display: none; }
.ajd-copy-link { padding: .38rem .7rem; font-size: .78rem; }

/* Cabeçalho contextual dos tópicos no card superior da ajuda. */
.ajd-toolbar-topic-header[hidden] { display: none !important; }

.ajd-content-toolbar--topic-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "topic topic"
    ". copy";
  align-items: end;
  row-gap: .8rem;
  min-height: 8rem;
}

.ajd-toolbar-topic-header {
  grid-area: topic;
  min-width: 0;
  padding: .05rem 0 .15rem;
}

.ajd-toolbar-topic-header .ajd-breadcrumb {
  margin: 0 0 .55rem;
}

.ajd-toolbar-topic-header .ajd-h2 {
  margin: 0 0 .25rem;
}

.ajd-toolbar-topic-header .ajd-sub {
  margin: 0;
}

.ajd-content-toolbar--topic-header .ajd-copy-link {
  grid-area: copy;
  justify-self: end;
  margin: 0;
}

.ajd-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, var(--iaf-superficie) 72%);
  margin-bottom: 1rem;
}

.ajd-hero-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: .9rem;
  color: #fff;
  background: var(--ajd-accent);
  font-size: 1.35rem;
}

.ajd-eyebrow {
  margin: 0 0 .2rem;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  font-weight: 700;
}

.ajd-hero p:last-child { margin: .5rem 0 0; color: #475569; }

.ajd-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.ajd-start-card {
  border: 1px solid var(--ajd-border);
  border-radius: .8rem;
  padding: 1rem;
  background: var(--iaf-superficie);
  color: #1e293b;
  text-align: left;
  text-decoration: none;
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: .7rem;
  row-gap: .15rem;
  cursor: pointer;
}

.ajd-start-card > i { grid-row: 1 / span 2; font-size: 1.25rem; color: var(--ajd-accent); }
.ajd-start-card > span { color: var(--ajd-muted); font-size: .8rem; }
.ajd-start-card:hover { border-color: #93c5fd; box-shadow: 0 8px 20px rgba(37, 99, 235, .08); }

.ajd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  color: var(--ajd-muted);
  font-size: .75rem;
  margin-bottom: .65rem;
}

.ajd-breadcrumb a { color: #2563eb; text-decoration: none; }

.ajd-section-anchor {
  color: inherit;
  text-decoration: none;
}

.ajd-section-anchor::after {
  content: "\F470";
  font-family: bootstrap-icons;
  opacity: 0;
  margin-left: .4rem;
  font-size: .75em;
  transition: opacity .15s ease;
}

.ajd-section-anchor:hover::after,
.ajd-section-anchor:focus-visible::after { opacity: .6; }

.ajd-sidebar-backdrop { display: none; }

/* Guia visual com as ações importantes da tela. */
.ajd-screen-guide {
  border: 1px solid #bfdbfe;
  border-radius: .9rem;
  background: #f8fbff;
  margin: 1rem 0;
  overflow: hidden;
}

.ajd-screen-guide__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .8rem 1rem;
  background: #eaf2ff;
  color: #1e3a8a;
}

.ajd-screen-guide__body { padding: 1rem; }

/* Captura real com camada responsiva de orientação. A imagem permanece íntegra;
   os focos em porcentagem acompanham o redimensionamento do conteúdo. */
.ajd-screen-capture {
  margin: 1rem 0 1.35rem;
}

.ajd-screen-capture__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ajd-border);
  border-radius: .85rem;
  background: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.ajd-screen-capture__frame > img {
  display: block;
  width: 100%;
  height: auto;
}

.ajd-screen-capture figcaption {
  padding: .65rem .2rem 0;
  color: var(--ajd-muted);
  font-size: .82rem;
  line-height: 1.45;
}

.ajd-screen-focus {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border: 2px solid #fbbf24;
  border-radius: .45rem;
  background: rgba(251, 191, 36, .06);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .2), 0 5px 16px rgba(15, 23, 42, .32);
  pointer-events: none;
}

.ajd-screen-focus__number {
  position: absolute;
  left: -.72rem;
  top: -.72rem;
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(127, 29, 29, .45);
}

/* Passos numerados abaixo da captura: o número casa com o destaque da imagem.
   Usado em Fechamento de Lote e Vacinação; até 17/10/2026 não tinha estilo e
   aparecia como texto solto. */
.ajd-screen-callouts { display: grid; gap: .6rem; margin-top: .75rem; }
.ajd-screen-callout { display: flex; gap: .65rem; align-items: flex-start; font-size: .875rem; line-height: 1.55; }
.ajd-screen-callout p { margin: .15rem 0 0; }
.ajd-screen-callout__number {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
}

.ajd-screen-focus__label {
  position: absolute;
  left: .45rem;
  top: .35rem;
  max-width: calc(100% - .9rem);
  padding: .18rem .38rem;
  overflow: hidden;
  border-radius: .3rem;
  background: rgba(15, 23, 42, .88);
  color: #fef3c7;
  font-size: clamp(.55rem, .75vw, .72rem);
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ajd-click-target {
  position: relative;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
}

.ajd-click-target::after {
  content: "CLIQUE AQUI";
  position: absolute;
  right: -.35rem;
  top: -.75rem;
  padding: .15rem .35rem;
  border-radius: .3rem;
  background: #f59e0b;
  color: #111827;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

.ajd-hotspot {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(127, 29, 29, .25);
  flex: 0 0 auto;
}

.ajd-screen-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .9rem;
}

.ajd-screen-legend > div {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  padding: .55rem;
  border-radius: .55rem;
  background: var(--iaf-superficie);
  border: 1px solid #dbeafe;
  font-size: .78rem;
  color: #475569;
}

.ajd-task-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin: 1rem 0;
}

.ajd-task-step {
  position: relative;
  border: 1px solid var(--ajd-border);
  border-radius: .75rem;
  background: var(--iaf-superficie);
  padding: 1rem;
}

.ajd-task-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--ajd-accent);
  color: #fff;
  font-weight: 800;
  margin-bottom: .5rem;
}

.ajd-task-step strong,
.ajd-task-step span { display: block; }
.ajd-task-step span { margin-top: .3rem; font-size: .8rem; color: var(--ajd-muted); line-height: 1.45; }

.ajd-video {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--ajd-border);
  border-radius: .9rem;
  background: var(--ajd-surface);
}

.ajd-video__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.ajd-video__header .ajd-h3 { margin-top: 0; }
.ajd-video__player { display: block; width: 100%; max-height: min(70vh, 680px); border-radius: .7rem; background: #020617; }
.ajd-video__transcript { margin-top: .75rem; color: #475569; }
.ajd-video__transcript summary { cursor: pointer; font-weight: 700; }
.ajd-video__transcript > div { margin-top: .65rem; line-height: 1.65; }

html.dark .ajd-root[data-help-version="2"],
html.azul .ajd-root[data-help-version="2"] {
  --ajd-surface: #141b24;
  --ajd-border: #334155;
  --ajd-muted: #94a3b8;
  --ajd-accent-soft: #172554;
}

html.dark .ajd-content-toolbar,
html.azul .ajd-content-toolbar { background: transparent; }
html.dark .ajd-sidebar-close,
html.dark .ajd-sidebar-open,
html.dark .ajd-mobile-menu-button,
html.dark .ajd-copy-link,
html.azul .ajd-sidebar-close,
html.azul .ajd-sidebar-open,
html.azul .ajd-mobile-menu-button,
html.azul .ajd-copy-link { color: #dbeafe; }
html.dark .ajd-hero,
html.azul .ajd-hero { background: linear-gradient(135deg, #172554, #141b24 72%); border-color: #1e40af; }
html.dark .ajd-root[data-help-version="2"] .ajd-h3,
html.azul .ajd-root[data-help-version="2"] .ajd-h3 { color: #bfdbfe; }
html.dark .ajd-root[data-help-version="2"] .ajd-sec > p:not(.ajd-sub):not(.ajd-eyebrow),
html.azul .ajd-root[data-help-version="2"] .ajd-sec > p:not(.ajd-sub):not(.ajd-eyebrow) { color: #cbd5e1; }
html.dark .ajd-hero p:last-child,
html.azul .ajd-hero p:last-child { color: #cbd5e1; }
html.dark .ajd-start-card,
html.azul .ajd-start-card,
html.dark .ajd-search-result,
html.azul .ajd-search-result,
html.dark .ajd-screen-legend > div,
html.azul .ajd-screen-legend > div,
html.dark .ajd-task-step,
html.azul .ajd-task-step { background: #141b24; color: #e2e8f0; }
html.dark .ajd-screen-guide,
html.azul .ajd-screen-guide { background: #0f172a; border-color: #1e40af; }
html.dark .ajd-screen-guide__header,
html.azul .ajd-screen-guide__header { background: #172554; color: #bfdbfe; }

@media (max-width: 900px) {
  body.ajd-help-menu-open { overflow: hidden; }
  .ajd-root[data-help-version="2"] {
    display: block;
    padding: .75rem;
  }

  .ajd-root[data-help-version="2"] .ajd-sidebar {
    display: block;
    position: fixed;
    top: var(--navbar-offset, 58px);
    left: 0;
    width: min(88vw, 320px);
    min-width: min(88vw, 320px);
    height: calc(100dvh - var(--navbar-offset, 58px));
    max-height: calc(100dvh - var(--navbar-offset, 58px));
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0 .9rem .9rem 0;
    transform: translateX(-105%);
    box-shadow: 12px 0 30px rgba(15, 23, 42, .22);
  }

  .ajd-root.ajd-sidebar-mobile-open .ajd-sidebar { transform: translateX(0); }
  .ajd-root.ajd-sidebar-collapsed .ajd-sidebar { width: min(88vw, 320px); min-width: min(88vw, 320px); }
  .ajd-sidebar-open { display: none !important; }
  .ajd-mobile-menu-button { display: inline-flex; padding: .38rem .7rem; font-size: .78rem; }
  .ajd-content-toolbar { justify-content: space-between; }
  .ajd-content-toolbar--topic-header {
    grid-template-areas:
      "topic topic"
      "mobile copy";
  }
  .ajd-content-toolbar--topic-header .ajd-mobile-menu-button {
    grid-area: mobile;
    justify-self: start;
  }
  .ajd-root.ajd-sidebar-mobile-open .ajd-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: var(--navbar-offset, 58px) 0 0;
    width: 100%;
    height: calc(100dvh - var(--navbar-offset, 58px));
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 18;
  }
  .ajd-start-grid,
  .ajd-screen-legend { grid-template-columns: 1fr; }
  .ajd-task-flow { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .ajd-root[data-help-version="2"] { padding: .5rem; }
  .ajd-root[data-help-version="2"] .ajd-content {
    padding: .75rem;
    border-radius: .7rem;
  }
  .ajd-screen-focus { border-width: 1px; box-shadow: 0 0 0 2px rgba(251, 191, 36, .18); }
  .ajd-screen-focus__number {
    left: -.48rem;
    top: -.48rem;
    width: 1.05rem;
    height: 1.05rem;
    border-width: 1px;
    font-size: .58rem;
  }
  .ajd-screen-focus__label { display: none; }
  .ajd-content-toolbar { margin-bottom: .75rem; padding-bottom: .65rem; }
  .ajd-hero { padding: 1rem; }
  .ajd-task-flow { grid-template-columns: 1fr; }
  .ajd-copy-link span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ajd-root[data-help-version="2"] .ajd-sidebar,
  .ajd-root[data-help-version="2"] .ajd-content,
  .ajd-section-anchor::after { transition: none; }
}

/* Notas de rodape de topico. Os dois tons estavam no atributo `style` de cada
   paragrafo - cinzas escuros sem tema, que somem no fundo escuro. */
.ajd-nota-referencia {
  margin-top: .5rem;
  font-size: .875rem;
  color: var(--iaf-texto);
}
.ajd-nota-fonte {
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--iaf-texto-fraco);
}
