/* Small adjustments to the theme's layout, desktop widths only. */

/* Pages with a hidden table of contents (home) keep the same right edge as the
   others: the empty sidebar still takes its place, invisibly. */
@media screen and (min-width: 60em) {
  .md-sidebar--secondary[hidden] {
    display: block;
    visibility: hidden;
  }
}

@media screen and (min-width: 76.25em) {
  /* With tabs, the left sidebar stays empty: make it narrower so the content
     column gets a bit wider on the left (default width: 12.1rem). */
  .md-sidebar--primary {
    width: 6rem;
  }
  /* Same right margin the theme gives the content next to a visible table of contents */
  .md-sidebar--secondary[hidden] ~ .md-content > .md-content__inner {
    margin-right: 1.2rem;
  }
}

/* Header links next to the search bar (overrides/partials/alternate.html) */
.la-header-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.la-header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.45rem;
  border: 0;
  border-radius: 0.2rem;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0.85;
}
.la-header-link:hover,
.la-header-link:focus-visible {
  opacity: 1;
  background: var(--md-default-fg-color--lightest);
}
.la-header-link svg {
  width: 1rem;
  height: 1rem;
}
/* Brand icons are filled shapes; outline icons (fill="none") keep their stroke */
.la-header-link svg:not([fill="none"]) {
  fill: currentColor;
}
/* Small screens: icons only (the label still shows "Copied" after a click) */
@media screen and (max-width: 59.984em) {
  .la-header-link span {
    display: none;
  }
  .la-header-link.copied span {
    display: inline;
  }
}

/* Header order: content links first, then the light/dark toggle and search at the right
   (the theme renders the toggle before the links slot). Items keep order 0 otherwise. */
.md-header__inner > [data-md-component="palette"] {
  order: 1;
}
.md-header__inner > label[for="__search"],
.md-header__inner > .md-search,
.md-header__inner > .md-header__source {
  order: 2;
}
