/* Barra de acessibilidade — login e área logada (padrão /privacidade) */
:root {
  --lg-a11y-h: 40px;
  --lg-a11y-bg: #6e2f87;
}

.lg-a11y {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--lg-a11y-bg);
  color: rgba(255, 255, 255, 0.92);
  min-height: var(--lg-a11y-h);
  border-bottom: 2px solid color-mix(in srgb, var(--lg-a11y-bg) 78%, black);
}

.lg-a11y #navAcess {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.lg-a11y__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1rem;
  min-height: var(--lg-a11y-h);
  gap: 0.5rem;
}

.lg-a11y__nav {
  flex: 1;
  min-width: 0;
}

.lg-a11y #navbarMenuAcessCollapse.lg-a11y__collapse,
.lg-a11y__collapse {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  width: 100%;
  height: auto !important;
  overflow: visible !important;
  flex-direction: row !important;
}

.lg-a11y__menu,
.lg-a11y__lang {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
}

.lg-a11y #navAcess #menuLang {
  display: flex !important;
  margin: 0 !important;
}

.lg-a11y #navAcess #menuLang li {
  margin-right: 0 !important;
}

.lg-a11y__menu {
  flex: 1;
  min-width: 0;
}

.lg-a11y__btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  border: none;
  min-width: 0 !important;
  height: auto !important;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.9) !important;
  background: transparent;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s;
  cursor: pointer;
  flex-direction: row !important;
  justify-content: flex-start !important;
}

.lg-a11y__btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
}

/* Textos sempre visíveis (evita CSS antigo que escondia spans no desktop) */
.lg-a11y__btn > .lg-a11y__label,
.lg-a11y__btn > span.lg-a11y__label,
.lg-a11y #navAcess #menuAcess li span.lg-a11y__label,
.lg-a11y #menuAcess li span.lg-a11y__label {
  display: inline !important;
  font-size: inherit !important;
  font-weight: inherit;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Neutraliza regras legadas de base.css sobre #navAcess */
.lg-a11y #navAcess #menuAcess {
  display: flex !important;
}

.lg-a11y #navAcess #menuAcess li {
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}

.lg-a11y #navAcess #menuAcess li a {
  min-width: 0 !important;
  height: auto !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
}

.lg-a11y__font-icon {
  display: inline-block !important;
  font-weight: 800;
  font-size: 0.8rem;
  min-width: 1.1rem;
  text-align: center;
}

.lg-a11y__lang a {
  display: inline-flex !important;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75) !important;
  text-decoration: none !important;
}

.lg-a11y__lang a:hover,
.lg-a11y__lang a.ativo {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.lg-a11y__flag {
  display: inline-block;
  width: 16px;
  height: 12px;
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  flex-shrink: 0;
}

.lg-a11y__toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.lg-a11y__toggle-label {
  display: none;
}

@media (max-width: 991px) {
  .lg-a11y__toggle {
    display: inline-flex;
  }

  .lg-a11y__toggle-label {
    display: inline;
  }

  .lg-a11y #navbarMenuAcessCollapse.lg-a11y__collapse,
  .lg-a11y__collapse {
    display: none !important;
    width: 100%;
    flex-direction: column !important;
    align-items: stretch;
    padding: 0.5rem 0 0.65rem;
    gap: 0.5rem;
    height: auto !important;
  }

  .lg-a11y #navbarMenuAcessCollapse.lg-a11y__collapse.show,
  .lg-a11y__collapse.show {
    display: flex !important;
  }

  .lg-a11y__menu,
  .lg-a11y__lang {
    flex-direction: column;
    align-items: stretch;
  }

  .lg-a11y__btn,
  .lg-a11y__lang a {
    width: 100%;
    justify-content: flex-start;
    padding: 0.5rem 0.65rem;
  }

  .lg-a11y__inner {
    flex-wrap: wrap;
    padding: 0.35rem 1rem;
  }
}

.page-login #login {
  min-height: calc(100vh - var(--lg-a11y-h));
  height: auto;
  max-height: none;
  padding: 24px 0 32px;
}

/* Área logada: a barra entra no fluxo (sticky), sem o offset do header fixed antigo */
body.hold-transition > .wrapper,
body.sidebar-mini > .wrapper {
  margin-top: 0 !important;
}

body.hold-transition #modulos-selector {
  margin-top: 0;
}

body.contraste-ativo .lg-a11y {
  background: #000 !important;
  border-bottom: 2px solid #fff !important;
}

body.contraste-ativo .lg-a11y__btn,
body.contraste-ativo .lg-a11y__lang a,
body.contraste-ativo .lg-a11y__toggle {
  color: #fff !important;
  border: 1px solid #fff;
}

body.contraste-ativo .lg-a11y__btn:hover,
body.contraste-ativo .lg-a11y__lang a:hover,
body.contraste-ativo .lg-a11y__lang a.ativo {
  background: #fff !important;
  color: #000 !important;
}
