/* AMD BC250 Documentation - Custom Styles */
/* Inspired by SlimeVR documentation design */

/* Optimize for wider displays */
.md-grid {
  max-width: 100%;
}

.md-main__inner {
  margin-top: 0;
  padding: 0 0.75rem;
}

.md-content {
  max-width: 100%;
}

.md-content__inner {
  padding: 0.75rem 1.25rem;
  margin: 0 auto;
  max-width: 50rem;
}

/* Reduce font size for documentation content */
.md-typeset {
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--md-typeset-color);
}

.md-typeset h1 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 0.875rem;
  line-height: 1.3;
}

.md-typeset h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  line-height: 1.35;
  padding-top: 0.25rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1rem 0 0.375rem;
  line-height: 1.4;
}

.md-typeset h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0.875rem 0 0.375rem;
}

.md-typeset p,
.md-typeset ul,
.md-typeset ol {
  margin-bottom: 0.625rem;
}

/* Sidebar Navigation Styling */
.md-sidebar {
  width: 13rem;
}

.md-sidebar--primary {
  left: 0;
}

.md-sidebar--secondary {
  width: 12rem;
}

.md-nav {
  font-size: 0.6875rem;
  line-height: 1.5;
}

.md-nav__title {
  font-weight: 700;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.625rem;
  color: var(--md-default-fg-color--light);
}

.md-nav__item {
  padding: 0;
}

.md-nav__link {
  margin: 0;
  padding: 0.3125rem 0.625rem;
  border-radius: 0.25rem;
  transition: background-color 0.125s ease;
}

.md-nav__link:hover {
  background-color: var(--md-accent-fg-color--transparent);
}

.md-nav__link--active {
  font-weight: 600;
  color: var(--md-accent-fg-color);
  background-color: var(--md-accent-fg-color--transparent);
}

/* Section labels in sidebar */
.md-nav__item--section > .md-nav__link {
  font-weight: 700;
  color: var(--md-default-fg-color);
  padding-top: 0.5rem;
  padding-bottom: 0.25rem;
}

.md-nav__item--section > .md-nav__link:hover {
  background-color: transparent;
}

/* Nested navigation items */
.md-nav--secondary .md-nav__item {
  padding-left: 0;
}

.md-nav--secondary .md-nav__link {
  padding-left: 1.25rem;
  font-size: 0.625rem;
}

/* Table of Contents in right sidebar */
.md-sidebar--secondary {
  order: 2;
  margin-left: 0;
}

.md-sidebar--secondary .md-nav {
  font-size: 0.625rem;
}

.md-sidebar--secondary .md-nav__link {
  padding: 0.25rem 0.5rem;
}

/* Responsive adjustments */
@media screen and (min-width: 76.25em) {
  .md-sidebar {
    width: 14rem;
  }

  .md-sidebar--secondary {
    width: 13rem;
  }

  .md-content__inner {
    max-width: 55rem;
  }
}

@media screen and (min-width: 100em) {
  .md-sidebar {
    width: 15rem;
  }

  .md-sidebar--secondary {
    width: 14rem;
  }

  .md-content__inner {
    max-width: 70rem;
    padding: 1rem 1.75rem;
  }
}

@media screen and (min-width: 120em) {
  .md-sidebar {
    width: 16rem;
  }

  .md-sidebar--secondary {
    width: 15rem;
  }

  .md-content__inner {
    max-width: 85rem;
  }
}

/* Enhance admonition styling */
.md-typeset .admonition,
.md-typeset details {
  border-left: 0.25rem solid;
  border-radius: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-weight: 600;
  font-size: 0.75rem;
  margin: -0.5rem -0.75rem 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* Grid cards spacing */
.grid.cards {
  margin-top: 1rem;
}

/* Code block improvements */
.md-typeset pre {
  border-radius: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  margin: 0.75rem 0;
}

.md-typeset pre > code {
  padding: 0.625rem 0.875rem;
  font-size: 0.6875rem;
  line-height: 1.45;
}

.md-typeset code {
  font-size: 0.6875rem;
  padding: 0.0625rem 0.25rem;
  border-radius: 0.1875rem;
  background-color: var(--md-code-bg-color);
  box-shadow: 0 0 0 1px var(--md-default-fg-color--lightest);
}

/* Make tables more readable */
.md-typeset table:not([class]) {
  font-size: 0.6875rem;
  border-radius: 0.25rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin: 0.75rem 0;
}

.md-typeset table:not([class]) th {
  background-color: var(--md-default-fg-color--lightest);
  font-weight: 600;
  padding: 0.375rem 0.625rem;
  font-size: 0.6875rem;
}

.md-typeset table:not([class]) td {
  padding: 0.375rem 0.625rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset table:not([class]) tr:last-child td {
  border-bottom: none;
}

/* Checklist styling */
.task-list-item {
  list-style-type: none;
}

.task-list-item input[type="checkbox"] {
  margin-right: 0.375rem;
}

/* Warning boxes - make them more prominent */
.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-left-color: #ff1744;
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left-color: #ff9100;
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left-color: var(--md-accent-fg-color);
}

.md-typeset .admonition.info,
.md-typeset details.info {
  border-left-color: var(--md-primary-fg-color);
}

/* Link styling */
.md-typeset a {
  text-decoration: none;
  transition: color 0.125s ease;
}

.md-typeset a:hover {
  text-decoration: underline;
}

/* Improve list spacing */
.md-typeset ul,
.md-typeset ol {
  padding-left: 1.125rem;
}

.md-typeset li {
  margin-bottom: 0.1875rem;
}

.md-typeset li > p {
  margin-bottom: 0.1875rem;
}

/* Blockquote styling */
.md-typeset blockquote {
  border-left: 0.25rem solid var(--md-default-fg-color--light);
  padding-left: 0.75rem;
  margin: 0.75rem 0;
  color: var(--md-default-fg-color--light);
  font-style: italic;
  font-size: 0.75rem;
}

/* Horizontal rule */
.md-typeset hr {
  border: none;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  margin: 1.25rem 0;
}
