:root {
  --ifm-background-color: white;
  --ifm-color-primary: #d73a49;
  --ifm-color-primary-dark: #cc2939;
  --ifm-color-primary-darker: #c12736;
  --ifm-color-primary-darkest: #9f202c;
  --ifm-color-primary-light: #dc515e;
  --ifm-color-primary-lighter: #de5c68;
  --ifm-color-primary-lightest: #e57e88;
  --ifm-font-family-monospace: 'Fira Mono', 'DejaVu Sans Mono', Menlo, Consolas,
    'Liberation Mono', Monaco, 'Lucida Console', monospace;
  --ifm-transition-fast: 120ms;
  --ifm-code-border-radius: 4px;
  --ifm-toc-border-color: transparent;
  --ifm-heading-font-weight: 700;
  --ifm-navbar-shadow: none;
  --ifm-navbar-height: 75px;
  --ifm-global-radius: 1rem;
  --ifm-code-font-size: 13px;
  --menu-background: var(--ifm-color-emphasis-100);
  --ifm-tabs-padding-vertical: 8px;
  --ifm-menu-color: inherit;
  --ifm-menu-color-background-active: inherit;
  --ifm-menu-color-background-hover: inherit;
  --ifm-menu-link-sublist-icon: url('/images/sublist-icon.svg');
  --ifm-navbar-background-color: var(--menu-background);
  --doc-sidebar-width: 260px !important;
}

html[data-theme='dark'] {
  --ifm-color-primary: #ffd866;
  --ifm-color-primary-dark: #ffcf42;
  --ifm-color-primary-darker: #ffca30;
  --ifm-color-primary-darkest: #faba00;
  --ifm-color-primary-light: #ffe18a;
  --ifm-color-primary-lighter: #ffe69c;
  --ifm-color-primary-lightest: #fff3d1;
  --ifm-toc-border-color: transparent;
}

html[data-theme='dark'] .rdp {
  --rdp-background-color: var(--rdp-background-color-dark);
  --rdp-accent-color-light: var(--rdp-accent-color-dark);
  --rdp-accent-color-lighter: var(--rdp-accent-color-darker);
  --rdp-accent-color-lightest: var(--rdp-accent-color-darkest);
}

body {
  text-rendering: optimizeLegibility;
}

.menu {
  border-radius: var(--ifm-global-radius);
  background-color: var(--menu-background);
  padding: 1rem 0;
  margin-right: 0.75rem;
  font-weight: normal;
}

.menu__list {
  transition-duration: var(--ifm-transition-fast) !important;
}

@media (min-width: 997px) {
  .menu {
    padding-top: 1rem !important;
    margin: 0.5rem 0.75rem 1rem 1rem !important;
  }
  .navbar {
    /* position: relative; */
    background-color: var(--ifm-background-color);
  }
  .navbar__inner {
    background-color: var(--menu-background);
    padding: 0.5rem 1rem 1rem 0.75rem;
    border-radius: var(--ifm-global-radius);
  }
  .navbar__brand {
    width: calc(var(--doc-sidebar-width) - 2.75rem);
  }
  [class^='sidebarLogo'] {
    background: var(--menu-background);
    border-radius: var(--ifm-global-radius);
    /* justify-content: center; */
    padding-left: 1rem;
    margin: 0.75rem 0.75rem 0 1rem !important;
    min-height: calc(var(--ifm-navbar-height) - 20px) !important;
  }
}

.docusaurus-highlight-code-line {
  display: block;
  margin: 0 calc(-1 * var(--ifm-pre-padding));
  padding: 0 var(--ifm-pre-padding);
  background-color: var(--ifm-color-emphasis-200);
}

html[data-theme='dark'] .docusaurus-highlight-code-line {
  background-color: var(--ifm-code-background);
}

@media (min-width: 997px) {
  .table-of-contents:before {
    display: block;
    color: var(--ifm-color-emphasis-500);
    content: 'On this page';
    text-transform: uppercase;
    font-weight: bold;
    padding-bottom: 0.5em;
  }
}

.table-of-contents li {
  margin: 0.625rem 0;
  line-height: 1.1rem;
}

hr {
  all: revert;
}

.theme-doc-sidebar-item-category {
  margin: 1em 0 !important;
}

.header-github-link::before {
  content: '';
  width: 24px;
  height: 24px;
  display: flex;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    no-repeat;
}

[data-theme='dark'] .header-github-link::before {
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    no-repeat;
}

[class*='tocCollapsibleButton'] {
  padding-left: 0 !important;
}

.dialog-sheet {
  background: white;
  border-radius: 4px;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.04), 0px 4px 5px rgba(0, 0, 0, 0.06),
    0px 2px 4px -1px rgba(0, 0, 0, 0.09);
}

html[data-theme='dark'] .dialog-sheet {
  background: #191c1f;
  border-radius: 4px;
  box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.2), 0px 4px 5px rgba(0, 0, 0, 0.3),
    0px 2px 4px -1px rgba(0, 0, 0, 0.4);
}

/* #endregion */

/* #region: sandpack styles */
.sp-wrapper {
  border-radius: var(--ifm-global-radius) !important;
}
.sp-layout {
  margin-bottom: var(--ifm-leading);
  border: 0 !important;
}

.sp-overlay {
  --sp-colors-bg-default: var(--ifm-background-color);
}

.sp-code-editor,
.cm-editor,
.cm-gutter {
  --sp-colors-bg-default: var(--menu-background);
  background-color: var(--sp-colors-bg-default);
}

.sp-stack:last-child {
  border: 0 !important;
}

.sp-preview-container,
.sp-loading {
  background-color: var(--menu-background) !important;
}

/* #endregion */

/* #region: markdown docs  */
.markdown h1:first-child {
  --ifm-h1-font-size: 2.5rem;
  font-weight: 500;
}

.markdown > h2 {
  font-weight: 700;
  --ifm-h2-font-size: 1.5rem;
}

.markdown > h3 {
  --ifm-h3-font-size: 1.2rem;
  font-weight: 700;
}

.markdown hr {
  height: 1px;
  border: none;
  background-color: var(--ifm-color-emphasis-200);
}

/* #endregion */

/* Remove CSS pollution from docusaurus. See https://github.com/facebook/docusaurus/issues/6032 */
.rdp {
  box-sizing: revert;
}
.rdp-table {
  border-collapse: revert;
  display: revert;
  margin-bottom: revert;
  overflow: revert;
}

.rdp-table tr:nth-child(2n) {
  background-color: revert;
}

.rdp-head {
  background-color: revert;
}
.rdp-head_row {
  border-bottom: revert;
  background-color: revert;
  border-top: revert;
}

.rdp-head_cell {
  font: revert;
  color: revert;
  background-color: revert;
  border: revert;
}

.rdp-table tr,
.rdp-row {
  background-color: revert;
  border-top: revert;
}

.rdp-table td {
  border: revert;
  padding: revert;
  color: revert;
}

.rdp p {
  margin: revert;
}

.rdp-cell {
  color: revert;
  border: revert;
  background-color: revert;
}
