/* Barra flutuante */
.barra-acessibilidade {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  position: fixed;
  /* top: 250px; */
  top: 377px;
  right: 0;
  z-index: 99999;
  font-family: sans-serif;
  height: 0;
}
@media (max-width: 768px) {
  .barra-acessibilidade {
    top: 75%;
  }
}
.btn-toggle {
  background: #083f8e;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 5px 0 0 5px;
  box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle img {
  width: 32px;
  height: 32px;
  display: block;
}

/* Menu Gaveta */
.menu-acessibilidade {
  display: flex;
  flex-direction: column;
  background: #fff;
  max-width: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.menu-acessibilidade.open {
  max-width: 200px;
  border: 1px solid #ddd;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-acessibilidade button {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  border-bottom: 1px solid #eee;
  padding: 10px 15px;
  cursor: pointer;
  text-align: left;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
  width: 100%;
  transition: background 0.2s;
}

.menu-acessibilidade button:hover {
  background-color: #f8f9fa;
}

.menu-acessibilidade button svg {
  margin-right: 10px;
  flex-shrink: 0;
  fill: currentColor;
}

/* --- ESTILOS GLOBAIS (CONTRASTE/INVERSÃO) --- */
body.contrast,
body.contrast * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.contrast a,
body.contrast a * {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

body.contrast button,
body.contrast input {
  background-color: #000 !important;
  color: #fff !important;
  border: 1px solid #fff !important;
}

body.contrast img {
  filter: grayscale(100%) contrast(120%);
  background-color: transparent !important;
}

/* --- CORREÇÃO DO INVERTER CORES --- */

/* 1. Aplica a inversão no conteúdo principal e no rodapé, MAS NÃO no body */
body.inversed #site-content,
body.inversed footer,
body.inversed header {
  filter: invert(100%);
  background-color: #fff; /* Garante fundo para inversão correta */
}

/* 2. Aplica inversão nas imagens/videos dentro do conteúdo (para des-inverter elas) */
body.inversed #site-content img,
body.inversed #site-content video,
body.inversed footer img {
  filter: invert(100%);
}

/* 3. (Opcional) Se você quiser que a BARRA também inverta as cores, 
   aplique o filtro diretamente nela. Como o filtro está nela e não no pai, 
   o position: fixed CONTINUA FUNCIONANDO. */
body.inversed .barra-acessibilidade {
  filter: invert(100%);
}

/* Removemos a regra antiga que aplicava no body direto */
/* body.inversed {
    filter: invert(100%); 
    background-color: #fff;
} 
*/
