/* Center Mermaid diagrams */
.mermaid {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* Hides the anchor link symbol next to all headings */

/* Step A: Hide the anchor link by default (opacity: 0 makes it invisible) */
.header-anchor {
    opacity: 0;
    transition: opacity 0.2s ease-in-out; /* Makes the appearance smooth */
    text-decoration: none; /* Removes any underline if present */
}

.caution {
  background: #fff3f3;
  border-left: 5px solid #e53935;
  padding: 12px;
}

.important {
  background: #f3e8ff;
  border-left: 5px solid #7b1fa2;
  padding: 12px;
}

.tip {
  background: #e8f5e9;
  border-left: 5px solid #2e7d32;
  padding: 12px;
}

pre code {
    color: black;
}

pre code * {
    color: black !important;
}

/* Force all text inside code blocks to be black */
pre,
pre * {
    color: black !important;
}

/* Header: fit logo inside top navigation bar */
.navbar-brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: 12px;
}

#logo {
  height: 48px !important;
  width: auto !important;
  max-height: 48px !important;
  display: inline-block;
  object-fit: contain;
  transform-origin: left center;
}

@media (max-width: 767px) {
  #logo { height: 37px !important; max-height: 37px !important; }
  .navbar-brand { gap: 8px; margin-right: 8px; }
}

.pdf-download {
  margin: 12px 0 20px;
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid #355c86;
  border-radius: 6px;
  background: #4f79a8;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease,border-color .2s ease,color .2s ease;
}

.pdf-download-btn:hover {
  background: #0a2f68;
  border-color: #082a5a;
  color: #ffffff !important;
}

.pdf-download-btn img {
  width: 24px;
  height: 24px;
}



.pdf-download-btn span {
  font-weight: 700;
}

/* Navigation emphasis */
.toc li > a {
  display: block;
  font-weight: 400;
  border-radius: 4px;
  transition: background-color .2s ease, color .2s ease, font-weight .2s ease;
}
.toc li > a:hover,
.toc li > a:focus {
  background: #f9ebad !important;
  color: #1f2937 !important;
  font-weight: 700;
  text-decoration: none;
}
.toc li.active > a,
.toc li > a.active,
.toc li > a[aria-current="page"] {
  background: transparent !important;
  color: #2563eb !important;
  font-weight: 700;
  box-shadow: none;
  text-decoration: none;
}

.navbar .navbar-brand,
.navbar .navbar-nav .nav-link,
#navbar a {
  font-weight: 400;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus,
#navbar a:hover,
#navbar a:focus {
  background: #f9ebad !important;
  color: #1f2937 !important;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}
.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .nav-link[aria-current="page"],
#navbar a[aria-current="page"],
#navbar .active {
  background: transparent !important;
  color: #2563eb !important;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

/* Style DocFX fallback PDF links to match button */
.toc a.pdf-link,
a.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #355c86;
  border-radius: 6px;
  background: #4f79a8;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none !important;
}

.toc a.pdf-link:hover,
a.pdf-link:hover {
  background: #2f5e91;
  border-color: #244d78;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Replace bootstrap-icon font dependency with svg icon */
.toc a.pdf-link:before,
a.pdf-link:before {
  content: "" !important;
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 0;
  top: 0;
  position: static;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M6 2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z'/%3E%3Cpath fill='%23d32f2f' d='M15 2v5h5zM4 14h16v6H4z'/%3E%3Cpath fill='%23fff' d='M6.4 18.5h.9c.7 0 1.1-.3 1.1-.9 0-.6-.4-.9-1.1-.9h-.9v1.8zm0 .8V21H5.3v-5h2.1c1.3 0 2.1.6 2.1 1.7S8.7 19.4 7.4 19.4h-1zm4.7.8h-1.8v-5h1.8c1.5 0 2.5.9 2.5 2.5s-1 2.5-2.5 2.5zm-.7-.9h.6c.8 0 1.4-.5 1.4-1.6s-.6-1.6-1.4-1.6h-.6zm4 .9h-1.1v-5h3.1v.9h-2v1.2h1.8v.9h-1.8z'/%3E%3C/svg%3E");
}




