/* ==========================================================================
   1. ESTILOS DA BARRA GOVERNAMENTAL (Layout e Fonte Roboto)
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

#barra-brasil div,
#barra-brasil a,
#barra-brasil ul,
#barra-brasil li {
  margin: 0;
  padding: 0;
  font-size: 100%;
  font-family: "Roboto", sans-serif;
  vertical-align: baseline;
  font-size: 1rem;
}
#barra-brasil ul {
  list-style: none;
}
.conteudo-escondido {
  display: block;
  background: transparent;
  border: none;
  height: 0.1em;
  overflow: hidden;
  padding: 0;
  margin: -0.1em 0 0 -0.1em;
  width: 1px;
}
#barra-brasil {
  background-color: #333333;
  box-sizing: content-box;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}
#barra-brasil .conteudo-barra-brasil {
  height: 40px;
  margin: 0 auto;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-between;
}
#barra-brasil .pic-gov {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2266%22%20height%3D%2214%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cdefs%3E%3Cpath%20id%3D%22a%22%20d%3D%22M9.367%204.374V.247H.37v4.127h8.997z%22%2F%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M7.602%2011.174a3.693%203.693%200%200%201-2.45.896c-.644%200-1.26-.114-1.848-.343a4.416%204.416%200%200%201-1.54-1.001%204.863%204.863%200%200%201-1.05-1.61C.453%208.481.322%207.758.322%206.946a4.851%204.851%200%200%201%201.47-3.521%205.092%205.092%200%200%201%201.617-1.05%205.205%205.205%200%200%201%202.009-.385c.448%200%20.877.049%201.288.147a4.495%204.495%200%200%201%202.086%201.12c.28.266.509.567.686.903l-2.03%201.554a2.289%202.289%200%200%200-.882-.945%202.362%202.362%200%200%200-1.246-.357%202.034%202.034%200%200%200-1.596.742c-.196.233-.35.511-.462.833a3.198%203.198%200%200%200-.168%201.057c0%20.392.056.747.168%201.064.112.317.268.59.469.819.2.229.441.406.721.532.28.126.593.189.938.189.793%200%201.493-.327%202.1-.98H5.768v-1.96h4.088V12H7.602v-.826zm8.078.91c-.756%200-1.442-.145-2.058-.434a5.092%205.092%200%200%201-2.604-2.758%205.008%205.008%200%200%201-.364-1.876c0-.653.126-1.283.378-1.89a5.018%205.018%200%200%201%201.057-1.603c.453-.462.99-.83%201.61-1.106.62-.275%201.3-.413%202.037-.413.756%200%201.442.145%202.058.434.616.29%201.143.672%201.582%201.148a5.151%205.151%200%200%201%201.015%201.624c.238.607.357%201.227.357%201.862a4.83%204.83%200%200%201-.378%201.883%205.1%205.1%200%200%201-1.05%201.596%205.165%205.165%200%200%201-1.603%201.113c-.62.28-1.3.42-2.037.42zm-2.254-5.04c0%20.336.047.66.14.973.093.313.233.59.42.833.187.243.422.439.707.588.285.15.623.224%201.015.224.392%200%20.733-.077%201.022-.231a2.07%202.07%200%200%200%20.707-.602%202.59%202.59%200%200%200%20.406-.847c.089-.317.133-.64.133-.966%200-.336-.047-.66-.14-.973a2.397%202.397%200%200%200-.427-.826%202.156%202.156%200%200%200-1.155.336c-.308.273-.462.63-.462%201.071v2.107h2.093v-2.1c0-.441-.154-.798-.462-1.071z%22%20fill%3D%22%23FFF%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  display: block;
  width: 66px;
  height: 14px;
  min-width: 66px;
  margin-right: 10px;
  line-height: 0;
  font-size: 0;
  color: transparent;
}
#barra-brasil .conteudo-barra-brasil nav {
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
#barra-brasil .conteudo-barra-brasil nav::-webkit-scrollbar {
  display: none;
}
#barra-brasil .conteudo-barra-brasil nav ul {
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  align-items: center;
  width: auto;
  max-width: none;
}
#barra-brasil .conteudo-barra-brasil nav ul li.list-item {
  flex-shrink: 0;
}
#barra-brasil .conteudo-barra-brasil nav ul li.espacador {
  height: 20px;
  width: 1px;
  border-right: 1px solid rgba(151, 151, 151, 0.3);
  margin: 0 7px 0 20px;
}
#barra-brasil a {
  text-decoration: none;
  color: #ffffff;
  font-weight: bold;
  font-size: 0.7em;
  text-transform: uppercase;
}
#barra-brasil .conteudo-barra-brasil nav a.link-externo-barra::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 10px;
  margin-right: 6px;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2211%22%20height%3D%2210%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23FFF%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M10.174.169l-.003%204.002L6.173.173z%22%2F%3E%3Cpath%20d%3D%22M4%204.51L7.91.6l1.768%201.768-3.91%203.91zM0%200h3.5v2.5H0z%22%2F%3E%3Cpath%20d%3D%22M0%202h2.5v5H0zM7.5%206H10v3H7.5z%22%2F%3E%3Cpath%20d%3D%22M0%207h10v2.5H0z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  opacity: 0;
}
#menu-barra-brasil a.link-baixo-barra.ativo {
  opacity: 1;
}
#menu-barra-brasil a.link-baixo-barra.close {
  opacity: 0.3;
}
#barra-brasil .conteudo-barra-brasil nav a.link-discreto,
#barra-brasil .conteudo-barra-brasil nav a.link-discreto-fixo,
#barra-brasil .conteudo-barra-brasil nav:hover li:not(:hover) > a {
  opacity: 0.3;
}
#barra-brasil .conteudo-barra-brasil nav a:hover {
  opacity: 1;
}
#barra-brasil .conteudo-barra-brasil nav a.link-externo-barra:hover::before {
  opacity: 1;
}
#barra-brasil .conteudo-barra-brasil nav a.link-interno-barra {
  margin-left: 13px;
}
#barra-brasil .conteudo-barra-brasil nav a.link-baixo-barra::after {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 6px;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%229%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23FFF%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M1.9.033L8.4%206.531%206.63%208.3.133%201.801z%22%2F%3E%3Cpath%20d%3D%22M11.395%200L5.03%206.364l1.767%201.768%206.364-6.364z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px 6px;
  background-color: #4d4d4d;
  border-radius: 50%;
}
#barra-brasil
  .conteudo-barra-brasil
  nav
  a.link-baixo-barra.link-cima-barra::after {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%229%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23FFF%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M1.9%208.967L8.4%202.469%206.63.7.133%207.199z%22%2F%3E%3Cpath%20d%3D%22M11.395%209L5.03%202.636%206.798.868l6.364%206.364z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
#barra-brasil .conteudo-barra-brasil a.botao-seta-direita,
#barra-brasil .conteudo-barra-brasil a.botao-seta-esquerda {
  width: 9px;
  min-width: 9px;
  margin-left: 10px;
  height: 13px;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2210%22%20height%3D%2213%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23FFF%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M.533%2011.232L7.03%204.734%208.8%206.502%202.301%2013z%22%2F%3E%3Cpath%20d%3D%22M.5%201.738l6.364%206.364%201.768-1.768L2.268-.03z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  line-height: 0;
  font-size: 0;
  color: transparent;
}
#barra-brasil .conteudo-barra-brasil a.botao-seta-direita {
  display: block;
}
#barra-brasil .conteudo-barra-brasil a.botao-seta-esquerda {
  display: none;
  rotate: 180deg;
  margin-right: 10px;
  margin-left: 0px;
}
#barra-brasil .orgaos-governo-barra {
  width: 100%;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.3);
  max-height: 0;
  overflow-y: hidden;
}
#barra-brasil .orgaos-governo-barra ul {
  margin: 8px;
}
#barra-brasil .orgaos-governo-barra.mostra-orgaos {
  max-height: calc(90vh - 40px);
}
#barra-brasil .orgaos-governo-barra > div {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
}
#barra-brasil .orgaos-governo-barra ul {
  margin-top: 25px;
  width: calc(100% + 25px);
  display: flex;
  flex-flow: row wrap;
}
#barra-brasil .orgaos-governo-barra ul li {
  width: 168px;
  text-align: left;
  margin: 0 25px 25px 0;
}
#barra-brasil .orgaos-governo-barra ul li a {
  font-size: 0.75em;
  text-transform: none;
  font-weight: bold;
}
#barra-brasil .orgaos-governo-barra ul:hover li:not(:hover) a {
  opacity: 0.3;
}
#barra-brasil .orgaos-governo-barra ul li a:hover {
  font-weight: bold;
}
@media only screen and (max-width: 600px) {
  #barra-brasil .orgaos-governo-barra {
    overflow-y: auto;
  }
  #barra-brasil .orgaos-governo-barra ul {
    width: 100%;
    flex-flow: column nowrap;
  }
  #barra-brasil .orgaos-governo-barra ul li {
    width: 100%;
    margin: 0 0 25px 0;
  }
  #barra-brasil .conteudo-barra-brasil a.botao-seta-direita {
    display: block;
  }
}

/* ==========================================================================
   2. CORES DA FAIXA COLORIDA
   ========================================================================== */
.tw\:grid {
  display: grid;
}
.tw\:grid-cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tw\:w-\[100\%\] {
  width: 100%;
}
.tw\:h-\[4px\] {
  height: 10px;
}
.tw\:bg-yellow-300 {
  background-color: #ffeb36;
}
.tw\:bg-red-600 {
  background-color: #f72930;
}
.tw\:bg-blue-400 {
  background-color: #399fe8;
}
.tw\:bg-green-500 {
  background-color: #00dc58;
}
.tw\:bg-black {
  background-color: #0f0a0a;
}

/* ==========================================================================
   3.TEMA CLARO
   ========================================================================== */

html,
body {
  height: 100%;
  min-height: 100vh;
  background-color: #ffffff !important;
  margin: 0;
}

#swagger-ui,
.swagger-ui {
  background-color: #ffffff !important;
  color: #3b4151 !important;
  min-height: 100vh; /* Garante que o swagger estique */
  font-family: "Roboto", sans-serif !important;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #ffffff !important;
  }
  .swagger-ui {
    filter: none !important;
  }
}

/* --- Títulos Principais e Seções --- */
.swagger-ui .opblock-tag {
  color: #3b4151 !important;
  border-bottom-color: #3b4151 !important;
}
.swagger-ui .opblock-tag a {
  color: #3b4151 !important;
}

/* --- DESCRIÇÃO DO DOMÍNIO (PRETO) --- */
.swagger-ui .opblock-tag small {
  color: #000000 !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}
.swagger-ui .opblock-tag small * {
  color: #000000 !important;
}

/* --- Barra de Pesquisa (COM LUPA E TEXTO VISÍVEL) --- */
.swagger-ui .filter-container .operation-filter-input {
  background-color: #ffffff !important;
  color: #3b4151 !important; /* Cor do texto digitado */
  border: 2px solid #888888 !important;

  /* Espaço para o ícone */
  padding: 10px 10px 10px 40px !important;

  /* Ícone de Lupa mais visível */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z' stroke='%23000000' stroke-width='0.8'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 12px center !important;

  width: 100%;
  box-shadow: none !important;
  border-radius: 4px !important;
}

/* Garante que o "Filter by tag" fique cinza escuro e visível */
.swagger-ui .filter-container .operation-filter-input::placeholder {
  color: #555555 !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}

/* Fallback para navegadores antigos */
.swagger-ui .filter-container .operation-filter-input::-ms-input-placeholder {
  color: #555555 !important;
  opacity: 1 !important;
}

/* --- Título Principal --- */
.swagger-ui .info .title {
  color: #222222 !important;
  opacity: 1 !important;
}
.swagger-ui .info p,
.swagger-ui .info li,
.swagger-ui .info .base-url,
.swagger-ui .info a {
  color: #000000 !important;
}

/* Mensagem de "Nenhuma operação definida" */
.swagger-ui .loading-container .title,
.swagger-ui .loading-container h4,
.swagger-ui .msg-erro-traduzida,
.msg-erro-traduzida {
  color: #000000 !important; /* Preto para melhor leitura */
  font-weight: bold !important;
  opacity: 1 !important;
}

/* ==========================================================================
   4. BADGES E LAYOUT
   ========================================================================== */

/* 1. LAYOUT: Título não fica espremido */
.swagger-ui .info h2.title {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 16px !important; /* Espaço entre texto e balões */
}

/* 2.Evitar conflitos entre temas */
.swagger-ui .info .title small,
.swagger-ui .info .title pre {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 3. ESTILO GERAL DAS PÍLULAS */
.swagger-ui .info .title small pre.version {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important; /* Menor altura */
  padding: 0 12px !important; /* Espaço interno */
  border-radius: 10px !important;
  font-size: 13px !important; /* Fonte menor */
  font-weight: 680 !important;
  line-height: 1 !important;
  margin-left: 6px !important; /* Separação entre os balões */
}

/* 4. SEPARAÇÃO DE CORES PELA ORDEM DOS ELEMENTOS */

/* O PRIMEIRO badge (Versão 1.0.0) */
.swagger-ui .info .title small:first-of-type pre.version {
  background-color: #7d8492 !important;
  color: #ffffff !important;
}

/* O SEGUNDO badge (OAS 2.0) */
.swagger-ui .info .title small:last-of-type pre.version {
  background-color: #89bf04 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */

#footer-brasil {
  width: 100%;
  background-color: #ffffff;
  font-family: "Roboto", sans-serif;
  color: #333;
  margin-top: 60px;
  border-top: 1px solid #eee;
  padding-bottom: 20px;
}

/* --- Barra Colorida --- */
.footer-color-bar {
  display: flex;
  width: 100%;
  height: 8px;
}
.footer-color-bar div {
  flex: 1;
  height: 100%;
}

/* --- Conteúdo Principal --- */
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}

/* --- Lado Esquerdo --- */
.col-left {
  max-width: 450px;
}
.address-text {
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 25px;
}
.sic-container {
  margin-top: 15px;
}
/* SIC */
.logo-sic {
  height: 70px;
  width: auto;
  transition: opacity 0.2s;
}
.logo-sic:hover {
  opacity: 0.8;
}

/* --- (CODATA | PILHA) --- */
.col-right-complex {
  display: flex;
  flex-direction: row; /* Alterado para linha */
  align-items: center; /* Centralizar verticalmente */
  gap: 20px; /* Espaçamento entre os logos */
  padding-top: 5px;
}

/* 1. Logo CODATA */
.logo-codata {
  height: 35px;
  width: auto;
  display: block;
  margin: 0; /* Removido margens antigas */
  transition: opacity 0.2s;
}
.logo-codata:hover {
  opacity: 0.8;
}

/* Logo Governo */
.logo-gov {
  height: 65px;
  width: auto;
  transition: opacity 0.2s;
}
.logo-gov:hover {
  opacity: 0.8;
}

/* Logo CGE */
.logo-cge {
  height: 70px; /* Aumentado para destaque */
  width: auto;
  transition: opacity 0.2s;
}
.logo-cge:hover {
  opacity: 0.8;
}

/* --- Licença --- */
.footer-license {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 0; /* Mais respiro superior */
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #222 !important;
  font-weight: 500;
}

.license-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.license-icons img {
  height: 22px;
  width: auto;
  opacity: 1;
}

.version-text {
  margin-right: 20px;
  color: #222 !important;
}

.license-text {
  color: #222 !important;
}

/* --- Mobile --- */
@media (max-width: 900px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }
  .col-right-complex {
    flex-direction: column; /* Empilha: CGE -> Gov -> Codata */
    align-items: center;
    gap: 30px;
    width: 100%;
  }
  .logo-codata {
    margin-top: 0;
  }
  .footer-license {
    flex-direction: column;
    gap: 15px;
  }
  .version-text {
    margin: 0;
  }
}

/* --- Models (Schemas) --- */

/* 1. Título "Models" */
.swagger-ui section.models h4,
.swagger-ui section.models h4 span {
  color: #3b4151 !important;
  opacity: 1 !important;
  font-weight: 600 !important;
}

.swagger-ui section.models h4:hover,
.swagger-ui section.models h4:hover span {
  color: #000000 !important;
}

/* Seta */
.swagger-ui section.models h4 svg {
  fill: #3b4151 !important;
}

/* 2. Garantir que o container não tenha overflow desnecessário */
.swagger-ui section.models {
  overflow: visible !important;
}

/* 3. Remover efeito de sombra deslocada */
.swagger-ui .model-box {
  box-shadow: none !important;
  outline: none !important;
}

.swagger-ui .model-container {
  box-shadow: none !important;
  background: transparent !important;
}
