/*
  adTempus API documentation styles.
*/

:root {
  --adt-header-bg: #5a5a5a;
  --adt-header-fg: #fff;
  --adt-header-border: #bbb;
  --adt-accent: #0050c5;
  --adt-link: #1364c4;
  --adt-link-hover: #960bb4;
  --adt-text: #222;
  --adt-font: "Segoe UI", Segoe, "Segoe WP", "Helvetica Neue", Helvetica, sans-serif;
  --adt-font-light: "Segoe UI Light", "Segoe UI", "Segoe WP", "Helvetica Neue", Helvetica, sans-serif;
}

[data-bs-theme="light"] {
  --bs-body-color: var(--adt-text);
  --bs-body-color-rgb: 34, 34, 34;
  --bs-link-color: var(--adt-link);
  --bs-link-color-rgb: 19, 100, 196;
  --bs-link-hover-color: var(--adt-link-hover);
  --bs-link-hover-color-rgb: 150, 11, 180;
}

[data-bs-theme="dark"] {
  --adt-header-bg: #3c3c3c;
  --adt-accent: #2f6fd6;
  --bs-link-color: #6ea8fe;
  --bs-link-color-rgb: 110, 168, 254;
  --bs-link-hover-color: #c58af9;
  --bs-link-hover-color-rgb: 197, 138, 249;
}

body {
  font-family: var(--adt-font);
  --bs-body-font-family: var(--adt-font);
}

/* ---------- Header banner ---------- */

body > header.adt-header {
  background-color: var(--adt-header-bg);
  color: var(--adt-header-fg);
  border-bottom: 0;
}

.adt-header .navbar {
  --bs-navbar-padding-y: 0;
  --bs-navbar-brand-padding-y: 0;
  --bs-navbar-brand-color: var(--adt-header-fg);
  --bs-navbar-brand-hover-color: var(--adt-header-fg);
}

.adt-header .navbar-brand {
  gap: 1rem;
}

.adt-header .navbar-brand #logo {
  height: 44px;
  width: auto;
  margin: 0;
}

.adt-header .adt-app-title {
  font-family: var(--adt-font);
  font-weight: 300;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--adt-header-fg);
}

.adt-header .btn,
.adt-header .btn:hover,
.adt-header .btn:focus {
  color: var(--adt-header-fg);
}

/* Search box: white, square-cornered input */
.adt-header #navbar form.search > input {
  width: 250px;
  height: 36px;
  border-radius: 0;
  border: 1px solid var(--adt-header-border);
  background-color: #fff;
  color: #222;
}

.adt-header #navbar form.search > i.bi {
  color: #222;
}

.adt-header #navbar form.search > input::placeholder {
  color: #767676;
}

/* Theme / icon links added by docfx.min.js */
.adt-header #navbar form.icons .btn,
.adt-header #navbar .icons a {
  color: var(--adt-header-fg);
}

@media (max-width: 767.98px) {
  body > header.adt-header {
    height: auto;
    min-height: 60px;
  }

  .adt-header .navbar-brand #logo {
    height: 36px;
  }

  .adt-header .adt-app-title {
    font-size: 1.3rem;
  }

  .adt-version .adt-version-label {
    display: none;
  }

  /* Keep the navigation toggle at the far right, after the version selector. */
  .adt-header .navbar > .container-xxl > button {
    order: 3;
  }

  .adt-header .navbar-collapse {
    order: 4;
  }

  .adt-header #navbar form.search > input {
    width: 100%;
  }

  .adt-header #navpanel {
    padding-bottom: 1rem;
  }
}

@media (max-width: 479.98px) {
  .adt-header .adt-app-title {
    display: none;
  }
}

/* ---------- Version selector ---------- */

.adt-version {
  order: 2;
  margin-left: auto;
  margin-right: .5rem;
}

@media (min-width: 768px) {
  /* On wide screens the selector sits to the right of the search box. */
  .adt-header .navbar > .container-xxl {
    flex-wrap: nowrap;
  }

  .adt-header .navbar-collapse {
    order: 1;
  }

  .adt-version {
    order: 3;
    margin-left: 1rem;
    margin-right: 0;
  }
}

.adt-version > .dropdown-toggle {
  height: 36px;
  border-radius: 0;
  border: 1px solid var(--adt-header-border);
  background-color: transparent;
  color: var(--adt-header-fg);
  font-size: .9rem;
  padding: 0 .75rem;
  white-space: nowrap;
}

.adt-version > .dropdown-toggle:hover,
.adt-version > .dropdown-toggle:focus,
.adt-version > .dropdown-toggle.show {
  background-color: rgba(255, 255, 255, .12);
  color: var(--adt-header-fg);
  border-color: #fff;
}

.adt-version .adt-version-label {
  opacity: .8;
}

.adt-version .dropdown-menu {
  --bs-dropdown-min-width: 7rem;
  --bs-dropdown-border-radius: 0;
  --bs-dropdown-link-active-bg: var(--adt-accent);
  --bs-dropdown-link-active-color: #fff;
  font-size: .9rem;
}

.adt-version .dropdown-item.active {
  font-weight: 600;
  cursor: default;
}

.adt-version-busy > .dropdown-toggle {
  cursor: progress;
}

/* ---------- Table of contents ---------- */

.toc ul {
  font-size: 14px;
}

.toc li {
  margin: .25em 0;
}

/* docfx marks the current page and all of its ancestors "active"; highlight only the innermost one. */
.toc li.active:not(:has(li.active)) > a {
  display: inline-block;
  background-color: var(--adt-accent);
  color: #fff;
  padding: 0 6px;
}

.toc li.active:not(:has(li.active)) > a:hover,
.toc li.active:not(:has(li.active)) > a:focus {
  color: #fff;
}

/* ---------- Content ---------- */

article a,
#breadcrumb a {
  text-decoration: none;
}

article a:hover,
article a:focus,
#breadcrumb a:hover,
#breadcrumb a:focus {
  text-decoration: underline;
}

article h1,
article .h1 {
  font-family: var(--adt-font-light);
  font-weight: 300;
  font-size: 2.5rem;
}

article h2,
article .h2 {
  font-family: var(--adt-font-light);
  font-weight: 300;
}

article h3,
article h4 {
  font-weight: 400;
}

/* Parameter and type parameter tables (template/partials/class*.tmpl.partial) */
table.adt-parameters {
  width: auto;
  min-width: 50%;
  font-size: .95em;
}

table.adt-parameters th {
  font-weight: 600;
  white-space: nowrap;
}

table.adt-parameters td:first-child,
table.adt-parameters td:nth-child(2) {
  white-space: nowrap;
}

table.adt-parameters td > p:last-child {
  margin-bottom: 0;
}

/*
  Returns, field/property value, event type and exceptions: each entry is "<type>: <description>" on one line.
  (Parameters and type parameters are rendered as tables instead; see template/partials.)
*/
body article dl.parameters > dt,
body article dl.parameters > dd,
body article dl.parameters > dd > p:first-child {
  display: inline;
  margin: 0;
}

body article dl.parameters > dt::after {
  content: ": ";
}

/* No separator when there is no description */
body article dl.parameters > dt:has(+ dd:empty)::after {
  content: none;
}

/* Start each entry (e.g. each exception) on a new line */
body article dl.parameters > dt:not(:first-child)::before {
  content: "\A";
  white-space: pre;
}

#breadcrumb {
  font-size: .875rem;
}

.affix h5 {
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
}
