/* Layout */
:root {
  --nav-height: 55px;
  --menu-width: 350px;
  --theme-color: #1a89a0;
  --scroll-padding-top: calc(var(--nav-height) + 25px);
  --color-mono-2: #eaebeb;
  --color-mono-6: #555;
  --font-size-s: 12px;
}

html {
  scroll-padding-top: var(--scroll-padding-top);
}

#skip-to-content {
  display: none;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    'Noto Sans',
    'Liberation Sans',
    Arial,
    sans-serif,
    'Apple Color Emoji',
    'Segoe UI Emoji',
    'Segoe UI Symbol',
    'Noto Color Emoji';
}

main > .content {
  padding-top: var(--scroll-padding-top);
  padding-left: calc(var(--menu-width) + 14px);
  position: relative;
  left: 0;
}

.markdown-section {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Markdown section */

.markdown-section h1 {
  margin: 0 0 3rem;
  font-size: 40px;
  line-height: 1.4;
}

.markdown-section h2 {
  border-top: 1px solid #e6e6e6;
  margin: 4rem 0 1.8rem;
  padding-top: 1.8rem;
  font-size: 28px;
}

.markdown-section h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 3rem 0 1.25rem;
}

.markdown-section h2 + h3 {
  margin-top: 0;
}

.markdown-section h4 {
  font-size: 17px;
  margin: 1.8rem 0 1rem;
}

.markdown-section img {
  padding: 20px;
  border-radius: 4px;
  background-color: #f8f8f8;
  max-width: 100%;
}

.markdown-section pre {
  background-color: #f8f8f8;
  border-radius: 5px;
}

.markdown-section pre > code {
  background-color: transparent;
}

.markdown-section pre .docsify-copy-code-button {
  background: #34495e;
  font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9rem;
}

.markdown-section pre .docsify-copy-code-button.error .error,
pre .docsify-copy-code-button.success .success {
  right: 0;
  opacity: 1;
  transform: translate(0, 100%);
}

.markdown-section pre[data-lang^='yeswiki'] + .code-preview {
  margin-top: -1.7rem;
  padding: 1em 0;
}

.markdown-section iframe {
  border: 5px solid #f8f8f8;
  border-radius: 3px;
}

/* Navbar */
nav.app-nav {
  position: sticky;
  padding: 0 1rem;
  height: var(--nav-height);
  top: 0;
  margin: 0 !important;
  display: flex;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid #e6e6e6;
  background: white;
  white-space: nowrap;
  z-index: 1;
}

.app-nav a#title {
  display: block;
  font-weight: bold;
  font-size: 17px;
  border: none;
  color: var(--theme-color, #42b983) !important;
}

.app-nav a#back {
  margin-left: 1rem;
  color: #5b7086;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 14px;
  background: #f7f7f7;
}

.app-nav ul {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.app-nav #extensions-links + ul a {
  text-transform: capitalize;
}

.app-nav li {
  height: var(--nav-height);
  align-items: center;
  padding: 0 1rem;
  margin: 0;
  display: inline-flex;
}

.app-nav li,
.app-nav li a {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
}

/* Sub menus */
.app-nav li ul {
  top: calc(100% - 1px);
  border-radius: 0 0 4px 4px;
}

.app-nav li ul li {
  height: auto;
}

.app-nav li ul li a {
  height: auto;
  line-height: 30px;
}

/* Side bar menu */
aside.sidebar {
  top: var(--nav-height);
  letter-spacing: -0.2px;
  padding: 1.5rem;
  width: var(--menu-width);

  /* background-color: #17424c05; */
  background-color: #f8f8f8;
}

.sidebar-toggle {
  display: none;
}

.sidebar-nav > ul > li > a {
  display: none;
}

.sidebar ul li.active > a {
  border-right: none;
  color: var(--theme-color, #42b983) !important;

  /* font-weight: 600; */
}

.sidebar .sidebar-nav {
  line-height: 1.9;
}

.sidebar .sidebar-nav .app-sub-sidebar li::before {
  content: none;
}

.sidebar .sidebar-nav .app-sub-sidebar {
  margin-left: 0;
}

.sidebar ul {
  margin: 0;
}

.sidebar-nav > ul > li > .app-sub-sidebar > li {
  margin-top: 1rem;
}

.sidebar-nav > ul > li > .app-sub-sidebar > li > a {
  font-weight: bold;
}

.sidebar .sidebar-nav .app-sub-sidebar .app-sub-sidebar li a {
  color: #767676;
}

.sidebar .sidebar-nav li {
  margin: 0;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 0;
  background: hsl(0deg 0% 53.3% / 40%);
}

.sidebar::-webkit-scrollbar-track {
  background: hsl(0deg 0% 53.3% / 10%);
}

/* Search */

/* Clamp utility classes from docsify v5 core (not included in the vue theme) */
[class*='clamp-'] {
  overflow: hidden;
  text-overflow: ellipsis;
}

[class*='clamp-']:not(.clamp-1) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.clamp-1 {
  white-space: nowrap;
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

.sidebar .search {
  --plugin-search-input-bg: white;
  --plugin-search-input-border-color: #eaebeb;
  --plugin-search-input-border-radius: 4px;
  --plugin-search-input-color: inherit;
  --plugin-search-reset-color: #999;
  --plugin-search-reset-bg: transparent;
  --plugin-search-reset-border: none;
  --plugin-search-reset-border-radius: 0;
  padding: 0;
  border: none;
}

.sidebar .search input {
  background: white;
  border: 1px solid #eaebeb;
  border-radius: 4px;
  padding: 0.75rem 2.2rem 0.75rem 0.8rem;
  font-family: inherit;
  color: inherit;
}

.sidebar .search input::placeholder {
  color: #787878;
}

.search .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.search .kbd-group {
  display: none;
}

.search .results-panel {
  background: white;
  border: 1px solid #eaebeb;
  margin-top: -1px;
  border-radius: 0 3px 3px;
}

/* Override plugin-injected CSS (higher specificity needed as plugin CSS loads after) */
.sidebar .search .matching-post {
  padding: 0.4rem 0.8rem !important;
  border-bottom: 1px solid #eaebeb;
}

.sidebar .search .matching-post a {
  text-decoration: none;
}

.sidebar .search .matching-post .title {
  margin: 0 0 0.15rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-color);
  line-height: 1.3 !important;
}

.sidebar .search .matching-post .content {
  position: static;
  padding-top: 0;
  left: auto;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.search p.empty {
  padding: 0.8rem;
  margin: 0;
  color: #787878;
  font-size: 13px;
}

.search .results-status {
  display: none;
}

/* Footer */
footer {
  text-align: center;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--theme-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
  z-index: 10;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  filter: brightness(1.15);
}

/* Arrow up icon */
.gg-arrow-up {
  box-sizing: border-box;
  position: relative;
  display: block;
  transform: scale(var(--ggs, 1));
  width: 22px;
  height: 22px;
}

.gg-arrow-up::after,
.gg-arrow-up::before {
  content: '';
  display: block;
  box-sizing: border-box;
  position: absolute;
}

.gg-arrow-up::before {
  width: 8px;
  height: 8px;
  border-top: 2px solid;
  border-left: 2px solid;
  transform: rotate(45deg);
  left: 7px;
  top: 4px;
}

.gg-arrow-up::after {
  width: 2px;
  height: 14px;
  background: currentcolor;
  left: 10px;
  top: 6px;
}

/* Responsivness */
@media (width >= 1201px) and (width <= 1350px) {
  .app-nav li {
    padding: 0 0.6rem;
  }
}

@media (width >= 1201px) {
  .app-nav > ul {
    display: flex !important;
  }

  .menu-icon,
  .search-icon {
    display: none;
  }

  .app-nav > ul #back {
    display: none;
  }

  /* li that contains back link for mobile */
  .app-nav > ul > li:first-child {
    display: none;
  }

  .backdrop {
    display: none;
  }
}

@media (width <= 1200px) {
  aside.sidebar {
    width: calc(100vw - 64px);
    max-width: var(--menu-width);
    opacity: 0;
    left: 0 !important;
    overflow: hidden auto;
    transform: translate(-100%);
    transition:
      background-color 0.5s,
      opacity 0.5s,
      transform 0.3s ease;
  }

  aside.sidebar.open {
    opacity: 1;
    z-index: 100;
    visibility: visible;
    transform: translate(0);
    transition:
      background-color 0.5s,
      opacity 0.25s,
      transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  }

  .backdrop {
    display: none;
    cursor: pointer;
    position: fixed;
    z-index: 99;
    opacity: 0;
    inset: 0;
    background: rgb(0 0 0 / 60%);
    transition: opacity 0.5s;
  }

  aside.sidebar.open ~ .backdrop {
    display: block;
    opacity: 1;
  }

  .content {
    padding-left: 0;
  }

  .app-nav > p > #back {
    display: none;
  }

  .app-nav > ul {
    display: none;
  }

  .app-nav > ul.open {
    display: flex;
    overflow-y: auto;
  }

  .app-nav ul {
    position: absolute;
    top: calc(var(--nav-height) - 1px);
    flex-direction: column;
    background-color: white;
    right: 0;
    left: 0;
    justify-content: flex-start;
    height: calc(100vh - var(--nav-height));
    border: 1px solid #e6e6e6;
    background: #fff !important;
    padding: 1rem;
  }

  .app-nav > ul li:first-child {
    align-items: center; /* back button */
  }

  .app-nav ul li {
    height: auto;
    display: flex;
    flex-direction: column;
    width: 280px;
    margin: 0 auto;
    border-bottom: 1px solid #e6e6e6;
    align-items: flex-start;
    padding: 1rem 0;
  }

  .app-nav ul li a {
    height: auto;

    /* line-height: 50px; */
    font-size: 16px;
    border: none !important;
  }

  .app-nav li ul {
    display: flex !important;
    border: none;
    position: relative;
    right: 0;
    height: auto;
    top: 0;
  }

  .app-nav li ul li {
    border: none;
    position: relative;
    padding: 0.4rem 0;
    margin: 0 0 0 2rem;
  }

  .app-nav li ul li a {
    font-size: 12px;
    line-height: 1.5;
  }

  .app-nav .menu-icon,
  .app-nav .search-icon {
    display: inline-flex;
    cursor: pointer;
    width: 50px;
    justify-content: center;
    height: var(--nav-height);
    align-items: center;
  }

  .app-nav .search-icon {
    margin-left: auto;
  }
  .menu-icon .gg-menu {
    display: block;
  }
  .menu-icon .gg-close {
    display: none;
  }
  .menu-icon.open .gg-menu {
    display: none;
  }
  .menu-icon.open .gg-close {
    display: block;
  }
}

/* CSS Icons */

/* Menu */
.gg-menu {
  transform: scale(var(--ggs, 1));
}

.gg-menu,
.gg-menu::after,
.gg-menu::before {
  box-sizing: border-box;
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 3px;
  background: currentcolor;
}

.gg-menu::after,
.gg-menu::before {
  content: '';
  position: absolute;
  top: -6px;
}

.gg-menu::after {
  top: 6px;
}

/* Close */
.gg-close {
  box-sizing: border-box;
  position: relative;
  display: block;
  transform: scale(var(--ggs, 1));
  width: 22px;
  height: 22px;
  border: 2px solid transparent;
  border-radius: 40px;
}

.gg-close::after,
.gg-close::before {
  content: '';
  display: block;
  box-sizing: border-box;
  position: absolute;
  width: 16px;
  height: 2px;
  background: currentcolor;
  transform: rotate(45deg);
  border-radius: 5px;
  top: 8px;
  left: 1px;
}

.gg-close::after {
  transform: rotate(-45deg);
}

/* Search */
.gg-search {
  box-sizing: border-box;
  position: relative;
  display: block;
  transform: scale(var(--ggs, 1));
  width: 16px;
  height: 16px;
  border: 2px solid;
  border-radius: 100%;
  margin-left: -4px;
  margin-top: -4px;
}

.gg-search::after {
  content: '';
  display: block;
  box-sizing: border-box;
  position: absolute;
  border-radius: 3px;
  width: 2px;
  height: 8px;
  background: currentcolor;
  transform: rotate(-45deg);
  top: 10px;
  left: 12px;
}
