/* public/css/doc/api.css */

/* === VARIÁVEIS DE TEMA === */
:root {
  /* Cores */
  --bg-main: #0f0f12;
  --bg-header: #16161b;
  --bg-footer: #0f0f12;
  --bg-secondary: #1a1a1f;
  --bg-hover: rgba(161, 161, 221, 0.05);
  --text-main: #e2e2e5;
  --text-muted: #9b9b9f;
  --text-secondary: #858585;
  --link-color: #ccccff;
  --link-hover: #a7a1ff;
  --border-color: #25252a;
  --primary-color: #6159d3;
  --icon-filter: #6366f1;
  --primary-hover: #7b73e8;

  /* Cores para boxes de informação */
  --warning-color: #e07b00;
  --warning-color-rgb: 224, 123, 0;
  --info-color: #6366f1;
  --info-color-rgb: 99, 102, 241;
  --tip-color: #18a336;
  --tip-color-rgb: 24, 163, 54;

  /* Cores de destaque consistentes */
  --accent-color: #6366f1;
  --accent-color-rgb: 99, 102, 241;
  --accent-secondary: #8b5cf6;
  --accent-secondary-rgb: 139, 92, 246;

  /* Variáveis para ícones de link */
  --link-icon-filter: brightness(0) saturate(100%) invert(85%) sepia(15%)
    saturate(876%) hue-rotate(195deg) brightness(105%) contrast(105%);
  --link-icon-hover-filter: brightness(0) saturate(100%) invert(76%) sepia(16%)
    saturate(983%) hue-rotate(195deg) brightness(102%) contrast(101%);

  /* Dimensões */
  --topbar-height: 64px;
  --sidebar-width: 260px;
  --footer-height: 180px;

  /* Transições */
  --transition-speed: 0.3s;
  --transition-smooth: 0.4s;
  --icon-filter-custom: brightness(0) saturate(100%) invert(32%) sepia(59%)
    saturate(1318%) hue-rotate(227deg) brightness(93%) contrast(88%);
}

/* === MODO CLARO === */
body.light-mode {
  --bg-main: #fafafa;
  --bg-header: #ffffff;
  --bg-footer: #f7f7f7;
  --bg-secondary: #f0f0f0;
  --bg-hover: rgba(97, 89, 211, 0.05);
  --text-main: #1c1c1f;
  --text-muted: #555;
  --text-secondary: #666;
  --link-color: #6159d3;
  --link-hover: #7b73e8;
  --border-color: #ddd;
  --primary-color: #6159d3;
  --icon-filter: #6366f1;
  --primary-hover: #7b73e8;

  /* Boxes de informação */
  --warning-color: #e07b00;
  --warning-color-rgb: 224, 123, 0;
  --info-color: #4f46e5;
  --info-color-rgb: 79, 70, 229;
  --tip-color: #059669;
  --tip-color-rgb: 5, 150, 105;

  /* Destaques */
  --accent-color: #4f46e5;
  --accent-color-rgb: 79, 70, 229;
  --accent-secondary: #7c3aed;
  --accent-secondary-rgb: 124, 58, 237;

  /* Ícones */
  --link-icon-filter: brightness(0) saturate(100%) invert(85%) sepia(15%)
    saturate(876%) hue-rotate(195deg) brightness(105%) contrast(105%);
  --link-icon-hover-filter: brightness(0) saturate(100%) invert(32%) sepia(59%)
    saturate(1318%) hue-rotate(227deg) brightness(93%) contrast(88%);
}

/* === ESTILOS BASE === */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body,
html {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  transition: background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

/* === HIERARQUIA Z-INDEX === */
.api-topbar {
  z-index: 1000;
}
.api-footer {
  z-index: 1000; /* Aumentei para 1000 para ficar acima do sidebar */
}
.api-sidebar {
  z-index: 800; /* Mantém abaixo do footer */
}
.api-sidebar-overlay {
  z-index: 700;
}
.api-scroll-progress {
  z-index: 1001;
}

/* === COMPONENTES PRINCIPAIS === */

/* Topbar */
.api-topbar {
  display: flex;
  align-items: center;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--topbar-height);
  gap: 1rem;
  justify-content: space-between;
}

.api-title-container {
  align-items: center;
  gap: 1rem;
}

.api-title-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.api-title-link:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.api-title-link h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

.api-title-link:hover h1 {
  color: var(--link-hover);
}

/* Menu do Topbar */
.api-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  max-width: 100%;
  max-height: 100%;
}

.api-logo:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

body.light-mode .api-logo {
  filter: brightness(0.8);
}

.top-icon-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 5px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  max-width: 100%;
  max-height: 100%;
  margin-right: -5px;
  margin-left: 5px;
}

.top-icon-logo:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

body.light-mode .top-icon-logo {
  filter: brightness(0.8);
}

/* Modo escuro - ícone branco */
.top-icon-logo {
  filter: brightness(0) invert(1);
}

/* Modo claro - ícone preto */
body.light-mode .top-icon-logo {
  filter: brightness(0) invert(0);
}

.api-title-text {
  font-size: 1.1rem;
  margin-left: 8px;
}

/* Ou para um tamanho maior */
.api-title-text.large {
  font-size: 1.3rem;
}

/* Ícones de conteúdo com cor de link */
.content-icon-logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-right: 2px;
  max-width: 100%;
  max-height: 100%;
  filter: var(--icon-filter-custom);
  margin-bottom: -3px;
}

.content-icon-logo:hover {
  transform: scale(1.05);
  filter: brightness(0) saturate(100%) invert(32%) sepia(59%) saturate(1318%)
    hue-rotate(227deg) brightness(93%) contrast(88%) brightness(1.2);
}

.api-theme-toggle:hover {
  background: var(--bg-secondary);
  transform: scale(1.05);
}

/* === SIDEBAR === */
.api-sidebar {
  background: var(--bg-header);
  border-right: 1px solid var(--border-color);
  height: calc(100vh - var(--topbar-height));
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  overflow-y: auto;
  width: var(--sidebar-width);
  padding: 1rem 0;
  transition: transform var(--transition-speed) ease;
}

/* Estilo para títulos de seção da sidebar */
.api-sidebar-section-title {
  padding: 12px 10px 8px 10px;
  font-size: 1em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
  margin-top: 16px;
  cursor: default;
  user-select: none;
}

/* Primeiro título sem margin-top */
.api-sidebar-list > .api-sidebar-section-title:first-child {
  margin-top: 0;
}

/* Ajuste para os itens seguintes ao título */
.api-sidebar-section-title + .api-sidebar-item {
  margin-top: 0;
}

.api-sidebar h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.api-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.api-sidebar li {
  margin: 0;
}

.api-sidebar a {
  color: var(--text-muted);
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.2s ease;
}

.api-sidebar a:hover {
  background-color: rgba(var(--accent-color-rgb), 0.05);
  color: var(--accent-color);
}

body.light-mode .api-sidebar li.active-parent > a {
  box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.2);
}

body.light-mode .api-sidebar a.active {
  background: rgba(var(--accent-color-rgb), 0.12);
}

body.light-mode .api-sidebar .api-submenu li a.active {
  background: rgba(var(--accent-color-rgb), 0.15);
}

.api-sidebar a.active {
  color: var(--accent-color);
  background: rgba(var(--accent-color-rgb), 0.08);
  border-left-color: var(--accent-color);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent-color);
}

.api-submenu {
  margin-left: 15px !important;
  padding-left: 0.5rem;
}

.api-submenu a {
  font-size: 0.9rem;
  padding-left: 1.25rem;
}

/* === SIDEBAR - DESTAQUES MELHORADOS === */

/* Item de menu ativo com cores de destaque */
.api-sidebar li.active-parent > a {
  color: var(--accent-color);
  font-weight: 600;
  border-left-color: var(--accent-color);
  background: linear-gradient(
    135deg,
    rgba(var(--accent-color-rgb), 0.1) 0%,
    rgba(var(--accent-secondary-rgb), 0.05) 100%
  );
  border-left: 4px solid var(--accent-color);
  padding-left: 12px;
  margin-left: -4px;
  box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.15);
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.api-sidebar li.active-parent > a:hover {
  background: linear-gradient(
    135deg,
    rgba(var(--accent-color-rgb), 0.2) 0%,
    rgba(var(--accent-secondary-rgb), 0.1) 100%
  );
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.25);
}

/* Subseção ativa - MAIS SUTIL (sem barra e ponto) */
.api-sidebar .api-submenu li a.active {
  background: rgba(var(--accent-color-rgb), 0.08);
  color: var(--accent-color);
  font-weight: 500;
  border-left: none;
  padding-left: 1.25rem;
  margin-left: 0;
  position: relative;
}

/* Remove o ponto indicador */
.api-sidebar .api-submenu li a.active::before {
  display: none;
}

.api-sidebar .api-submenu li a.active:hover {
  background: rgba(var(--accent-color-rgb), 0.12);
  transform: none;
}

/* Garante que o item pai fique destacado quando um subitem está ativo */
.api-sidebar li:has(.api-submenu li a.active) > a {
  color: var(--accent-color);
  font-weight: 600;
  border-left-color: var(--accent-color);
  background: linear-gradient(
    135deg,
    rgba(var(--accent-color-rgb), 0.1) 0%,
    rgba(var(--accent-secondary-rgb), 0.05) 100%
  );
  border-left: 4px solid var(--accent-color);
  padding-left: 12px;
  margin-left: -4px;
  box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.15);
}

.api-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.api-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* === CORREÇÕES DA SIDEBAR MOBILE === */

.api-sidebar-close {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.api-sidebar-close:hover {
  background: var(--bg-secondary);
}

.api-sidebar-close .hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  margin: 4px 0;
  transition: all var(--transition-speed) ease;
  border-radius: 2px;
}

.api-sidebar-close .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.api-sidebar-close .hamburger-line:nth-child(2) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Sidebar mobile */
.api-sidebar-mobile {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-header);
  position: sticky;
  bottom: 0;
}

/* === CONTEÚDO PRINCIPAL === */
.api-content {
  margin-top: var(--topbar-height);
  padding: 2rem;
  min-height: calc(100vh - var(--topbar-height));
  flex: 1;
  padding-left: 18.5rem;
  padding-right: 18.5rem;
  padding-bottom: 2rem;
  overflow-x: hidden;
  transition: background var(--transition-speed) ease;
  max-width: 100%;
  box-sizing: border-box;
}

.api-page-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === TIPOGRAFIA E ELEMENTOS DE TEXTO === */

/* Cabeçalhos */
.api-page-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  padding-top: 10px;
  margin-top: 10px;
}

.api-page-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  padding-top: 10px;
  margin-top: 10px;
  line-height: 1.3;
}

/* CORREÇÃO DO H3 - CONSISTENTE COM H2 E QUEBRA DE LINHA */
.api-page-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem 0;
  color: var(--text-main);
  padding-top: 8px;
  margin-top: 8px;
  white-space: nowrap;
}

.api-page-section h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem 0;
  color: var(--text-main);
  padding-top: 6px;
  margin-top: 6px;
}

.api-page-section h5 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 1rem 0 0.5rem 0;
  color: var(--text-main);
}

.api-page-section h6 {
  font-size: 1rem;
  font-weight: 500;
  margin: 1rem 0 0.5rem 0;
  color: var(--text-muted);
}

/* Parágrafos e texto */
.api-page-section p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

.api-page-section strong,
.api-page-section b {
  font-weight: 600;
}

.api-page-section i,
.api-page-section em {
  font-style: italic;
}

/* Links */
.api-content a,
.api-page-section a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.api-page-section a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

.api-page-section a[target="_blank"]::after {
  font-size: 0.8em;
  margin-left: 0.3em;
  transform: translateY(-1px);
  opacity: 0.8;
  content: "";
  display: none;
}

.api-page-section h1 a,
.api-page-section h2 a,
.api-page-section h3 a,
.api-page-section h4 a,
.api-page-section h5 a,
.api-page-section h6 a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.api-page-section h1 a:hover,
.api-page-section h2 a:hover,
.api-page-section h3 a:hover,
.api-page-section h4 a:hover,
.api-page-section h5 a:hover,
.api-page-section h6 a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

/* Listas */
.api-page-section ul,
.api-page-section ol,
.api-list {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.api-page-section li,
.api-list li {
  margin-bottom: 0.5rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* === COMPONENTES DE CÓDIGO PADRONIZADOS === */

/* Código inline - PADRONIZADO */
.api-page-section code,
.api-code-block code,
.api-table code,
.api-error-table code,
.tip-box code,
.info-box code,
.warning-box code {
  background: var(--bg-secondary);
  border-radius: 0px;
  color: var(--text-main);
  font-family: "Fira Code", "Consolas", "Monaco", monospace;
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
  word-wrap: normal;
  word-break: keep-all;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
  border: 1px solid var(--border-color);
  font-size: 1em;
  line-height: 1.1;
  min-height: 1.5em;
}

/* Blocos de código - remove padding duplicado */
.api-code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  overflow-x: auto;
  padding: 0rem;
  margin: 1rem 0;
}

.api-code-block code {
  background: none;
  border: none;
  padding: 0;
  white-space: pre;
  font-size: 1em;
}

/* Melhorar a visualização em mobile */
@media (max-width: 768px) {
  .api-page-section code,
  .api-code-block code,
  .api-table code,
  .api-error-table code,
  .tip-box code,
  .info-box code,
  .warning-box code {
    font-size: 1em;
    padding: 0.05rem 0.4rem;
    line-height: 1.4;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    vertical-align: middle;
    min-height: 1.6em;
  }

  .api-page-section code::-webkit-scrollbar {
    height: 6px;
  }
}

/* Correção específica para código em tabelas em mobile */
@media (max-width: 768px) {
  .api-table code,
  .api-error-table code {
    padding: 0.05rem 0.4rem;
    line-height: 1.3;
    font-size: 1em;
    vertical-align: middle;
    display: inline-block;
    min-height: 1.4em;
  }
}

/* Correção para código em headings */
.api-page-section h1 code,
.api-page-section h2 code,
.api-page-section h3 code,
.api-page-section h4 code,
.api-page-section h5 code,
.api-page-section h6 code {
  vertical-align: middle;
  line-height: 1.2;
  padding: 0.05rem 0.4rem;
  font-size: 0.8em;
}

@media (max-width: 768px) {
  .api-page-section h1 code,
  .api-page-section h2 code,
  .api-page-section h3 code,
  .api-page-section h4 code,
  .api-page-section h5 code,
  .api-page-section h6 code {
    padding: 0.05rem 0.4rem;
    line-height: 1.3;
    font-size: 0.75em;
  }
}

/* Correção para código em listas */
.api-page-section li code,
.api-list li code {
  vertical-align: middle;
  line-height: 1.3;
  padding: 0.05rem 0.4rem;
  font-size: 1em;
}

@media (max-width: 768px) {
  .api-page-section li code,
  .api-list li code {
    padding: 0.05rem 0.4rem;
    line-height: 1.4;
    font-size: 1em;
  }
}

/* Garantir que o código não quebre layout em mobile muito pequeno */
@media (max-width: 480px) {
  .api-page-section code,
  .api-code-block code,
  .api-table code,
  .api-error-table code,
  .tip-box code,
  .info-box code,
  .warning-box code {
    max-width: 90vw;
    overflow-x: auto;
    font-size: 1em;
    padding: 0.05rem 0.4rem;
    line-height: 1.4;
  }

  .api-page-section code {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

/* Correção adicional para alinhamento vertical */
code {
  vertical-align: middle !important;
}

/* === BLOCO DE CÓDIGO COM LINHAS NUMERADAS - CORREÇÃO === */
.code-block-with-lines {
  position: relative;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  width: 100%;
  color: var(--text-main);
}

.code-block-content {
  display: flex;
  position: relative;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: auto;
  background: var(--bg-secondary);
}

.code-block-content.scrollable {
  max-height: 240px;
  overflow-y: auto;
}

/* CORREÇÃO: Garantir que números e código tenham a mesma altura de linha */
.code-block-line-numbers {
  background: var(--bg-header);
  border-right: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: "Fira Code", "Consolas", "Monaco", monospace;
  font-size: 0.9rem;
  line-height: 1.5; /* MESMA altura de linha do código */
  text-align: right;
  user-select: none;
  padding: 16px 10px;
  min-width: 5.5em;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.code-block-code {
  background: transparent;
  flex: 1;
  line-height: 1.5; /* MESMA altura de linha dos números */
  margin: 0;
  color: inherit;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 14px; /* Tamanho consistente */
  white-space: pre;
  display: flex;
  flex-direction: column;
}

/* CORREÇÃO: Garantir que cada linha tenha altura consistente */
.line-number {
  padding: 0;
  line-height: 1.5; /* ALTURA IDÊNTICA às linhas de código */
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 14px; /* MESMO tamanho da fonte do código */
  height: 1.5em; /* Altura fixa baseada no line-height */
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.code-line {
  white-space: pre;
  word-break: normal;
  line-height: 1.5; /* ALTURA IDÊNTICA aos números */
  height: 1.5em; /* Altura fixa baseada no line-height */
  display: flex;
  align-items: center;
  font-size: 14px; /* MESMO tamanho da fonte dos números */
}

/* CORREÇÃO: Para blocos com scroll, garantir alinhamento perfeito */
.code-block-content.scrollable .code-block-line-numbers,
.code-block-content.scrollable .code-block-code {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* === TABELAS RESPONSIVAS === */
.api-table,
.api-error-table {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-collapse: collapse;
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
  display: table;
  word-break: keep-all;
}

.api-table th,
.api-error-table th {
  background: var(--bg-header);
  color: var(--text-main);
  font-weight: 500;
  text-align: left;
  padding: 0rem 1rem;
  font-size: 0.5rem;
  line-height: 1;
  height: auto;
  min-height: auto;
}

.api-table th,
.api-table td,
.api-error-table th,
.api-error-table td {
  border: 1px solid var(--border-color);
  vertical-align: top;
  word-break: normal;
  font-size: 0.875rem;
  line-height: 2;
}

.api-table td,
.api-error-table td {
  padding: 0.5rem 0.75rem;
}

.api-table code,
.api-error-table code {
  background: var(--bg-main);
  color: var(--text-main);
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  word-break: keep-all;
  font-size: 1em;
  line-height: 1.4;
}

.api-error-table tr:nth-child(even) {
  background: var(--bg-secondary);
}

/* Container responsivo para tabelas */
.api-table-container {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 6px;
  word-break: keep-all;
}

/* Estilos para mobile */
@media (max-width: 768px) {
  .api-table-container {
    margin: 1rem 0;
    border-radius: 4px;
  }

  .api-table,
  .api-error-table {
    min-width: 600px;
    margin: 0;
    border-radius: 0;
    border: none;
  }

  .api-table th,
  .api-table td,
  .api-error-table th,
  .api-error-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  .api-table th,
  .api-error-table th {
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    height: auto;
    vertical-align: middle;
  }

  /* Tabelas stack para mobile muito pequeno */
  @media (max-width: 480px) {
    .api-table,
    .api-error-table {
      min-width: 500px;
    }

    .api-table th,
    .api-table td,
    .api-error-table th,
    .api-error-table td {
      padding: 0.4rem 0.6rem;
      font-size: 0.85rem;
    }
  }

  /* Layout stack para tabelas em mobile muito pequeno */
  @media (max-width: 375px) {
    .api-table-container.stackable {
      overflow-x: visible;
    }

    .api-table-container.stackable .api-table,
    .api-table-container.stackable .api-error-table {
      min-width: auto;
      width: 100%;
      display: block;
    }

    .api-table-container.stackable .api-table thead,
    .api-table-container.stackable .api-error-table thead {
      display: none;
    }

    .api-table-container.stackable .api-table tbody,
    .api-table-container.stackable .api-error-table tbody {
      display: block;
    }

    .api-table-container.stackable .api-table tr,
    .api-table-container.stackable .api-error-table tr {
      display: block;
      margin-bottom: 1rem;
      border: 1px solid var(--border-color);
      border-radius: 4px;
      background: var(--bg-secondary);
    }

    .api-table-container.stackable .api-table td,
    .api-table-container.stackable .api-error-table td {
      display: block;
      text-align: left;
      border: none;
      border-bottom: 1px solid var(--border-color);
      position: relative;
      padding-left: 45%;
    }

    .api-table-container.stackable .api-table td:before,
    .api-table-container.stackable .api-error-table td:before {
      content: attr(data-label);
      position: absolute;
      left: 0.75rem;
      top: 50%;
      transform: translateY(-50%);
      font-weight: 600;
      color: var(--text-muted);
      width: 40%;
    }

    .api-table-container.stackable .api-table td:last-child,
    .api-table-container.stackable .api-error-table td:last-child {
      border-bottom: none;
    }
  }
}

/* === BOXES DE INFORMAÇÃO === */
.info-box,
.tip-box,
.warning-box {
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
  border-left: 4px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tip Box */
.tip-box {
  background: linear-gradient(
    135deg,
    rgba(var(--tip-color-rgb), 0.08) 0%,
    rgba(var(--tip-color-rgb), 0.03) 100%
  );
  border-left-color: var(--tip-color);
  border: 1px solid rgba(var(--tip-color-rgb), 0.2);
}

/* Info Box */
.info-box {
  background: linear-gradient(
    135deg,
    rgba(var(--info-color-rgb), 0.08) 0%,
    rgba(var(--info-color-rgb), 0.03) 100%
  );
  border-left-color: var(--info-color);
  border: 1px solid rgba(var(--info-color-rgb), 0.2);
}

/* Warning Box */
.warning-box {
  background: linear-gradient(
    135deg,
    rgba(var(--warning-color-rgb), 0.1) 0%,
    rgba(var(--warning-color-rgb), 0.05) 100%
  );
  border-left-color: var(--warning-color);
  border: 1px solid rgba(var(--warning-color-rgb), 0.3);
}

/* Efeitos de brilho nos boxes */
.tip-box::before,
.info-box::before,
.warning-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    currentColor 50%,
    transparent 100%
  );
  opacity: 0.5;
}

.tip-box::after,
.info-box::after,
.warning-box::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    currentColor 50%,
    transparent 100%
  );
  opacity: 0.5;
}

/* Títulos dos boxes */
.tip-box h3,
.info-box h3,
.warning-box h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tip-box h3 {
  color: var(--tip-color);
}

.info-box h3 {
  color: var(--info-color);
}

.warning-box h3 {
  color: var(--warning-color);
}

/* Ícones dos boxes */
.tip-box h3::before {
  content: "💡";
  font-size: 1.1rem;
}

.info-box h3::before {
  content: "ℹ️";
  font-size: 1.1rem;
}

.warning-box h3::before {
  content: "⚠️";
  font-size: 1.1rem;
}

/* Subtítulos dos boxes */
.tip-box h4,
.info-box h4,
.warning-box h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem 0;
}

.tip-box h4 {
  color: var(--tip-color);
}

.info-box h4 {
  color: var(--info-color);
}

.warning-box h4 {
  color: var(--warning-color);
}

/* Conteúdo dos boxes */
.tip-box p,
.info-box p,
.warning-box p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.tip-box p:last-child,
.info-box p:last-child,
.warning-box p:last-child {
  margin-bottom: 0;
}

/* Elementos strong e code dentro dos boxes */
.tip-box strong {
  color: var(--tip-color);
  font-weight: 600;
}

.tip-box code {
  background: rgba(var(--tip-color-rgb), 0.1);
  border: 1px solid rgba(var(--tip-color-rgb), 0.2);
  color: var(--tip-color);
  font-size: 1em;
  padding: 0.05rem 0.4rem;
}

.info-box strong {
  color: var(--info-color);
  font-weight: 600;
}

.info-box code {
  background: rgba(var(--info-color-rgb), 0.1);
  border: 1px solid rgba(var(--info-color-rgb), 0.2);
  color: var(--info-color);
  font-size: 1em;
  padding: 0.05rem 0.4rem;
}

.warning-box strong {
  color: var(--warning-color);
  font-weight: 600;
}

.warning-box code {
  background: rgba(var(--warning-color-rgb), 0.1);
  border: 1px solid rgba(var(--warning-color-rgb), 0.2);
  color: var(--warning-color);
  font-size: 1em;
  padding: 0.05rem 0.4rem;
}

/* Listas dentro dos boxes */
.tip-box ul,
.tip-box ol,
.info-box ul,
.info-box ol,
.warning-box ul,
.warning-box ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.tip-box li,
.info-box li,
.warning-box li {
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

/* Links dentro dos boxes */
.tip-box a,
.info-box a,
.warning-box a {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

.tip-box a:hover,
.info-box a:hover,
.warning-box a:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* === EXAMPLE TABS COMPACT - ESTILOS MELHORADOS === */
.example-tabs-compact {
  position: relative;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  width: 100%;
  color: var(--text-main);
  transition: all var(--transition-speed) ease;
}

/* Header com tabs à esquerda e título à direita */
.example-tabs-compact .code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-header);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

/* Container das tabs - melhorado */
.example-tabs-compact .example-tabs-header {
  display: flex;
  background: transparent;
  border-bottom: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  gap: 0.5rem;
  flex: 1;
}

/* Tabs melhoradas - usando primary-color com fonte maior */
.example-tabs-compact .example-tabs-tab {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem; /* Aumentado de 0.9rem para 1.05rem */
  font-weight: 500;
  padding: 0.65rem 1.3rem; /* Aumentado o padding para compensar */
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 6px;
  min-width: max-content;
  position: relative;
  overflow: hidden;
}

.example-tabs-compact .example-tabs-tab:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.1);
}

.example-tabs-compact .example-tabs-tab.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(var(--accent-color-rgb), 0.3);
  transform: translateY(0);
}

/* Efeito de brilho para a tab ativa */
.example-tabs-compact .example-tabs-tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 100%
  );
}

/* Título à direita - melhorado */
.example-tabs-compact .code-block-language {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-left: auto;
  padding-left: 1rem;
  border-left: 1px solid var(--border-color);
}

/* Conteúdo do código - scroll horizontal apenas */
.example-tabs-compact .code-block-content {
  display: block;
  overflow-x: auto;
  background: var(--bg-secondary);
  padding: 0;
  border-radius: 0 0 8px 8px;
}

.example-tabs-compact .code-block-code {
  background: transparent;
  margin: 0;
  padding: 1.25rem;
  color: inherit;
  overflow-x: auto;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre;
  word-wrap: normal;
  word-break: normal;
  display: block;
  min-height: 60px;
}

.example-tabs-compact .code-block-code code {
  display: block;
  white-space: pre;
  word-wrap: normal;
  word-break: normal;
  font-family: inherit;
  background: transparent;
  color: inherit;
}

/* Estados de foco para acessibilidade */
.example-tabs-compact .example-tabs-tab:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  z-index: 1;
}

.example-tabs-compact .example-tabs-tab:focus-visible {
  background: var(--bg-hover);
  color: var(--text-main);
}

.example-tabs-compact .example-tabs-tab.active:focus {
  outline-color: rgba(255, 255, 255, 0.8);
}

/* Responsividade para tablets */
@media (max-width: 1024px) {
  .example-tabs-compact .code-block-header {
    padding: 0.6rem 0.8rem;
  }

  .example-tabs-compact .example-tabs-tab {
    font-size: 1rem; /* Ajustado de 0.85rem para 1rem */
    padding: 0.55rem 1.1rem; /* Ajustado o padding */
  }

  .example-tabs-compact .code-block-code {
    padding: 1rem;
    font-size: 13px;
  }
}

/* Responsividade para mobile */
@media (max-width: 768px) {
  .example-tabs-compact .code-block-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .example-tabs-compact .example-tabs-header {
    order: 1;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .example-tabs-compact .code-block-language {
    order: 2;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    text-align: center;
    width: 100%;
  }

  .example-tabs-compact .example-tabs-tab {
    font-size: 0.95rem; /* Aumentado de 0.8rem para 0.95rem */
    padding: 0.55rem 1rem; /* Ajustado o padding */
  }
}

/* Mobile muito pequeno - tabs empilhadas */
@media (max-width: 480px) {
  .example-tabs-compact .example-tabs-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .example-tabs-compact .example-tabs-tab {
    text-align: left;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem; /* Aumentado de tamanho padrão para 0.9rem */
    padding: 0.6rem 0.9rem; /* Ajustado o padding */
  }

  .example-tabs-compact .example-tabs-tab.active {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(
      135deg,
      rgba(var(--accent-color-rgb), 0.15) 0%,
      rgba(var(--accent-secondary-rgb), 0.08) 100%
    );
    color: var(--primary-color);
  }

  .example-tabs-compact .code-block-code {
    padding: 0.875rem;
    font-size: 12px;
  }
}

/* === NAVEGAÇÃO E RODAPÉ === */

/* Navegação Fixa */
/* === NAVEGAÇÃO APENAS COM TEXTO === */

.api-navigation-footer {
  display: block;
  padding: 2rem 0 1rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  width: 100%;
}

.api-navigation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.api-text-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 0;
  box-shadow: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.api-text-link:hover {
  background: transparent;
  color: var(--link-hover);
  transform: translateY(-1px);
  box-shadow: none;
  text-decoration: underline;
}

.api-text-link.prev,
.api-text-link.next {
  background: transparent;
  color: var(--link-color);
  border: none;
}

.api-text-link.primary {
  font-size: 1.1rem;
}

.api-nav-placeholder {
  display: none; /* Remover placeholders completamente */
}

.api-navigation-center {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Correção final para o footer mobile */
@media (max-width: 768px) {
  .api-navigation-footer {
    padding: 1.5rem 0;
  }

  .api-navigation-row {
    gap: 1rem !important;
    justify-content: space-between !important;
    padding: 0 1rem;
    max-width: 100%;
    flex-wrap: nowrap;
  }

  .api-text-link {
    flex: 0 0 auto !important;
    white-space: nowrap;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .api-navigation-row {
    gap: 0.5rem !important;
    padding: 0 0.75rem;
  }

  .api-text-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
  }
}

/* MOBILE MUITO PEQUENO - AINDA UM AO LADO DO OUTRO */
@media (max-width: 375px) {
  .api-navigation-row {
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 0.25rem;
    padding: 0 0.5rem;
  }

  .api-text-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.25rem;
    flex: 0 0 auto !important;
  }

  /* Texto mais compacto se necessário */
  .api-text-link.prev {
    content: "← Anterior";
  }

  .api-text-link.next {
    content: "Próximo →";
  }
}

/* GARANTIR QUE NUNCA VIRE COLUNA */
.api-navigation-row {
  flex-direction: row !important;
}

.api-text-link {
  display: inline-flex !important;
}

/* Remover completamente qualquer estilo de coluna */
.api-navigation-footer .api-navigation-row {
  flex-direction: row !important;
}

/* Remover estilos antigos de botão */
.api-nav-button,
.api-nav-button-center,
.api-nav-button.prev,
.api-nav-button.next {
  display: none;
}

/* Rodapé */
.api-footer {
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border-color);
  position: relative;
  background: #000000;
}

.api-footer-social-links {
  display: flex;
  justify-content: space-between; /* Mantém os botões espaçados igualmente */
  align-items: center;
  max-width: 1500px; /* Aumentei a largura máxima */
  margin: 0 auto 1.5rem auto;
  gap: 1.5rem; /* Aumentei o gap entre os botões */
  padding: 0 1rem; /* Adicionei padding lateral */
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem; /* Aumentei o padding para botões maiores */
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem; /* Aumentei ligeiramente a fonte */
  transition: all 0.2s ease;
  flex: 1;
  background: transparent;
  border: 1.5px solid;
  color: var(--text-secondary);
  text-align: center;
  min-height: 36px; /* Aumentei a altura mínima */
  max-width: 220px; /* Limite máximo para cada botão */
  margin: 0 0.25rem; /* Pequena margem entre os botões */
}

.social-link:hover {
  transform: translateY(-2px); /* Efeito hover mais pronunciado */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cores temáticas apenas nas bordas */
.social-link.youtube {
  border-color: #ff0000;
  color: #ff0000;
}

.social-link.youtube:hover {
  background: #ff0000;
  color: white;
}

.social-link.twitch {
  border-color: #6441a5;
  color: #6441a5;
}

.social-link.twitch:hover {
  background: #6441a5;
  color: white;
}

.social-link.twitter {
  border-color: #1da1f2;
  color: #1da1f2;
}

.social-link.twitter:hover {
  background: #1da1f2;
  color: white;
}

.social-link.discord {
  border-color: #7289da;
  color: #7289da;
}

.social-link.discord:hover {
  background: #7289da;
  color: white;
}

.social-link.talita {
  border-color: #a63f8a;
  color: #a63f8a;
}

.social-link.talita:hover {
  background: #a63f8a;
  color: white;
}

.api-footer-copyright {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  max-width: 500px;
  margin: 0 auto;
}

/* Responsividade */
@media (max-width: 768px) {
  .api-footer-social-links {
    flex-wrap: wrap;
    gap: 0.75rem; /* Aumentei o gap no mobile */
    justify-content: center; /* Centraliza no mobile */
  }

  .social-link {
    min-width: 140px; /* Aumentei a largura mínima */
    flex: 0 1 calc(50% - 0.75rem); /* Ajuste para 2 colunas */
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    margin: 0;
  }

  .api-footer {
    padding: 1rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .api-footer-social-links {
    flex-direction: row; /* Mantém em linha mesmo no mobile pequeno */
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .social-link {
    width: calc(50% - 0.5rem); /* 2 botões por linha */
    max-width: none;
    min-width: auto;
  }
}

/* Para telas muito pequenas onde 4 botões ficam apertados */
@media (max-width: 360px) {
  .api-footer-social-links {
    gap: 0.4rem;
  }

  .social-link {
    width: calc(50% - 0.4rem);
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* === COMPONENTES ADICIONAIS === */

/* Barra de Progresso */
.api-scroll-progress {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--link-color), var(--link-hover));
  z-index: 1001;
  transition: width 0.12s linear;
}

/* Âncoras */
.api-content [id] {
  scroll-margin-top: 90px;
  position: relative;
}

.api-content [id]:target {
  background-color: rgba(161, 161, 221, 0.1);
  border-left: 3px solid var(--link-color);
  padding-left: 10px;
  margin-left: -13px;
  transition: all var(--transition-speed) ease;
  border-radius: 0 4px 4px 0;
}

.api-page-section h2[id]:target::before,
.api-page-section h3[id]:target::before,
.api-page-section h4[id]:target::before {
  position: absolute;
  left: -30px;
  opacity: 0.7;
  font-size: 0.8em;
}

/* Última Atualização */
.api-last-updated {
  text-align: right;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 20px 10px 0;
  opacity: 0.8;
  display: flex;
  justify-content: flex-end;
}

.api-last-updated span {
  font-style: italic;
}

/* Componentes de Seção */
.api-section {
  padding: 1rem 0 2rem 0;
}

.api-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.api-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.divider {
  border-bottom: 1px solid var(--border-color);
  margin: 1.5rem 0;
}

/* === ÍCONES NOS TÍTULOS === */
.api-page-section h1 {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.api-page-section h1 svg {
  width: 3rem;
  height: 3rem;
  margin-right: 1rem;
  color: var(--accent-color);
}

.api-page-section h2 {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.api-page-section h2 svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.25rem;
  color: var(--accent-color);
}

/* Ícones nos títulos das tabelas */
.api-page-section h3,
.api-page-section h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-page-section h3 svg,
.api-page-section h3 img {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
}

.api-sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.api-sidebar .menu-icon {
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.api-sidebar ul li a.active .menu-icon {
  color: var(--accent-secondary);
}

/* Container para ícone e título da seção */
.sidebar-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-left: 10px;
}

.sidebar-section-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Ajuste para alinhar com os itens do menu */
.sidebar-section-header .menu-icon {
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* === ÍCONES SIMPLES - MODO CLARO/ESCURO === */
.api-page-section h3 img {
  filter: brightness(0) invert(1);
  width: 24px;
  height: 24px;
  margin-left: 8px;
  vertical-align: middle;
}

body.light-mode .api-page-section h3 img {
  filter: brightness(0) invert(0);
}

.api-sidebar a,
.api-footer a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.api-footer a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

a,
a:visited,
a:active,
a:hover {
  text-decoration: none !important;
}

/* === CORREÇÕES PARA LINKS === */
.api-page-section a {
  text-decoration: none !important;
  color: var(--link-color);
  transition: color 0.2s ease;
}

.api-page-section a:hover {
  color: var(--link-hover) !important;
  text-decoration: none !important;
}

/* Especificamente para links em headings */
.api-page-section h1 a,
.api-page-section h2 a,
.api-page-section h3 a,
.api-page-section h4 a,
.api-page-section h5 a,
.api-page-section h6 a {
  text-decoration: none !important;
  color: var(--link-color);
}

.api-page-section h1 a:hover,
.api-page-section h2 a:hover,
.api-page-section h3 a:hover,
.api-page-section h4 a:hover,
.api-page-section h5 a:hover,
.api-page-section h6 a:hover {
  color: var(--link-hover) !important;
  text-decoration: none !important;
}

/* Remove qualquer sublinhado de links globalmente */
a {
  text-decoration: none !important;
}

a:hover {
  text-decoration: none !important;
}

.api-popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.api-popup-content {
  background: #fff;
  color: #000;
  padding: 2rem;
  border-radius: 12px;
  width: 80%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Garantir que a navegação do footer seja visível */
.api-navigation-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.api-navigation-row {
  display: flex;
  justify-content: center;
  gap: 700px;
}
.api-nav-placeholder {
  flex: 1;
}

.api-nav-button {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.api-nav-button.prev {
  background: var(--secondary-color);
}

.api-nav-button.next {
  background: var(--accent-color);
}

.api-navigation-center {
  display: flex;
  justify-content: center;
  width: 100%;
}

.api-page-section h2 img {
  filter: var(--icon-filter-custom);
  width: 24px;
  height: 24px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.api-page-section h1 img {
  filter: var(--icon-filter-custom);
  width: 50px;
  height: 50px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* === TOOLBAR MOBILE === */

/* Menu Hamburger para Sidebar (ESQUERDA) */
.api-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  z-index: 1002;
  outline: none;
  margin-right: 1rem;
}

/* Menu Hamburger para Topbar (DIREITA) */
.api-topbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin-left: auto;
  z-index: 1002;
  outline: none;
}

.api-sidebar-toggle .hamburger-line,
.api-topbar-toggle .hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  margin: 3px 0;
  transition: all var(--transition-speed) ease;
  border-radius: 2px;
  transform-origin: center;
}

/* Estado ABERTO - Transforma em X */
.api-sidebar-toggle.active .hamburger-line:nth-child(1),
.api-topbar-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.api-sidebar-toggle.active .hamburger-line:nth-child(2),
.api-topbar-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.api-sidebar-toggle.active .hamburger-line:nth-child(3),
.api-topbar-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mostrar apenas em mobile */
@media (max-width: 768px) {
  .api-sidebar-toggle,
  .api-topbar-toggle {
    display: flex;
  }
}

/* Itens do Menu */
.api-topbar-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
  transition: all var(--transition-speed) ease;
}

.api-topbar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-topbar-item a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.api-topbar-item a:hover {
  color: var(--link-hover);
}

/* Overlay para Mobile */
/* Overlay do Topbar - CORREÇÃO: Garantir que funcione */
.api-topbar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  z-index: 999;
}

.api-topbar-overlay.active {
  display: block;
  opacity: 1;
}

/* === SCROLLBARS CONSISTENTES (GLOBAL) === */

/* Geral — aplica a todo o conteúdo rolável */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--bg-header);
}

*::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
  transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--link-hover);
}

/* BLOCO DE CÓDIGO — ROLAGEM UNIFICADA */
.code-block-content {
  overflow-x: auto;
  overflow-y: auto;
}

.code-block-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code-block-content::-webkit-scrollbar-track {
  background: var(--bg-header);
}

.code-block-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.code-block-content::-webkit-scrollbar-thumb:hover {
  background: var(--link-hover);
}

/* CONTEÚDO PRINCIPAL — ROLAGEM UNIFICADA */
.api-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.api-content::-webkit-scrollbar-track {
  background: var(--bg-header);
}

.api-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.api-content::-webkit-scrollbar-thumb:hover {
  background: var(--link-hover);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-header);
}

.line-number {
  padding: 0 0.5rem;
  line-height: 1.5;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 14px;
}

/* === RESPONSIVIDADE === */

/* Tablet */
@media (max-width: 1024px) {
  .api-navigation-fixed {
    left: 2rem;
    right: 2rem;
    bottom: 180px;
  }

  .api-footer-content {
    padding: 1.5rem 2rem;
  }

  .api-content {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .api-topbar-menu {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    gap: 0.75rem;
  }

  .api-topbar-item {
    font-size: 0.9rem;
  }

  /* Tabs responsivas para tablet */
  .example-tabs-header,
  .tab {
    flex-wrap: wrap;
    gap: 0;
  }

  .example-tabs-tab,
  .tab-links {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .example-tabs-content,
  .tab-content {
    padding: 1.25rem;
    font-size: 13px;
  }
}

/* Mobile */
/* Estado mobile - CORREÇÃO: Classes mais específicas */
@media (max-width: 768px) {
  .api-topbar-menu {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: 100%;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  /* CORREÇÃO: Classe active mais específica */
  .api-topbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* CORREÇÃO: Garantir que o body tenha a classe quando menu estiver aberto */
  body.topbar-mobile-open {
    overflow: hidden;
  }

  .api-topbar-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    justify-content: flex-start;
    margin: 0;
  }

  .api-topbar-item:last-child {
    border-bottom: none;
  }

  .api-topbar-item a {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 1rem;
  }

  .api-theme-toggle-container {
    margin-left: 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
  }

  .api-theme-toggle-container:last-child {
    border-bottom: none;
  }

  .api-theme-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 0;
  }

  .theme-toggle-label {
    font-size: 1rem;
    order: -1;
  }

  .api-navigation-buttons.edge-aligned {
    padding: 0 15px;
  }

  .api-sidebar {
    transform: translateX(-100%);
    width: 85%;
    max-width: 300px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

  .api-sidebar.open {
    transform: translateX(0);
  }

  .api-content.sidebar-open {
    margin-left: 0;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .api-navigation-fixed {
    left: 1rem;
    right: 1rem;
    bottom: 160px;
    padding: 0.5rem 1rem;
  }

  .api-navigation-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .api-nav-button,
  .api-nav-button-center {
    padding: 0.5rem;
    font-size: 1rem;
  }

  .api-nav-button-center {
    font-size: 1.1rem;
  }

  .api-footer-content {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    text-align: center;
  }

  .api-footer-social,
  .api-footer-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .api-footer-social a,
  .api-footer-links a {
    font-size: 0.85rem;
  }

  .api-footer-copyright {
    font-size: 0.8rem;
    margin: 0.25rem 0;
    order: 3;
  }

  .api-footer-social {
    order: 1;
  }
  .api-footer-links {
    order: 2;
  }

  .api-content {
    margin-left: 0;
    padding: 1.5rem;
    padding-bottom: 2rem;
    transition: margin-left var(--transition-speed) ease;
  }

  /* Topbar Menu Mobile */
  .api-topbar-menu {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: 100%;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  body.topbar-mobile-open .api-topbar-menu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .api-topbar-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    justify-content: flex-start;
    margin: 0;
  }

  .api-topbar-item:last-child {
    border-bottom: none;
  }

  .api-topbar-item a {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 1rem;
  }

  .api-theme-toggle:last-child {
    border-bottom: none;
  }

  /* Ajuste do título em mobile */
  .api-title-link h1 {
    font-size: 1rem;
  }

  .api-logo {
    width: 28px;
    height: 28px;
  }

  :root {
    --footer-height: 200px;
  }

  /* Garantir que a sidebar mobile funcione corretamente */
  .api-sidebar.open {
    transform: translateX(0);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  }

  .api-sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  .api-sidebar-list {
    padding-bottom: 80px; /* Espaço para o footer mobile */
  }
}

/* Mobile - Tabs empilhadas verticalmente */
@media (max-width: 640px) {
  .example-tabs,
  .tab {
    border-radius: 6px;
  }

  .example-tabs-header,
  .tab {
    flex-direction: column;
    border-bottom: none;
    gap: 1px;
  }

  .example-tabs-tab,
  .tab-links {
    flex: none;
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    min-width: auto;
  }

  .example-tabs-tab:last-child,
  .tab-links:last-child {
    border-bottom: none;
  }

  .example-tabs-tab.active,
  .tab-links.active {
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    background: linear-gradient(
      135deg,
      rgba(var(--accent-color-rgb), 0.1) 0%,
      rgba(var(--accent-secondary-rgb), 0.05) 100%
    );
  }

  .example-tabs-tab.active::after,
  .tab-links.active::after {
    display: none;
  }

  .example-tabs-content,
  .tab-content {
    padding: 1rem;
    font-size: 12px;
    border-top: 1px solid var(--border-color);
  }
}

/* Mobile Pequeno */
@media (max-width: 480px) {
  .api-navigation-fixed {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 140px;
    padding: 0.25rem 0.5rem;
  }

  .api-nav-button,
  .api-nav-button-center {
    font-size: 0.95rem;
  }

  .api-nav-button-center {
    font-size: 1rem;
  }

  .api-footer-content {
    padding: 1.25rem 1rem;
    gap: 0.75rem;
  }

  .api-sidebar {
    width: 90%;
  }

  .api-footer-social,
  .api-footer-links {
    gap: 0.75rem;
  }

  .api-content {
    padding: 1.2rem;
  }

  .api-footer-social a,
  .api-footer-links a {
    font-size: 0.8rem;
  }

  .api-footer-copyright {
    font-size: 0.75rem;
  }

  .api-topbar-menu {
    padding: 0.75rem;
  }

  .api-topbar-item {
    padding: 0.5rem 0;
  }

  .api-topbar-item a {
    font-size: 0.95rem;
  }

  /* Ajustes finos para tabs em mobile pequeno */
  .example-tabs-tab,
  .tab-links {
    padding: 0.875rem 0.75rem;
    font-size: 0.8rem;
  }

  .example-tabs-content,
  .tab-content {
    padding: 0.875rem;
    font-size: 11px;
  }

  .example-tabs-title {
    font-size: 1rem;
  }

  :root {
    --footer-height: 220px;
  }
}

/* Mobile Muito Pequeno */
@media (max-width: 375px) {
  .api-navigation-fixed {
    left: 0.25rem;
    right: 0.25rem;
    bottom: 120px;
    padding: 0.25rem;
  }

  .api-footer-content {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }

  .api-sidebar {
    width: 95%;
  }

  .api-footer-social,
  .api-footer-links {
    gap: 0.5rem;
  }

  .api-footer-social a,
  .api-footer-links a {
    font-size: 0.75rem;
  }

  .api-footer-copyright {
    font-size: 0.7rem;
  }

  .api-title-link h1 {
    font-size: 0.9rem;
  }

  .api-logo {
    width: 24px;
    height: 24px;
  }

  .api-topbar {
    padding: 0.74rem;
  }

  :root {
    --footer-height: 240px;
  }
}

/* === UTILITÁRIOS === */
.api-footer-wrapper {
  margin-top: auto;
}

/* Acessibilidade - Redução de Movimento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Foco Visível para Acessibilidade */
.api-sidebar a:focus,
.api-nav-button:focus,
.api-theme-toggle:focus,
.api-topbar-toggle:focus,
.api-footer a:focus,
.example-tabs-tab:focus,
.tab-links:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  z-index: 1;
  outline: none;
}

/* Navegação por teclado para tabs */
.example-tabs-tab:focus-visible,
.tab-links:focus-visible {
  background: var(--bg-hover);
  color: var(--text-main);
}

.example-tabs-tab.active:focus,
.tab-links.active:focus {
  outline-color: var(--accent-secondary);
}

/* Scrollbar Personalizada */
.api-sidebar::-webkit-scrollbar,
.code-block-content::-webkit-scrollbar {
  width: 6px;
}

.api-sidebar::-webkit-scrollbar-track,
.code-block-content::-webkit-scrollbar-track {
  background: var(--bg-main);
}

.api-sidebar::-webkit-scrollbar-thumb,
.code-block-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.api-sidebar::-webkit-scrollbar-thumb:hover,
.code-block-content::-webkit-scrollbar-thumb:hover {
  background: var(--link-color);
}

.code-block-content::-webkit-scrollbar {
  height: 8px;
}

.code-block-content::-webkit-scrollbar-track {
  background: var(--bg-header);
}

.code-block-content::-webkit-scrollbar-thumb {
  border-radius: 4px;
}

/* === ESTADOS DE CARREGAMENTO PARA TABS === */
.example-tabs.loading .example-tabs-content,
.tab.loading .tab-content {
  position: relative;
  min-height: 100px;
}

.example-tabs.loading .example-tabs-content::after,
.tab.loading .tab-content::after {
  content: "Carregando...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-style: italic;
}

/* === UTILITÁRIOS PARA TABS === */

/* Tabs com ícones */
.example-tabs-tab.with-icon,
.tab-links.with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.example-tabs-tab.with-icon i,
.tab-links.with-icon i {
  font-size: 1rem;
  opacity: 0.8;
}

/* Tabs desabilitadas */
.example-tabs-tab:disabled,
.tab-links:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* === AJUSTES DE IMPRESSÃO === */
@media print {
  .example-tabs-header,
  .tab {
    display: none;
  }

  .example-tabs-content,
  .tab-content {
    display: block !important;
    border: 1px solid #ccc;
    background: white;
    color: black;
  }
}

/* BLOQUEIO DE ABRIR IMAGENS EM NOVA ABA */
.content-home-icon-logo,
.content-home-icon-footer-heart,
.content-icon-logo {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

/* BLOQUEIO DE ABRIR IMAGENS EM NOVA ABA */
.content-image-logo {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

/* Garantir que todas as imagens dentro de links não sejam clicáveis separadamente */
.table a img {
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Bloquear menu de contexto em imagens */
img {
  -webkit-context-menu: none;
  -moz-context-menu: none;
  -ms-context-menu: none;
}

/* === NOVOS ESTILOS PARA O TOGGLE SWITCH COM TEXTO === */

.api-theme-toggle-container {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.api-theme-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all var(--transition-speed) ease;
  color: var(--text-main);
}

/* Modo Escuro (desligado) - Luz apagada */
.api-theme-switch.dark .api-theme-switch-track {
  background: var(--bg-secondary); /* Fundo cinza */
  border: 1px solid var(--border-color);
}

.api-theme-switch.dark .api-theme-switch-thumb {
  background: white; /* Círculo branco */
  transform: translateX(0);
}

/* Modo Claro (ativado) - Luz acesa */
.api-theme-switch.light .api-theme-switch-track {
  background: var(--accent-secondary); /* Fundo accent-secondary */
  border: 1px solid var(--accent-color);
}

.api-theme-switch.light .api-theme-switch-thumb {
  background: var(--accent-color); /* Círculo accent-color */
  transform: translateX(22px);
}

.api-theme-switch-track {
  position: relative;
  width: 44px;
  height: 22px;
  border-radius: 11px;
  padding: 2px;
  transition: all var(--transition-speed) ease;
}

.api-theme-switch-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.theme-toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition-speed) ease;
  color: var(--text-muted);
}

.api-theme-switch:hover .theme-toggle-label {
  color: var(--text-main);
}

/* Estados de foco para acessibilidade */
.api-theme-switch:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.api-theme-switch:focus:not(:focus-visible) {
  outline: none;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
  .api-theme-toggle-container {
    margin-left: 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
  }

  .api-theme-switch {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 0;
  }

  .theme-toggle-label {
    font-size: 1rem;
    order: -1;
  }

  .api-theme-switch-track {
    width: 48px;
    height: 24px;
  }

  .api-theme-switch-thumb {
    width: 18px;
    height: 18px;
  }

  .api-theme-switch.light .api-theme-switch-thumb {
    transform: translateX(24px);
  }
}

/* Mobile muito pequeno */
@media (max-width: 480px) {
  .api-theme-switch {
    gap: 0.5rem;
  }

  .theme-toggle-label {
    font-size: 0.9rem;
  }

  .api-theme-switch-track {
    width: 42px;
    height: 22px;
  }

  .api-theme-switch-thumb {
    width: 16px;
    height: 16px;
  }

  .api-theme-switch.light .api-theme-switch-thumb {
    transform: translateX(20px);
  }
}

/* === ANIMAÇÕES PARA O TOGGLE SWITCH === */
@keyframes slide-in {
  from {
    transform: translateX(0) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translateX(22px) scale(1);
    opacity: 1;
  }
}

@keyframes slide-out {
  from {
    transform: translateX(22px) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

.api-theme-switch.light .api-theme-switch-thumb {
  animation: slide-in 0.2s ease-out;
}

.api-theme-switch.dark .api-theme-switch-thumb {
  animation: slide-out 0.2s ease-out;
}

/* === CORREÇÃO DE RESPONSIVIDADE PARA H3 NO DESKTOP === */

/* Ajustes específicos para h3 em desktop - JÁ APLICADO ACIMA */
.api-page-section h3 svg,
.api-page-section h3 img {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
}

/* Responsividade para h3 - mantendo consistência com h2 */
@media (max-width: 1024px) {
  .api-page-section h3 {
    font-size: 1.4rem;
    margin: 2.25rem 0 0.9rem 0;
    line-height: 1.35;
    white-space: normal;
    word-wrap: break-word;
  }

  .api-page-section h2 {
    font-size: 1.8rem;
    margin: 0 0 1.25rem 0;
  }
}

@media (max-width: 768px) {
  .api-page-section h3 {
    font-size: 1.3rem;
    margin: 2rem 0 0.8rem 0;
    padding-top: 6px;
    margin-top: 6px;
    line-height: 1.3;
    border-bottom-width: 1px;
    padding-bottom: 0.4rem;
    white-space: normal;
    word-wrap: break-word;
  }

  .api-page-section h2 {
    font-size: 1.6rem;
    margin: 0 0 1rem 0;
    padding-top: 8px;
    margin-top: 8px;
    border-bottom-width: 1px;
  }

  /* h3 com ícones em mobile */
  .api-page-section h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .api-page-section h3 svg,
  .api-page-section h3 img {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.3rem;
  }
}

@media (max-width: 480px) {
  .api-page-section h3 {
    font-size: 1.2rem;
    margin: 1.75rem 0 0.7rem 0;
    padding-top: 4px;
    margin-top: 4px;
    line-height: 1.25;
    padding-bottom: 0.3rem;
    white-space: normal;
    word-wrap: break-word;
  }

  .api-page-section h2 {
    font-size: 1.4rem;
    margin: 0 0 0.8rem 0;
    padding-top: 6px;
    margin-top: 6px;
  }
}

/* Correção para h3 em boxes informativos */
@media (max-width: 768px) {
  .tip-box h3,
  .info-box h3,
  .warning-box h3 {
    font-size: 1.1rem;
    margin: 0 0 0.9rem 0;
    line-height: 1.3;
    white-space: normal;
    word-wrap: break-word;
  }
}

/* === CORREÇÃO DE RESPONSIVIDADE PARA H4 === */

/* Ajustes específicos para h4 em mobile */
@media (max-width: 768px) {
  .api-page-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem 0;
    color: var(--text-main);
    padding-top: 6px;
    margin-top: 6px;
    line-height: 1.3;
  }
}

/* Ajustes para mobile muito pequeno */
@media (max-width: 480px) {
  .api-page-section h4 {
    font-size: 1.05rem;
    margin: 1rem 0 0.4rem 0;
    padding-top: 4px;
    margin-top: 4px;
    line-height: 1.25;
  }
}

/* Garantir que h4 com ícones também sejam responsivos */
@media (max-width: 768px) {
  .api-page-section h4 {
    display: flex;
    align-items: center;
    white-space: normal; /* Permite quebra de linha em mobile */
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .api-page-section h4 svg,
  .api-page-section h4 img {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    margin-right: 0.3rem;
  }
}

/* === CORREÇÃO PARA IMAGEM E TEXTO NA MESMA LINHA EM MOBILE === */

/* Para th com h3 em mobile */
@media (max-width: 768px) {
  .api-table th h3,
  .api-error-table th h3 {
    display: flex;
    justify-content: normal;
    gap: 0.5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin: 0;
    padding: 5;
    font-size: 1rem;
    line-height: 1;
  }

  .api-table th h3 img,
  .api-error-table th h3 img {
    margin: 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .api-table th h3,
  .api-error-table th h3 {
    font-size: 1rem;
    gap: 0.3rem;
    padding: 5;
  }

  .api-table th h3 img,
  .api-error-table th h3 img {
    width: 14px;
    height: 14px;
  }
}

.danger-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.danger-btn:hover {
  background: #c82333;
  transform: translateY(-2px);
}
