:root {
  --theme-hue: 333;
  --theme-saturation: 75%;
  --theme-lightness: 50%;
}
body.transitioning {
  transition: all 0.5s ease, color 0.5s ease;
}
p {
  text-align: justify;
}
.sidebar > h1 {
  text-wrap: balance;
}
a:hover {
  text-decoration: none;
}
.cover a {
  border: none !important;
  background: none !important;
  text-decoration: none !important;
}
.cover .cover-main > p:last-child {
  margin: 0 !important;
  color: var(--cover-link-color) !important;
}
.cover .cover-main > p:last-child a:first-child {
  color: var(--cover-link-color) !important;
}
.cover p {
  margin-bottom: 0 !important;
  text-align: center;
}
.pic-wall-container {
  /* vertical gaps */
  /* line-height: 0px; */
  -webkit-column-count: 2;
  -webkit-column-gap: 7px;
  -moz-column-count: 2;
  -moz-column-gap: 7px;
  column-count: 2;
  column-gap: 7px;
}
.pic-wall-container img {
  /* Just in case there are inline attributes */
  width: 100% !important;
  height: auto !important;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-template-rows: auto;
  grid-gap: 1em;
}

/* For devices with width less than or equal to 600px */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  }
}
.markdown-section iframe {
  margin: 0 auto;
}
.rainbow-text {
  background-image: linear-gradient(
    to left,
    #b6ccfe,
    #a7d8de,
    #b5e6ba,
    #f6e58d,
    #f7d794,
    #f3a683,
    #ea8685
  );
  text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
  -webkit-background-clip: text;
  color: transparent;
}
p.caption {
  color: #808080;
  font-size: 0.8em;
  margin: -1em 0 1em 0;
}
.center,
p.center {
  text-align: center !important;
  justify-self: center;
}
code.lang-txt {
  text-wrap: pretty !important;
}
.chat {
  border-radius: 15px;
  padding: 15px;
  margin: 10px 0;
  text-align: justify;
}
.A {
  background-color: hsl(var(--theme-hue), var(--theme-saturation), var(--brillo));
  border-radius: 20px 20px 5px 20px;
}
.B {
  background-color: var(--mono-tint2);
  border-radius: 20px 20px 20px 5px;
}
a {
  color: inherit;
  transition: color 0.3s ease !important;
}
a:hover {
  color: var(--theme-color) !important;
}
.full-width {
  width: 100%;
}
audio {
  width: 100%;
}
.mt-1 {
  margin-top: 0.1em !important;
}

/* SIDEBAR INDEX COLLAPSE */

/* Hide all nested lists by default */
.sidebar ul {
  /* display: none; */
}

/* style.css additions for collapsible sidebar */

/* Ensure the ::after pseudo-element is visible */
.sidebar-nav > ul > li > a.collapsible {
  position: relative;
  padding-right: 20px; /* Make space for the arrow */
}

.sidebar-nav > ul > li > a.collapsible::after {
  content: "▼";
  position: absolute;
  right: 0;
  top: 0;
  transform: translateY(-50%);
}

.sidebar-nav > ul > li.collapsed > a.collapsible::after {
  content: "►";
}

.sidebar-nav ul li.collapsed > ul {
  display: none !important;
}
/* Style for the collapse toggle button */
.collapse-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 5px; /* Space between button and link */
  font-size: inherit; /* Match font size with surrounding text */
}

/* Hide child items when parent is collapsed */
.sidebar-nav > ul > li.collapsed > ul {
  display: none;
}

.hidden {
  display: none;
}
