/* @font-face */

@font-face {
  font-family: "HostGrotesk";
  src: url("fonts/HostGrotesk-Variable.ttf") format("truetype");
  font-weight: 300 800;
  font-display: swap;
}

@font-face {
  font-family: "HostGrotesk";
  src: url("fonts/HostGrotesk-Italic-Variable.ttf") format("truetype");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

/* :root */

:root {
  font-size: 10px;
  --fg: #020817;
  --fg-muted: #647086;
  --sidebar-fg: #020817;
  --sidebar-active-fg: #142039;
  --links: #0078ff;
  --bg: #ffffff;
  --bg-surface: #eaeff5;
  --bg-elevated: #f5f7fa;
  --bg-blockquote: #f3f7ff;
  --bg-active: #bdd5fb;
  --bg-hover: #9bc0f8;
  --border: #dfe4ec;
  --banner-bg: #0078ff;
  --menu-bar-height: 78px;
  --sidebar-resize-indicator-width: 0px;
  -ms-overflow-style: none;
  scrollbar-width: none;

  --banner-height: 0px;
  --sidebar-width: 280px;
}

/* HTML */

html {
  font-family: Manrope, Helvetica, sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
  color: var(--fg);
  background-color: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* H1 */

h1 {
  margin-top: 60px;
  margin-bottom: 0;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.3em;
}

/* h2 */

h2 {
  font-size: 24px;
  line-height: 1.3em;
  margin-top: 60px;
  margin-bottom: 0;
  font-weight: 500;
}

/* h3 */

h3 {
  font-size: 20px;
  margin-top: 36px;
  margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: HostGrotesk, Helvetica, sans-serif;
}

/* p */

p,
.content p {
  font-size: 16px;
  line-height: 1.5em;
  margin-top: 24px;
  margin-bottom: 0;
  font-weight: 400;
}

/* ul */

.content ul {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
}

.content ul li {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.3em;
  position: relative;
  padding-left: 16px;
}

.content ul li:before {
  content: "•";
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  display: block;
}

/* ol */

.content ol {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 16px;
}
.content ol li {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.3em;
}

/* table */
.table-wrapper {
  margin-left: -4px;
  padding-left: 4px;
  margin-right: -4px;
  padding-right: 4px;
  margin-bottom: -4px;
  padding-bottom: 4px;
}
table {
  float: left;
  margin-top: 24px;
  border-spacing: 0;
  padding-bottom: 1px;
  filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1));
}

table thead tr {
  border: none;
}

table thead {
  background: none;
}

table thead th {
  text-align: left;
  background-color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  color: var(--bg);
  padding: 20px 24px;
}

table thead th:first-child {
  border-top-left-radius: 20px;
}

table thead th:last-child {
  border-top-right-radius: 20px;
}

table tbody tr {
  background-color: var(--bg);
  border-top: 1px solid var(--border);
}

table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 20px;
}

table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 20px;
}

table tbody tr:nth-child(2n) {
  background-color: var(--bg-elevated);
}

table td {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5em;
  padding: 20px 24px;
  border: none;
}

/* pre */

pre {
  margin-top: 24px;
  margin-bottom: 0;
}

pre > .buttons {
  top: 4px;
  right: 2px;
}

pre > .buttons button {
  height: 24px;
  width: 24px;
  background-color: var(--bg);
  border: none;
  color: var(--fg);
}
pre > .buttons button:hover {
  background-color: var(--bg-surface);
  color: var(--fg);
}
/* blockquote */
blockquote {
  margin-top: 24px;
  margin-bottom: 0;
  padding-bottom: 24px;
  background-color: var(--bg-blockquote);
  border-radius: 20px;
  border: none;
  overflow: hidden;
}

/* strong */

strong {
  font-weight: 600;
}

.page-wrapper {
  position: relative;
  background-color: var(--bg);
  margin-inline-start: calc(
    var(--sidebar-width) + var(--sidebar-resize-indicator-width)
  );
  height: 100%;
  overflow-y: auto;
}
.page {
  padding-left: 0;
  padding-right: 0;
}

.content {
  padding-top: 0;
  padding-right: 60px;
  padding-left: 60px;
}

/* code */
.content code.hljs {
  background-color: #46484a;
  color: #dde0db;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5em;
}
.content code.hljs.shell {
  padding: 24px 32px;
}

.hidden-text {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* .sidebar */

.sidebar {
  background-color: var(--bg-surface);
  transition: none;
}

.sidebar-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0);
  z-index: 99;
  pointer-events: none;
  transition: background-color 0.3s;
}

.left-buttons { display: none; }

.home-link {
  position: absolute;
  top: 24px;
  left: 24px;
}

/* sidebar-scrollbox */

.sidebar .sidebar-scrollbox {
  top: 78px;
  padding: 8px 16px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.chapter li.chapter-item {
  line-height: 1.5em;
  font-weight: 400;
  display: block;
  margin-top: 4px;
  position: relative;
  padding-left: 0;
}

.chapter li.chapter-item strong {
  display: none;
}

.chapter li a {
  padding: 12px 8px 12px 28px;
  border-radius: 6px;
}

.sidebar-scrollbox.ready .chapter li a {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

.section .chapter-item a {
  padding-left: 50px;
}

.section .section .chapter-item a {
  padding-left: 70px;
}

.chapter li a.active {
  color: var(--sidebar-active-fg);
  background-color: var(--bg-active);
}

.chapter li a:hover {
  color: var(--sidebar-active-fg);
  background-color: var(--bg-hover);
}

.chapter li.part-title {
  margin: 16px 0 0 0;
  padding-left: 4px;
  padding-right: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  font-size: 14px;
}

.chapter li > a.toggle div {
  display: none;
}

.chapter li a:has(+ .toggle) {
  padding-left: 50px;
}

.chapter li > a.toggle:before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-left: 2px solid var(--fg);
  border-bottom: 2px solid var(--fg);
  transform: rotate(-45deg);
  top: 20px;
  left: 30px;
}
.chapter .spacer {
  display: none;
}
.chapter li.expanded a.toggle:before {
  transform: rotate(135deg);
}
.section {
  padding-inline-start: 0;
}
.chapter .section li a:has(+ .toggle) {
  padding-left: 70px;
}
.chapter .section li > a.toggle:before {
  left: 52px;
}
.chapter .section .section li a:has(+ .toggle) {
  padding-left: 80px;
}
.chapter .section .section li > a.toggle:before {
  left: 62px;
}

/* main */

.content main {
  max-width: 48em;
}

/* menu-bar */
#menu-bar,
#menu-bar-hover-placeholder {
  margin: 0;
}

#menu-bar {
  background-color: var(--bg-surface);
  border: none;
  position: relative;
  height: var(--menu-bar-height);
}

@media (max-width: 1080px) {
  #search-wrapper {
    display: none;
  }
}

.searchbar-outer {
  position: fixed;
  width: 508px;
  top: 16px;
  left: calc(50% - 254px);
  z-index: 101;
}

#searchbar {
  color: var(--fg);
  background-color: var(--bg);
  border: none;
  height: 44px;
  border-radius: 22px;
  margin: 0;
  font-weight: 300;
  font-size: 16px;
  padding-left: 22px;
  padding-right: 22px;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#searchbar:focus,
#searchbar.active {
  border: none;
  box-shadow: none;
}

#searchbar:focus {
  outline: none !important;
}

#searchresults-outer:after {
  display: block;
  content: "";
  background-color: var(--fg);
  opacity: 0.5;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99;
}

.searchresults-content {
  background-color: var(--bg);
  border-radius: 22px;
  border: none;
  position: fixed;
  top: 61px;
  left: calc(50% - 254px);
  width: 508px;
  max-height: calc(100vh - 69px);
  box-shadow: 1px 0px 4px 0px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 1px 0px 4px 0px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 1px 0px 4px 0px rgba(0, 0, 0, 0.1);
  scrollbar-width: none;
  overflow-y: auto;
  z-index: 100;
}

.searchresults-header {
  padding-inline-start: 0;
  padding-block-start: 0;
  font-weight: 400;
  margin-top: 16px;
  padding-left: 16px;
  padding-right: 16px;
  color: var(--fg-muted);
}
ul#searchresults {
  padding-inline-start: 0;
}

ul#searchresults li {
  margin: 0;
  padding: 0;
  border-radius: 0;
}

#searchresults a {
  display: block;
  padding-left: 16px;
  padding-right: 16px;
  margin-top: 4px;
  line-height: 48px;
  color: var(--fg);
}

#searchresults a:hover {
  background-color: var(--bg-active);
}

ul#searchresults span.teaser {
  margin-block-start: 0;
  margin-inline-start: 0;
  margin-top: 4px;
  padding-left: 16px;
  padding-right: 16px;
  font-size: 12px;
  line-height: 16px;
  color: var(--fg-muted);
}

.menu-title {
  font-size: 40px;
  color: var(--fg);
  font-weight: 500;
  text-align: left;
  padding-left: 60px;
}

.js .menu-title {
  cursor: default;
}

.right-buttons {
  top: 18px;
  position: absolute;
}

.right-buttons {
  margin: 0;
  right: 16px;
}

#menu-bar .right-buttons a,
#menu-bar .right-buttons .icon-button {
  display: inline-block;
  text-align: center;
  height: 44px;
  border-radius: 22px;
  line-height: 44px;
  font-size: 16px;
  padding-left: 22px;
  padding-right: 22px;
  background-color: var(--fg);
  color: var(--bg);
  min-width: 104px;
  box-sizing: border-box;
  font-weight: 400;
  letter-spacing: 1px;
}

#menu-bar .right-buttons button {
  font-family: inherit;
}

#menu-bar .right-buttons a:hover,
#menu-bar .right-buttons button:hover {
  background-color: var(--links);
}

#search-wrapper ~ .right-buttons #search-toggle {
  background-color: var(--links);
}

#search-wrapper.hidden ~ .right-buttons #search-toggle {
  background-color: var(--fg);
}

.legacy-notice {
  display: inline-block;
  line-height: 44px;
  font-size: 14px;
  color: #666;
  margin-right: 16px;
}

#menu-bar .right-buttons .legacy-notice a {
  display: inline;
  background: none;
  color: var(--links);
  padding: 0;
  min-width: auto;
  height: auto;
  line-height: inherit;
  font-size: inherit;
  text-decoration: underline;
}

#menu-bar .right-buttons .legacy-notice a:hover {
  background: none;
  color: var(--fg);
}

.nav-chapters {
  display: none;
}

#menu-bar i,
#menu-bar .icon-button {
  line-height: 44px;
}

.nav-chapters i {
  color: var(--bg);
  position: relative;
}

.nav-chapters:hover {
  background-color: var(--links);
}

.previous {
  left: calc(var(--sidebar-width) + 8px);
}

.previous i {
  left: -1px;
  top: -1px;
}

.next {
  right: 8px;
  top: -1px;
}

.next i {
  left: 1px;
}

/* fix theme problems */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-comment,
.hljs-quote {
  color: inherit;
}

/* Banner */
.banner {
    background-color: var(--banner-bg);
    border-bottom: none;
    padding: 12px 24px;
    font-size: 14px;
    line-height: 1.5em;
    color: var(--bg);
    text-align: center;
    flex-shrink: 0;
}

#body-container {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.sidebar {
    position: absolute;
}

.banner strong {
    color: var(--bg);
}

.banner a {
    color: var(--bg);
    font-weight: 500;
    text-decoration: underline;
}

.banner a:hover {
    color: #e0e0e0;
}

.scalar-api-page {
  height: calc(100vh - var(--menu-bar-height) - var(--banner-height));
  overflow: auto;
  padding: 0;

  --scalar-font: HostGrotesk, Helvetica, sans-serif;
}

.scalar-api-page p,
.scalar-api-page ul,
.scalar-api-page ul li,
.scalar-api-page ul li:before,
.scalar-api-page ol,
.scalar-api-page ol li,
.scalar-api-page main {
  all: revert;
}

/* Prevent layout shift on response item hover */
.scalar-api-page .parameter-item-trigger {
  position: relative;
}

.scalar-api-page .parameter-item-trigger > div:last-child:has(.selected-content-type) {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  overflow: visible;
}

.page:has(.scalar-api-page) {
  overflow: hidden;
}

/* Removes "Powered by Scalar" text. */
.darklight-reference {
  visibility: hidden;
}

/* ===== Mobile: tablet and below ===== */

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0;
    --menu-bar-height: 60px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: 100;
    width: 264px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  body.sidebar-visible {
    overflow: hidden;
  }

  body.sidebar-visible .sidebar {
    transform: translateX(0);
  }

  body.sidebar-visible .sidebar-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
  }

  #menu-bar {
    display: flex;
    align-items: center;
    padding: 0 12px;
  }

  .left-buttons {
    display: flex;
    align-items: center;
  }

  #sidebar-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--fg);
    font-size: 20px;
    padding: 0 4px;
    cursor: pointer;
    line-height: 1;
  }

  .menu-title {
    font-size: 24px;
    padding-left: 0;
    line-height: var(--menu-bar-height);
  }

  .right-buttons {
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  #menu-bar .right-buttons a,
  #menu-bar .right-buttons .icon-button {
    padding-left: 14px;
    padding-right: 14px;
    min-width: auto;
    font-size: 14px;
    height: 36px;
    line-height: 36px;
    border-radius: 18px;
  }

  #menu-bar .right-buttons #search-toggle {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  #menu-bar .right-buttons #search-toggle i {
    line-height: 36px;
  }

  .content {
    padding-left: 24px;
    padding-right: 24px;
  }

  h1 {
    font-size: 32px;
    margin-top: 36px;
  }

  h2 {
    font-size: 22px;
    margin-top: 36px;
  }

  .banner {
    font-size: 12px;
    padding: 8px 16px;
    line-height: 1.4em;
  }

  .table-wrapper {
    overflow-x: auto;
  }

  table {
    float: none;
  }

  .searchbar-outer {
    width: calc(100% - 32px);
    left: 16px;
  }

  .searchresults-content {
    width: calc(100% - 32px);
    left: 16px;
  }
}

/* ===== Mobile: small phones ===== */

@media (max-width: 480px) {
  .sidebar {
    width: min(264px, 80vw);
  }

  .content {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  p,
  .content p {
    font-size: 15px;
  }

  .menu-title {
    font-size: 20px;
  }

  .content code.hljs {
    font-size: 13px;
  }
}
