html {
  scroll-behavior: unset !important;
}

:root {
  --primary-color: #007bff;
  --caption-color: #444;
  --custom-bg-primary: #0377a1;
  --custom-bg-highlighted: rgba(255, 255, 255, 0.2);
  --sidebar-width: 300px;
}

[id] {
  scroll-margin-top: 70px;
}

a {
  text-decoration: none;
  word-break: break-word;
}

dt,
dd {
  display: inline;
}

dd::after {
  content: '';
  display: block;
}

dt {
  font-weight: 600;
}

.jumbotron {
  background-color: #e9ecef;
  border-radius: 10px;
}

.stats-chart-container {
  max-width: 800px;
  max-height: 500px;
  margin: auto !important;
  position: relative;
}

.toast-container {
  background-color: white;
  position: fixed;
  right: 1em;
  bottom: 1em;
  z-index: 10000;
}

.search-input {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.search-dropdown {
  min-width: 180px;
  z-index: 1000;
}

.text-warning {
  color: #e9a100 !important;
}

.caption {
  font-size: 0.75rem;
  color: var(--caption-color);
}

.modal-content pre,
.modal-content code.hljs {
  background: inherit;
  overflow: visible !important;
}

.app-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--custom-bg-primary) no-repeat;
  background-size: cover;
  z-index: -9999;
}

main {
  margin: 0.25rem;
  background-color: #fefefe;
  position: relative;
  padding: 0.5rem;
  overflow: hidden;
  border-radius: 0.5rem;
  flex-grow: 1;
}

.main-content {
  grid-template-columns: 300px 1fr;
}

.main-content.three-columns {
  grid-template-columns: 300px 1fr 300px;
}

.full-width {
  grid-column: 1 / -1;
}

.overflow-visible {
  overflow: visible;
}

.light-bold {
  font-weight: 600 !important;
}

.fixed-toast {
  position: fixed;
  bottom: 5px;
  right: 5px;
}

.hljs {
  background: #0d1117 !important;
}

.hide-on-desktop {
  display: none;
}

@media only screen and (max-width: 800px) {
  .hide-on-mobile {
    display: none;
  }

  .hide-on-desktop {
    display: inherit;
  }
}

.nav-sidebar {
  position: relative;
  float: left;
  width: var(--sidebar-width);
  z-index: 1050;
}

.sidebar {
  width: 300px;
  position: sticky;
  top: 50px;
  height: calc(100vh - 50px);
  height: calc(100dvh - 50px);
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

@media only screen and (max-width: 992px) {
  .sidebar {
    width: 100%;
  }
}

@keyframes fade_in {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .nav-sidebar {
    display: none;
    transform-origin: top;
    width: 100%;
    background-color: var(--custom-bg-primary);
    height: 100%;
    position: fixed;
    animation: fade_in 0.3s ease-in-out;
  }

  main {
    border-radius: 0;
    margin: 0;
  }
}

@media only screen and (max-width: 800px) {
  main {
    padding: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade {
    transition: opacity 0.15s linear !important;
  }

  .collapsing {
    transition: height 0.35s ease !important;
  }
}

.item-wrapper {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.item-wrapper.active,
.item-wrapper:hover {
  background-color: var(--custom-bg-highlighted);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.2);
}

.submenu-item-wrapper {
  padding: 0.4rem 1rem 0.4rem 2.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 0.9rem;
}

.submenu-item-wrapper.active,
.submenu-item-wrapper:hover {
  background-color: var(--custom-bg-highlighted);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.2);
}

.submenu-container {
  overflow: hidden;
}

.submenu-separator {
  margin: 0.5rem 1rem 0.5rem 2.5rem;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  user-select: none;
}

.animate-chevron {
  transition: 0.3s transform;
}

@media only screen and (max-width: 992px) {
  .item-wrapper {
    padding: 0.25rem 0.5rem;
  }

  .submenu-item-wrapper {
    padding: 0.25rem 0.5rem 0.25rem 1.5rem;
    font-size: 0.85rem;
  }

  .submenu-separator {
    margin: 0.3rem 0.5rem 0.3rem 1.5rem;
  }
}

.speedometer {
  height: 200px !important;
}

.meta-summary h1,
.meta-summary h2,
.meta-summary h3,
.meta-summary h4,
.meta-summary h5,
.meta-summary h6 {
  font-size: 1.2rem;
}
