/* Enable smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* zoom on image, custom z-index */
.medium-zoom-overlay,
.medium-zoom-image--opened {
  z-index: 999;
}

/* avoid font to pop on family change */
* {
  font-display: swap;
}

:root {
  --md-primary-fg-color: #125678;
  --md-text-font: "Roboto";
}

.md-footer {
  background-color: #125678;
}

/* better link contrast */
article a {
  color: #2388bb;
}

/* highlight content links */
article a,
article p > a {
  text-decoration: underline;
}

/* header list links and config tabs stay default  */
article li > a,
article label > a {
  text-decoration: none;
}

/* lighter base tab color */
nav.md-tabs ul li a {
  opacity: 0.9;
}

/* active desktop tabs nav */
nav.md-tabs ul li.md-tabs__item--active a {
  color: #36ce7a;
  font-weight: bold;
}

nav.md-tabs ul li.md-tabs__item--active a:hover {
  filter: brightness(0.9);
}

/*
@font-face {
	font-family: Consolas, monaco, monospace;
}

@font-face {
	font-family: "TitleFont";
	src: "assets/font-title.woff";
}
*/

/* START: Custom styles for TOC dropdowns */
.toc-dropdown > summary {
  list-style: none; /* Remove default arrow */
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  outline: none; /* Remove focus outline */
  transition: color 0.25s; /* Smooth color transition */
}

.toc-dropdown > summary::-webkit-details-marker {
  display: none; /* Hide default arrow for Chrome/Safari */
}

/* Style the dropdown arrow */
.toc-dropdown > summary::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 0.3em solid transparent;
  border-bottom: 0.3em solid transparent;
  border-left: 0.5em solid currentColor;
  margin-right: 0.7rem;
  transform: rotate(0deg);
  transition: transform 0.2s ease-in-out, color 0.25s;
  opacity: 0.7;
}

/* Rotate arrow when dropdown is open */
.toc-dropdown[open] > summary::before {
  transform: rotate(90deg);
}

/* Set a consistent default color for non-active TOC items */
.md-nav--secondary .md-nav__item .md-nav__link:not(.md-nav__link--active) {
  color: var(--md-default-fg-color);
}

/* Apply hover color to non-active items and open dropdowns */
.md-nav--secondary .md-nav__item .md-nav__link:not(.md-nav__link--active):hover,
.toc-dropdown[open] > summary:not(.md-nav__link--active) {
  color: #2388bb;
}
/* END: Custom styles for TOC dropdowns */
