@import url("https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,600;1,400&display=swap");

/* Light mode styles (default) */
:root {
  --text-color: #0f1729;
  --background-color: #ffffff;
  --link-color: #b15210;
  --link-hover-color: #e36914;
  --button-color: var(--link-hover-color);
  --button-hover-color: #ca5e11;
  --admonition-bg: #f0f9ff;
  --admonition-color: rgba(12, 74, 110, 1);
  --code-bg: #fff;
  --sidebar-bg: rgb(241, 245, 249, 0.5);
  --current-link-color: #ca5e12;
  --header-link-color: #475467;
  --downloads-link-color: #1f78d1;
}

/* Dark mode styles */
html.dark {
  --text-color: #e0e0e0;
  --background-color: #020614;
  --link-color: #ff9d5c;
  --link-hover-color: #ee7f31;
  --button-color: #ef7f2f;
  --button-hover-color: var(--link-color);
  --admonition-bg: #2c2c2c;
  --admonition-color: #b0d4ff;
  --code-bg: #2c2c2c;
  --sidebar-bg: rgba(60, 60, 60, 0.5);
  --current-link-color: #ee7f31;
  --header-link-color: #b0b0b0;
  --downloads-link-color: #67b3ff;
}

body {
  color: var(--text-color);
  background-color: var(--background-color);
}

.font-sans {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    Cantarell,
    Noto Sans,
    sans-serif,
    Apple Color Emoji,
    Segoe UI Emoji,
    Segoe UI Symbol,
    Noto Color Emoji;
}

b,
strong {
  font-weight: 600;
}

.contents,
.toctree-wrapper {
  font-size: 1rem;
  line-height: 1.25rem;
}

.contents ul,
.toctree-wrapper ul {
  list-style-type: inherit !important;
  margin: inherit !important;
  padding-left: 1.5rem !important;
}

.contents ul li a.reference,
.toctree-wrapper ul li a.reference {
  color: var(--link-color) !important;
  text-decoration-line: underline !important;
}

.admonition {
  font-size: inherit;
  line-height: 1.75rem;
  margin: 1rem 0;
}
.admonition-title {
  font-weight: 600;
}
.seealso {
  border-color: var(--admonition-color);
  background-color: var(--admonition-bg);
  color: var(--admonition-color);
}

table {
  font-size: 0.925rem;
  line-height: 1.5rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}
table thead th {
  font-weight: 600;
}

#content img {
  margin: 1rem 0;
}

#content figure {
  margin: 1rem 0;
}
#content figure img {
  margin: 0;
}
#content figcaption {
  margin-bottom: 0rem;
}

#content h1 {
  letter-spacing: -0.7px;
  font-weight: 600;
  font-size: 2.2rem;
  margin: 0 0 1rem 0;
}
#content h1 em {
  font-style: normal;
  color: var(--link-hover-color);
}
html.dark #content h1 em {
  color: var(--link-color);
}
#content h2 {
  margin-top: 2rem;
  font-size: 1.6em;
  font-weight: 600;
}
p.caption {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  padding: 0 !important;
  font-weight: 600 !important;
}
#content h3 {
  margin-top: 2rem;
  font-size: 1.3rem;
  font-weight: 600;
}

#content ul:not(.search) p,
#content ul:not(.search) > li,
#content section > p,
#content ul:not(.search) {
  margin-top: 1rem;
}

pre {
  background: var(--code-bg);
  margin-top: 1rem;
}

code.download {
  font-family: inherit;
  background: inherit;
  white-space: normal;
  font-size: inherit;
}

#content a:not(.toc-backref),
#right-sidebar ul li a[data-current="true"] {
  color: var(--link-color) !important;
}
#content a:not(.toc-backref, .image-reference):hover {
  filter: brightness(135%);
}
#content a:not(.toc-backref, .image-reference):visited {
  filter: brightness(80%);
}
html.dark #content a:not(.toc-backref, .image-reference):hover {
  filter: brightness(120%);
}
html.dark #content a:not(.toc-backref, .image-reference):visited {
  filter: brightness(90%);
}

#content .admonition a {
  color: inherit !important;
  font-weight: 600;
}

#content .toctree-wrapper {
  line-height: 1.5rem;
}

#content .toctree-wrapper a.reference {
  color: var(--text-color) !important;
}
#content .toctree-wrapper a.reference:hover {
  filter: brightness(300%);
}
#content .toctree-wrapper a.reference:visited {
  filter: none;
}

a.rounded-md,
a.rounded-md:hover {
  background-color: var(--button-color);
  color: var(--background-color);
  font-weight: 600;
}
a.rounded-md:hover {
  background-color: var(--button-hover-color);
}

a.rounded-md svg.mr-2 {
  margin-left: -0.35rem;
}
a.rounded-md svg.ml-2 {
  margin-right: -0.35rem;
}

.contents .topic-title {
  padding-top: 0.5rem;
}

header.sticky span.hidden,
#left-sidebar > a > span {
  display: none;
}

header.sticky a.items-center > img,
#left-sidebar > a > img {
  width: 125px;
}

@media (min-width: 768px) {
  #left-sidebar {
    padding: 1rem 0;
  }
}

#left-sidebar > div.h-\[calc\(100vh-8rem\)\] {
  height: auto;
  overflow-y: hidden;
  padding-bottom: 0;
  margin-bottom: 0;
}

#left-sidebar ul ul {
  padding: 0.25rem 0 0.25rem 0.5rem;
  margin-left: 0.4rem;
}

#left-sidebar .toctree-l2.current a.current {
  width: auto;
  margin-left: 0.2rem;
}

#left-sidebar a.current {
  cursor: default;
  text-decoration: none !important;
}

#left-sidebar .toctree-l2.current ul {
  padding-top: 0;
  padding-bottom: 0;
}

#left-sidebar li.toctree-l2 a:not(.current) {
  padding: 0.25rem 0.45rem 0.25rem 0.4rem;
}

#left-sidebar li.toctree-l2.current a.expanded:not(.current) {
  padding-top: 0 !important;
}

#left-sidebar > div > div.pr-6 {
  padding-right: 1rem;
}
#left-sidebar > div > div > nav.table {
  margin-top: 0.6rem;
  margin-bottom: 0;
}

#left-sidebar a.current,
#left-sidebar li.current > a {
  font-weight: 600;
}

#left-sidebar a.current {
  color: var(--current-link-color);
  background-color: var(--sidebar-bg);
}

.overflow-y-auto {
  scrollbar-width: thin;
}

#left-sidebar > div > div > nav.md\:hidden,
#left-sidebar > a > img {
  margin-top: 0;
  line-height: 1rem;
}

#left-sidebar > a {
  display: block;
  padding-top: 0;
  padding-bottom: 0;
}

header.sticky > div.container {
  height: 85px;
}

header.sticky {
  border: 0 none;
}

header.sticky > .container > .md\:flex {
  flex-grow: 1;
  margin: 0;
  width: 100%;
}
header.sticky nav.items-center {
  margin: 0 auto;
}

header.sticky nav.items-center a {
  color: var(--header-link-color);
  font-size: 15px;
  font-weight: 600;
}

header.sticky nav.items-center a:hover,
header.sticky nav.items-center a:focus {
  color: var(--link-hover-color);
}

footer p {
  font-size: 0.8rem;
  color: var(--text-color);
}

main > div .flex.justify-between.items-center.pt-6 {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

/* lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.lightbox img {
  border: 0 none;
  vertical-align: top;
  height: auto;
  max-width: 99%;
  margin: 0.5%;
}

.lightbox-content {
  border-radius: 5px;
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 100%;
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 36px;
}

/* version switcher */
.doc-versions {
  font-size: 14px;
  padding-left: 8px;
  padding-right: 8px;
  font-weight: 600;
}
.doc-versions .dropdown {
  display: inline-block;
}
.doc-versions .dropbtn {
  padding: 4px 5px 4px 15px;
  margin-left: 6px;
  font-size: 14px;
}
.doc-versions .dropbtn svg {
  rotate: 90deg;
  display: inline;
  margin-left: 5px;
}
.doc-versions .dropbtn,
.doc-versions .dropdown-content {
  min-width: 75px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background-color: var(--background-color);
  font-size: 14px;
  text-align: left;
}
.doc-versions .dropdown-content {
  position: absolute;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1;
  text-align: center;
  margin: -1px 0 0 6px;
}
.doc-versions .dropbtn.disabled {
  min-width: unset;
  padding-right: 16px;
  cursor: not-allowed;
  filter: brightness(0.9);
}
.doc-versions .dropdown-content a {
  color: var(--theme-link-color);
  padding: 4px 5px 4px 15px !important;
  text-decoration: none !important;
  display: block !important;
  border-bottom: 1px solid var(--theme-border-color);
  text-align: left;
}
.doc-versions .dropdown-content a:hover {
  color: var(--button-hover-color);
}
.doc-versions .dropbtn.active {
  border-radius: 8px 8px 0 0;
}
.offline-docs {
  margin-top: 8px;
  padding-top: 8px;
  padding-right: 16px;
  border-top: 1px solid hsl(var(--border));
  font-size: 12px;
}
.offline-docs .heading {
  padding: 7px 9px;
}
.offline-docs h6 {
  text-transform: uppercase;
  font-weight: 600;
}
.offline-docs .urls {
  color: #d4d4d8;
  padding: 0px 8px;
}
.offline-docs .urls a {
  display: inline-block !important;
  width: fit-content !important;
  padding: 0px 8px !important;
  color: var(--downloads-link-color);
}
.offline-docs .urls a:first-child {
  padding-left: 0px !important;
}

/* navigation */
.navigation-dropdown {
  border-radius: 0.75rem;
  margin-left: -48%;
  margin-top: 5px;
  transition-duration: 0.4s;
  transition-property: opacity;
  color: var(--background-color);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border: 1px solid hsl(var(--border));
}
.navigation-dropdown a {
  padding: 0.375rem 1rem;
  white-space: nowrap;
  width: 100%;
}
#left-sidebar nav.md\:hidden {
  margin-top: 1rem !important;
}
