.sidebar {
  @apply hidden lg:block;

  position: sticky;
  top: var(--header-height);
  min-width: fit-content;
  max-height: calc(100vh - var(--header-height));
}

.sidebar summary {
  cursor: pointer;
  display: block;
  margin-top: 3px;
  margin-bottom: 3px;
}

.sidebar summary h5 {
  transition: color 0.2s ease-in-out;
}

.sidebar summary:hover h5 {
  color: var(--text-color);
}

.sidebar summary::marker,
.sidebar summary::-webkit-details-marker {
  display: none;
  content: '';
}

.sidebar details[open] summary {
  font-weight: 800;
}

.breadcrumbs {
  @apply sticky z-10 w-[100%];
  top: var(--header-height);
  @apply border-b;
  @apply px-1;
  @apply flex;

  /* large */
  @apply lg:hidden;

  color: var(--text-color);
  background-color: var(--bg-color);
  border-color: var(--bg-secondary-color);
}

.breadcrumbs button {
  @apply block;
  @apply p-4;
  @apply opacity-70;
  @apply hover:opacity-100;
}

.breadcrumbs ol {
  @apply flex text-sm leading-6 whitespace-nowrap min-w-0;
  @apply flex items-center;
}

.breadcrumbs li {
  @apply pl-1 pr-5;
  position: relative;
}

.breadcrumbs li:after {
  position: absolute;
  content: '\203A';
  top: -1px;
  right: 6px;
}

.breadcrumbs li:last-child::after {
  content: '';
}

.menu {
  @apply py-8 pt-10;
  @apply h-full overflow-y-auto;

  /* large */
  @apply lg:pl-4 lg:pr-4;
  @apply lg:w-[14rem];

  border-right: 1px solid #8c8c8c66;
  overscroll-behavior: contain;
}

.menu h5 {
  @apply px-3 py-1 mb-2 rounded-md whitespace-nowrap;
  color: var(--interactive-text-color);
}

.menu li:first-child h5,
.menu li:first-child summary {
  margin-top: 0;
  padding-top: 0;
}

.menu ul {
  @apply border-slate-100;
  padding-bottom: 15px;
}

.menu li {
  @apply whitespace-nowrap;
}

details li {
  @apply py-1 pl-3 block overflow-hidden text-ellipsis;
  padding: unset;
  transition: background-color 0.2s ease-in-out;
}

details li:hover {
  background-color: var(--bg-secondary-color);
  border-radius: 4px;
}

details li a {
  @apply block overflow-hidden text-ellipsis;
}

.menu li a {
  color: var(--secondary-text-color);
  padding: 0.5rem 20px;
  border-radius: 4px;
}

.menu li a.is-active {
  font-weight: 800;
  background-color: #b1b1b13a;
}

.updated {
  background-color: var(--interactive-text-color);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 0.2rem;
  margin-left: 0.3rem;
  position: absolute;
  transform: translateX(-15px);
}

@media (max-width: 1023px) {
  .breadcrumbs button {
    @apply p-2;
  }
}
