/* Import Montserrat Alternates font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;700&display=swap');

/* Sidebar navigation color overrides */
/* Section titles (top-level) */
.book-menu li.book-section > a,
.book-menu li.book-section-flat > a,
.book-menu .book-menu-content > ul > li > a,
.book-menu .book-menu-content nav > ul > li > a,
.book-menu li.book-section > label,
.book-menu li.book-section > summary,
.book-menu .book-menu-content > ul > li > label,
.book-menu .book-menu-content > ul > li > summary,
.book-menu .book-menu-content nav > ul > li > label,
.book-menu .book-menu-content nav > ul > li > summary {
  color: #384058 !important;
}

/* File/page links (nested items) */
.book-menu li.book-section ul a,
.book-menu li.book-section-flat ul a,
.book-menu .book-menu-content > ul > li ul a,
.book-menu .book-menu-content nav > ul > li > ul > li > a,
.book-menu nav ul li ul li > a,
.book-menu nav ul li ul li > a.active,
.book-menu nav ul li ul li > a[aria-current="page"],
.book-menu nav ul li ul li > a[aria-current="true"] {
  color: #545b74 !important;
}

/* Normalize nested list indent so Trainer matches other sections */
.book-menu .book-menu-content nav > ul > li > ul {
  padding-inline-start: 0 !important;
  margin: 0; /* keep consistent spacing */
}

/* CoMLRL brand title/link (darkest gray) */
.book-brand,
.book-brand a {
  color: #202532 !important;
}

/* Ensure sidebar logo displays at readable size */
.book-brand img {
  width: 200px;
  height: auto;
  display: block;
}

/* Hide original text label when logo is present */
.book-brand span {
  display: none;
}

/* Environments section and child items use purple-gray color and Montserrat Alternates font */
.book-menu .book-menu-content > ul > li:last-child > a,
.book-menu .book-menu-content > ul > li:last-child > label,
.book-menu .book-menu-content > ul > li:last-child > summary,
.book-menu .book-menu-content nav > ul > li:last-child > a,
.book-menu .book-menu-content nav > ul > li:last-child > label,
.book-menu .book-menu-content nav > ul > li:last-child > summary {
  color: #9555af !important;
  font-family: 'Montserrat Alternates', sans-serif !important;
}

.book-menu .book-menu-content > ul > li:last-child ul li a,
.book-menu .book-menu-content nav > ul > li:last-child ul li a {
  color: #9555af !important;
  font-family: 'Montserrat Alternates', sans-serif !important;
}

/* GitHub corner ribbon */
.github-corner {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9999;
  border: 0;
  width: 80px;
  height: 80px;
  overflow: hidden;
}

.github-corner svg {
  position: absolute;
  top: 0;
  right: 0;
  border: 0;
}

.github-corner svg path:first-of-type {
  fill: url(#github-gradient) !important;
}

.github-corner .octo-arm,
.github-corner .octo-body {
  fill: #fff !important;
}

.github-corner:hover .octo-arm,
.github-corner:hover .octo-body {
  fill: rgba(255, 255, 255, 0.85) !important;
}

.github-corner .octo-arm {
  transform-origin: 130px 106px;
}

.github-corner:hover .octo-arm {
  animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
  0%, 100% {
    transform: rotate(0);
  }
  20%, 60% {
    transform: rotate(-25deg);
  }
  40%, 80% {
    transform: rotate(10deg);
  }
}

@media (max-width: 500px) {
  .github-corner:hover .octo-arm {
    animation: none;
  }
  .github-corner .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
  }
}

/* Move sidebar and main content modules to the right */
.book-menu {
  transform: translateX(4rem);
}

.book-page {
  margin-left: 4rem;
}

/* Adjust for larger screens with more horizontal space */
@media screen and (min-width: 1200px) {
  .book-menu {
    transform: translateX(5rem);
  }

  .book-page {
    margin-left: 5rem;
  }
}
