/* "View as Markdown" button, shown inline with the breadcrumbs row. */
.doc-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  /* Reproduce the breadcrumb's own vertical rhythm on the row, since we zero its
     margins below so it aligns with the button. */
  margin: -1rem 0 0.75rem;
}

/* Neutralize the theme's breadcrumb margins (negative top + list bottom) that
   would otherwise vertically offset it from the button. */
.doc-topbar .breadcrumb-nav,
.doc-topbar .breadcrumb-nav-list {
  margin: 0;
}

/* Render each crumb (text + its "/" separator) as one non-breaking inline unit.
   The row then wraps the button to the next line first; a too-wide breadcrumb
   wraps between crumbs instead of orphaning a slash. */
.doc-topbar .breadcrumb-nav-list-item {
  display: inline;
  white-space: nowrap;
}

.md-view-btn {
  margin-left: auto; /* keep it right-aligned even when there is no breadcrumb */
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.45em 0.7em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.md-view-btn:hover,
.md-view-btn:focus {
  opacity: 1;
  border-color: #e3007e;
  color: #fff;
  text-decoration: none;
}

.md-view-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Sidebar footer tools: language dropdown + llms.txt link. */
.site-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

/* Shared light pill for the language toggle and the llms.txt button. */
.sidebar-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.5em 0.7em;
  border: 1px solid #0d1a5e;
  border-radius: 6px;
  background: #0a1550;
  color: #c8d0e8;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sidebar-tool:hover,
.sidebar-tool:focus {
  border-color: #e3007e;
  text-decoration: none;
}

.sidebar-tool svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Language dropdown — native <details> disclosure, opens upward. */
.lang-switcher {
  position: relative;
}

.lang-switcher > summary {
  list-style: none;
  min-width: 8rem;
}

.lang-switcher > summary::-webkit-details-marker {
  display: none;
}

.lang-switcher .lang-current {
  margin-right: auto;
}

.lang-switcher .chevron {
  transition: transform 0.15s ease;
}

.lang-switcher[open] .chevron {
  transform: rotate(180deg);
}

.lang-switcher-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.25rem;
  background: #050e42;
  border: 1px solid #0d1a5e;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.lang-switcher-menu a,
.lang-switcher-menu span {
  padding: 0.35em 0.6em;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  color: #c8d0e8;
  text-decoration: none;
}

.lang-switcher-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-switcher-menu .is-current {
  font-weight: 600;
  color: #7aa4f0;
}

/* Footer pointer to the llms.txt index, rendered as a light pill button. */
.site-llms-link {
  margin-top: 1rem;
}

.llms-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.5em 0.8em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.llms-btn:hover,
.llms-btn:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #e3007e;
  text-decoration: none;
}

.llms-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Content-type tabs at the top of the sidebar (Documentação / API / Novidades).
   Left-aligned; the active tab follows the current page. Markup in
   components/sidebar.html. */
.nav-tabs {
  display: flex;
  gap: 1.25rem;
  padding: 0 1rem;
  border-bottom: 1px solid #0d1a5e;
  margin-bottom: 0.75rem;
}

.nav-tab {
  padding: 0.6rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  color: #8899cc;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; /* overlap the container's border */
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-tab:hover,
.nav-tab:focus {
  color: #c8d0e8;
  text-decoration: none;
}

.nav-tab.active {
  color: #ffffff;
  border-bottom-color: #e3007e;
}
