/* Ícone de ajuda contextual (gatilho) */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  margin-left: 5px;
  padding: 0;
  background: #e8eef1;
  color: #33424b;
  font-size: 11px;
  font-weight: 900;
  cursor: help;
  vertical-align: middle;
  border: 1px solid #cbd5da;
  position: relative;
  flex: 0 0 auto;
  line-height: 1;
}
.help-icon:hover,
.help-icon:focus-visible {
  background: #dce8ed;
}
.help-icon:focus-visible {
  outline: 2px solid var(--blue, #4297c6);
  outline-offset: 2px;
}

/* Portal único no body — nunca é filho de card/modal/drawer, por isso não é
   cortado por overflow:hidden/auto de nenhum container ancestral. */
.help-tooltip {
  position: fixed;
  z-index: 10000;
  width: min(320px, 86vw);
  max-width: 350px;
  background: #111820;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}
.help-tooltip[hidden] {
  display: none;
}
.help-tooltip-content {
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.help-tooltip-kind {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8fa3ad;
}
.help-tooltip-kind.is-action {
  color: #6fd1a0;
}
.help-tooltip-title {
  font-size: 13.5px;
  font-weight: 800;
}
.help-tooltip-desc {
  color: #d7dee2;
  font-weight: 500;
  white-space: normal;
}
.help-tooltip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border: 7px solid transparent;
}
.help-tooltip[data-placement="top"] .help-tooltip-arrow {
  bottom: -14px;
  border-top-color: #111820;
}
.help-tooltip[data-placement="bottom"] .help-tooltip-arrow {
  top: -14px;
  border-bottom-color: #111820;
}
.help-tooltip[data-placement="left"] .help-tooltip-arrow {
  right: -14px;
  border-left-color: #111820;
}
.help-tooltip[data-placement="right"] .help-tooltip-arrow {
  left: -14px;
  border-right-color: #111820;
}

/* Glossário — mesmo catálogo HELP_CONTENT, com busca e filtro por categoria */
.glossary-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.glossary-toolbar input,
.glossary-toolbar select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
}
.glossary-toolbar input {
  flex: 1 1 220px;
}
.glossary-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.glossary-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: #fafcfd;
}
.glossary-item .kind {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.glossary-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--green-dark);
}
.glossary-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.glossary-empty {
  color: var(--muted);
  padding: 30px;
  text-align: center;
}
@media (max-width: 760px) {
  .glossary-panel {
    grid-template-columns: 1fr;
  }
}
