/* ConfigHub Corporate Styling */

:root {
  /* Primary brand color - orange/rust */
  --md-primary-fg-color: #ba3d03;
  --md-primary-fg-color--light: #D85D33;
  --md-primary-fg-color--dark: #A73F1C;

  /* Accent color - use rust/orange for better readability */
  --md-accent-fg-color: #ba3d03;
  --md-accent-fg-color--transparent: rgba(199, 77, 35, 0.1);

  /* Background colors */
  --md-default-bg-color: #ffffff;
  --md-code-bg-color: #F5F3EE;

  /* Text colors - dark gray/near-black */
  --md-default-fg-color: #3a3a3a;
  --md-default-fg-color--light: #5a5a5a;
  --md-default-fg-color--lighter: #7a7a7a;
  --md-default-fg-color--lightest: #aaaaaa;
  --md-typeset-color: #2c2c2c;
  --md-code-fg-color: #2c2c2c;
}

/* Font smoothing for better rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Primary color overrides */
.md-header {
  background-color: #ba3d03;
  color: #ffffff;
}

.md-header__title,
.md-header__button {
  color: #ffffff;
}

/* Make source repo icon and text visible */
.md-source__icon {
  color: #ffffff !important;
}

.md-source__icon svg {
  fill: #ffffff !important;
}

/* Make GitHub source link text visible against rust header */
.md-source {
  color: #ffffff !important;
}

.md-source__repository {
  color: #ffffff !important;
}

.md-source__facts {
  color: #ffffff !important;
}

.md-source__fact {
  color: #ffffff !important;
}

.md-source__fact--version {
  color: #ffffff !important;
}

.md-source__fact--stars {
  color: #ffffff !important;
}

.md-source__fact--forks {
  color: #ffffff !important;
}

/* Make logo white to contrast with rust header and center vertically */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  filter: brightness(0) invert(1);
}

/* Normalize header title styling */
.md-header__title {
  font-size: 1rem !important;
}

/* Make site title font-weight same as section titles */
.md-header__topic:first-child {
  font-weight: inherit !important;
}

.md-logo {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

.md-header__button.md-logo {
  margin-right: 0 !important;
  padding-right: 0 !important;
  /* Fix vertical alignment with title text */
  display: flex !important;
  align-items: center !important;
  transform: translateY(0.1px) !important;
}

.md-tabs {
  background-color: #ba3d03;
  color: #ffffff;
}

.md-tabs__link {
  color: #ffffff;
  opacity: 1
}

.md-tabs__link--active {
  color: #ffffff;
  font-weight: bold;
}

.md-tabs__link:hover {
  color: #ffffff;
}

/* Links and buttons */
a {
  color: #ba3d03;
}

a:hover {
  color: #A73F1C;
}

/* Make section index links look like section headings, not links */
.md-nav__container > a.md-nav__link {
  color: var(--md-default-fg-color--light) !important;
  cursor: default;
}

.md-nav__container > a.md-nav__link:hover {
  color: var(--md-default-fg-color--light) !important;
}

/* Fix search result headings - make them readable */
.md-search-result__article h1 {
  color: #2c2c2c !important;
}

/* Focus states */
a:focus,
button:focus,
input:focus {
  outline: 2px solid #ba3d03;
  /* outline-offset: 2px; */
}

/* API Reference table styling - prevent word breaks within code elements */
.md-typeset table:not([class]) code {
  white-space: nowrap;
}

/* Prevent breaking checkmarks and other inline content */
.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  /* Allow wrapping but prevent orphaned single characters */
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Get as Markdown button styling */
.md-content__button-group {
  display: flex;
  gap: 0.4rem;
  float: right;
  margin-left: 0.4rem;
  margin-bottom: 0.4rem;
}

.markdown-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--md-default-fg-color--lighter);
  transition: color 0.25s;
}

.markdown-link:hover {
  color: var(--md-accent-fg-color);
}

.markdown-link svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

/* Ensure button is visible on mobile */
@media screen and (max-width: 76.1875em) {
  .md-content__button-group {
    margin-top: 0.4rem;
  }
}
