/* ── Fontes ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

@font-face {
  font-family: 'Helsinki';
  src: url('/helsinki.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ── Footer — modo claro (padrão) ────────────────────────── */
/* wrapper full-width com background */
.swg-footer-wrap {
  background: #fff;
  border-top: 1px dashed rgba(145,158,171,.24);
  transition: background .25s, border-color .25s;
  font-family: 'Public Sans', sans-serif;
}
html.dark-mode .swg-footer-wrap {
  background: #1c2022;
  border-top-color: rgba(145,158,171,.16);
}

/* inner centrado igual à LP */
.swg-footer {
  max-width: 1460px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: transparent;
  border-top: none;
}
.swg-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.swg-footer-brand svg {
  color: #1c252e;
  transition: color .25s;
}
.swg-footer-brand-name {
  font-family: 'Helsinki', sans-serif;
  font-weight: normal;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: #1c252e;
  user-select: none;
  transition: color .25s;
}
.swg-footer-copy {
  font-size: 13px;
  color: #637381;
  margin: 0;
  transition: color .25s;
}
.swg-footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.swg-footer-links a {
  font-size: 13px;
  color: #637381;
  text-decoration: none;
  transition: color .2s;
}
.swg-footer-links a:hover { color: var(--c-primary, #00A76F); }

/* ── Footer — modo escuro ────────────────────────────────── */
html.dark-mode .swg-footer-brand svg  { color: #fff; }
html.dark-mode .swg-footer-brand-name { color: #fff; }
html.dark-mode .swg-footer-copy       { color: #919eab; }
html.dark-mode .swg-footer-links a    { color: #919eab; }
html.dark-mode .swg-footer-links a:hover { color: var(--c-primary, #00A76F); }

@media (max-width: 600px) {
  .swg-footer { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(145,158,171,.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(145,158,171,.6); }
* { scrollbar-width: thin; scrollbar-color: rgba(145,158,171,.4) transparent; }

/* ── Nav da LP no topbar do Swagger ─────────────────────────── */
/* Alta especificidade para vencer .swagger-ui .topbar a { flex:1; font-size:1.5em } */
.swagger-ui .topbar #swg-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}
.swagger-ui .topbar #swg-nav a {
  /* reset das regras globais do Swagger */
  display: block;
  flex: none;
  max-width: none;
  /* espaçamento idêntico ao .nav-links a da LP */
  font-family: 'Public Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color .2s, background .15s;
}
.swagger-ui .topbar #swg-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
@media (max-width: 900px) {
  .swagger-ui .topbar #swg-nav { display: none; }
}

/* Esconde o botão de tema padrão do Swagger UI */
.swagger-ui .topbar .dark-mode-toggle {
  display: none !important;
}

/* ── Select de filtro por grupo ──────────────────────────── */
#swg-filtro-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1460px;
  margin: 0 auto;
  padding: 14px 20px;
  border-bottom: 1px dashed rgba(145, 158, 171, .24);
}
html.dark-mode #swg-filtro-wrap {
  border-bottom-color: rgba(145, 158, 171, .16);
}
#swg-filtro-wrap label {
  font-family: 'Public Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #637381;
  white-space: nowrap;
  cursor: default;
}
html.dark-mode #swg-filtro-wrap label {
  color: #919eab;
}
#swg-filtro-select {
  font-family: 'Public Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1c252e;
  background: transparent;
  border: 1.5px solid rgba(145, 158, 171, .32);
  border-radius: 8px;
  padding: 7px 36px 7px 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23919eab' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .2s, box-shadow .2s;
  min-width: 200px;
}
#swg-filtro-select:focus,
#swg-filtro-select:hover {
  border-color: var(--c-primary, #00A76F);
  box-shadow: 0 0 0 3px rgba(0, 167, 111, .12);
}
html.dark-mode #swg-filtro-select {
  color: #c4cdd5;
  border-color: rgba(145, 158, 171, .2);
  background-color: rgba(255, 255, 255, .04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23637381' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}
html.dark-mode #swg-filtro-select option {
  background: #1c2022;
  color: #c4cdd5;
}

/* ── Filtro por tag ──────────────────────────────────────── */
.swagger-ui .filter {
  padding: 0 20px;
}
.swagger-ui .filter .operation-filter-input {
  width: 100%;
  margin: 16px 0;
  padding: 10px 14px;
  font-family: 'Public Sans', sans-serif;
  font-size: 13px;
  border: 1px dashed rgba(145, 158, 171, .5);
  border-radius: 8px;
  background: transparent;
  color: #1c252e;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.swagger-ui .filter .operation-filter-input::placeholder {
  color: #919eab;
}
.swagger-ui .filter .operation-filter-input:focus {
  border-color: var(--c-primary, #00A76F);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(0, 167, 111, .12);
}
html.dark-mode .swagger-ui .filter .operation-filter-input {
  color: #c4cdd5;
  border-color: rgba(145, 158, 171, .3);
  background: rgba(255, 255, 255, .04);
}
html.dark-mode .swagger-ui .filter .operation-filter-input:focus {
  border-color: var(--c-primary, #00A76F);
  box-shadow: 0 0 0 3px rgba(0, 167, 111, .15);
}

/* ── Botão voltar ao topo ────────────────────────────────── */
#swg-back-top-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
#swg-back-top-wrap.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#swg-back-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-primary, #00A76F);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 167, 111, .35);
  transition: background .2s, box-shadow .2s;
}
#swg-back-top:hover {
  background: var(--c-primary-dark, #007867);
  box-shadow: 0 6px 20px rgba(0, 167, 111, .5);
}
#swg-back-top iconify-icon {
  color: #fff;
  pointer-events: none;
}
.swg-back-top-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(69, 79, 91, .92);
  color: #fff;
  font-family: 'Public Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  z-index: 10000;
}
.swg-back-top-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(69, 79, 91, .92);
}
#swg-back-top-wrap:hover .swg-back-top-tooltip {
  opacity: 1;
}

/* ── Divisor pontilhado após o botão Autorizar ───────────── */
.swagger-ui .scheme-container {
  border-bottom: 1px dashed rgba(145, 158, 171, .24);
  box-shadow: none !important;
}
html.dark-mode .swagger-ui .scheme-container {
  border-bottom-color: rgba(145, 158, 171, .16);
}

/* ── Botão flutuante de tema ─────────────────────────────── */
#swg-theme-btn {
  margin-left: 4px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.8;
  transition: opacity 0.2s;
  overflow: visible;
  position: relative;
}
#swg-theme-btn:hover {
  opacity: 1;
}
#swg-theme-btn iconify-icon {
  pointer-events: none;
}

/* tooltip estilo MUI (arrow abaixo, aparece acima) */
#swg-theme-btn::before,
#swg-theme-btn::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
/* seta apontando para cima */
#swg-theme-btn::after {
  content: '';
  top: calc(100% + 2px);
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-bottom-color: rgba(69, 79, 91, 0.92);
  z-index: 1;
}
/* caixa do tooltip */
#swg-theme-btn::before {
  content: attr(data-tooltip);
  top: calc(100% + 14px);
  background: rgba(69, 79, 91, 0.92);
  color: #fff;
  font-family: sans-serif;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  z-index: 0;
}
#swg-theme-btn:hover::before,
#swg-theme-btn:hover::after {
  opacity: 1;
}

html.dark-mode #swg-theme-btn {
  color: #c4cdd5;
}

/* ── Bloco de contato customizado ────────────────────────────── */
.swg-contato {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}
.swg-contato-titulo {
  font-family: 'Public Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1c252e;
  margin-bottom: 2px;
  transition: color .25s;
}
.swg-contato-item {
  font-family: 'Public Sans', sans-serif;
  font-size: 13px;
  color: #637381;
  text-decoration: none;
  transition: color .2s;
}
.swg-contato-item:hover { color: var(--c-primary, #00A76F); }
.swg-contato-label {
  font-weight: 600;
  color: #1c252e;
  transition: color .25s;
}
html.dark-mode .swg-contato-titulo       { color: #fff; }
html.dark-mode .swg-contato-item         { color: #919eab; }
html.dark-mode .swg-contato-item:hover   { color: var(--c-primary, #00A76F); }
html.dark-mode .swg-contato-label        { color: #c4cdd5; }

/* ── URL da spec abaixo do título ────────────────────────────── */
.swg-spec-url {
  display: inline-block;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--c-primary, #00A76F);
  text-decoration: none;
  word-break: break-all;
  margin-top: 6px;
  opacity: 0.8;
  transition: opacity .2s;
}
.swg-spec-url:hover {
  opacity: 1;
  text-decoration: underline;
}
html.dark-mode .swg-spec-url {
  color: var(--c-primary-light, #5BE49B);
}
