@import url("https://cdn.jsdelivr.net/npm/@picocss/pico@2.0.6/css/pico.min.css");

html {
  font-size: 16px;
}
body {
  font-size: 1rem;
  line-height: 1.7;
  background: var(--pico-background-color, #181c20);
  color: var(--pico-color, #fff);
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}
.docs-container {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 270px;
  background: var(--pico-card-background-color, #23272e);
  border-right: 1px solid #222;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  left: 0;
  overflow-y: auto;
  z-index: 10;
}
.sidebar-header {
  padding: 2rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid #222;
  background: var(--pico-card-background-color, #23272e);
}
.sidebar-header h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem 0;
  font-weight: 700;
  color: #4caf50;
}
.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
#search {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #23272e;
  color: #fff;
  font-size: 1rem;
}
.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar nav ul li {
  margin: 0;
}
.sidebar nav ul li a {
  display: block;
  font-size: 1rem;
  padding: 0.7rem 1.2rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-left: 4px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.sidebar nav ul li a.active,
.sidebar nav ul li a:hover {
  background: #222b2f;
  border-left: 4px solid #4caf50;
  color: #4caf50;
}
.content {
  flex: 1;
  font-size: 1.02rem;
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  max-width: 820px;
  margin: 0 auto;
  background: var(--pico-background-color, #181c20);
  height: 100vh;
  overflow-y: auto;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.5em;
  margin-bottom: 0.7em;
}
h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.4rem;
}
h3 {
  font-size: 1.15rem;
}
h4,
h5,
h6 {
  font-size: 1rem;
}
pre,
code {
  font-size: 0.95em;
}
pre {
  padding: 0.7em 1em;
  overflow-x: auto;
}
ul,
ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
::-webkit-scrollbar {
  width: 8px;
  background: #23272e;
}
::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

/* Light mode overrides */
html[data-theme="light"] body {
  background: #f8fafc;
  color: #222;
}
html[data-theme="light"] .sidebar {
  background: #f3f4f6;
  border-right: 1px solid #e5e7eb;
}
html[data-theme="light"] .sidebar-header {
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}
html[data-theme="light"] .sidebar-header h2 {
  color: #388e3c;
}
html[data-theme="light"] .sidebar nav ul li a {
  color: #222;
  background: none;
  border-left: 4px solid transparent;
}
html[data-theme="light"] .sidebar nav ul li a.active,
html[data-theme="light"] .sidebar nav ul li a:hover {
  background: #e8f5e9;
  border-left: 4px solid #388e3c;
  color: #388e3c;
}
html[data-theme="light"] .content {
  background: #fff;
  color: #222;
}
html[data-theme="light"] code,
html[data-theme="light"] pre {
  background: #f3f4f6;
  color: #388e3c;
}
html[data-theme="light"] #search {
  background: #fff;
  color: #222;
  border: 1px solid #e5e7eb;
}
html[data-theme="light"] .mobile-header {
  background: #f3f4f6;
  color: #388e3c;
}
html[data-theme="light"] .mobile-logo {
  color: #388e3c;
}
html[data-theme="light"] .mobile-darkmode-toggle {
  color: #388e3c;
}

/* Style code tags inside the security warning box for both themes */
#security-warning code {
  background: #ffeaea !important;
  color: #b30000 !important;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.98em;
}
html[data-theme="dark"] #security-warning code {
  background: #ffeaea !important;
  color: #b30000 !important;
}

.about-branding {
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem 0;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.about-branding-logo {
  height: 90px;
  width: 90px;
  border-radius: 22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
}
.about-branding-desc {
  max-width: 500px;
  margin: 0 auto 1.2rem auto;
  font-size: 1.08rem;
}
.about-branding-quote {
  font-style: italic;
  color: #388e3c;
  font-size: 1.1rem;
  margin: 1.5rem auto;
  max-width: 600px;
}
.about-branding-sponsor {
  margin: 2rem auto 1rem auto;
  max-width: 600px;
}
html[data-theme="dark"] .about-branding {
  border-top: 1px solid #222b2f;
}
html[data-theme="dark"] .about-branding-quote {
  color: #4caf50;
}
.footer-follow a,
.footer-follow span {
  text-decoration: none !important;
  border: none !important;
  margin-top: 0.5em;
  font-size: 0.98em;
  color: var(--muted);
}
@media (max-width: 900px) {
  .mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding-left: 1rem;
    padding-right: 1rem;
    height: 3.2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1100;
    background: #23272e;
    color: #4caf50;
    font-weight: 700;
    font-size: 1.1rem;
    box-sizing: border-box;
  }
  .mobile-hamburger {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #4caf50;
    padding: 0.2rem 0.5rem 0.2rem 0;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
  }
  .mobile-logo {
    font-weight: 700;
    color: #4caf50;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
  }
  .mobile-darkmode-toggle {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #4caf50;
    cursor: pointer;
    margin: 0;
    padding: 0.2rem 0 0.2rem 0.5rem;
    display: flex;
    align-items: center;
  }
  .sidebar-header #darkmode-toggle {
    display: none !important;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    z-index: 1101;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.08);
    background: var(--pico-card-background-color, #23272e);
    margin-top: 0;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1100;
    opacity: 1;
    transition: opacity 0.2s;
  }
  .sidebar-backdrop.hide {
    opacity: 0;
    pointer-events: none;
  }
  .content {
    margin-top: 3.2rem;
    padding: 1.2rem 0.5rem;
    max-width: 100vw;
    overflow-x: hidden;
  }
  #sidebar-toggle {
    display: block;
  }
  body.sidebar-open {
    overflow: hidden;
  }
  .about-branding {
    max-width: 100vw;
    padding: 2rem 0.5rem 1rem 0.5rem;
  }
  .about-branding-logo {
    height: 70px;
    width: 70px;
  }
  .about-branding-sponsor iframe {
    width: 100% !important;
    min-width: 0;
  }
}
@media (min-width: 901px) {
  .mobile-header {
    display: none !important;
  }
  #sidebar-toggle {
    display: none !important;
  }
  .sidebar-backdrop {
    display: none !important;
  }
}
