[data-md-color-scheme="hvnc"] {
  --md-code-bg-color: #f0f0f0;
  --md-primary-fg-color: #ff8001;
  --md-primary-fg-color--light: #ff9910;
  --md-primary-fg-color--dark: #dd7000;
  --gray-50: #7f7f7f;
}

a[target="_blank"]:not(footer *)::after {
  /* See https://fontawesome.com/search?q=external&o=r&m=free */
  font-family: 'FontAwesome';
  content: "\f08e" !important;
  /* content: "\f14c" !important; */
  /* color: var(--md-primary-fg-color); */
}

/*
=== md overrides
*/

html .md-footer-meta.md-typeset a {
  text-decoration: underline;
}

h1#home {
  display: none;
}

/*
Attempt to leve up nav and content when h1#home is not displayed
.md-content__inner {
  padding-top: 0;
}
.md-content__inner:before {
  height: 0;
}
*/

.md-typeset .failure,
.md-typeset .note,
.md-typeset .success,
.md-typeset .warning {
  font-size: inherit;
}

.md-typeset ol li,
.md-typeset ul li {
  margin-bottom: 0px;
}

.md-typeset ul ul {
  list-style-type: circle;
}

.md-typeset ul ul ul {
  list-style-type: square;
}

.md-typeset dt {
  font-weight: bold;
}

.md-typeset dd {
  margin: 0 !important;
}

.md-nav--integrated>.md-nav__list>.md-nav__item--active:not(.md-nav__item--nested) {
  padding: 0;
}

.md-header__source {
  padding-left: 1rem;
  font-size: 0.6rem;
}

.md-nave__source {
  font-size: 0.6rem;
}

/*
=== misc classes
*/
.no-wrap {
  white-space: nowrap;
}

.md-typeset ul ul {
  list-style-type: circle;
}

.md-typeset ul ul ul {
  list-style-type: square;
}

/*
=== sequence highlights
*/
/* TODO: create padding around code BUT not when two code elements are adjacent See
code::first-of-type and code::last-of-type should get left and right padding respectively, and add should get top and bottom. */

.md-typeset code {
  color: inherit;
  font-size: 90%;
  padding: 1px;
}

.md-typeset code:has(+ code) {
  padding-right: 0;
}

.md-typeset code+code {
  padding-left: 0;
}

.md-typeset code.invalid {
  color: red !important;
}

.md-typeset code.invalid::before {
  content: "✘";
}

.md-typeset code.stop {
  background-color: rgba(255, 0, 0, 0.7);
  color: white;
}

.md-typeset code.del {
  background-color: rgba(255, 0, 0, 0.3);
}

.md-typeset code.ins {
  background-color: rgba(0, 255, 0, 0.3);
}

.md-typeset code.sub {
  background-color: rgba(0, 0, 255, 0.3);
}

.md-typeset code.spot1 {
  background-color: rgba(255, 255, 0, 0.3);
}

.md-typeset code.spot2 {
  background-color: rgba(0, 255, 255, 0.3);
}

.md-typeset code.spot3 {
  background-color: rgba(255, 0, 255, 0.3);
}

/*
=== elements
*/

figure {
  img {
    background-color: #fff;
  }
  border: thin solid var(--md-typeset-a-color);
  padding: 5px;
}

h2 {
  color: var(--md-typeset-a-color);
  border-bottom: thin solid var(--md-typeset-a-color);
}

h3 {
  color: var(--md-typeset-a-color);
  /* color: var(--gray-50); */
}

/*
=== summary table
*/

table.summary {
  font-size: 0.6rem;
  border: 0;
  padding: 0;
}

table.summary thead {
  background-color: var(--md-primary-fg-color);
  color: white;
}

table.summary th {
  padding: 0.2em;
  font-weight: bold;
}

table.summary td {
  padding: 0.2em;
}

table.summary tr:not(:first-child) th,
table.summary tr:not(:first-child) td {
  border-top: thin solid var(--md-primary-fg-color);
}


/*
=== syntax table
*/

table.syntax {
  border-collapse: collapse;
  border: 0;
  padding: 0;
}

table.syntax th:not(.section) {
  color: var(--gray-50);
  /* font-weight: bold; */
  padding-right: 10px;
  padding-left: 40px;
  text-align: right;
  width: 150px;
}

table.syntax th.section {
  /* font-weight: bold; */
  text-align: left;
  font-size: 1.25em;
  /* same as h3 */
  color: var(--md-typeset-a-color);
}

table.syntax ul {
  margin: 0 !important;
  padding: 0;
}

table.syntax tr.examples ul {
  list-style-type: none;
}

table.syntax p {
  margin: 0 !important;
}

table.syntax tr.examples li {
  margin: 0 !important;
}

/*
=== genetic code table
*/
table.gc {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.64rem;
}

table.gc tr,
table.gc th,
table.gc td {
  padding: 5px;
  border: thin solid #ccc;
  vertical-align: middle;
  text-align: center;
}

table.gc th {
  font-weight: bold;
}

table.gc tbody tr:nth-of-type(-n+4),
table.gc tbody tr:nth-of-type(n+9):not(tr:nth-of-type(n+13)) {
  background: #f0f0f0;
}

/*
=== .rst-* rules modify styling of RTD version selector
*/

.rst-versions {
  background: #191d30 !important;
  font-size: larger !important;
}

.rst-current-version {
  background: #465085 !important;
  color: #ff8001 !important;
}

.rst-versions.rst-badge {
  left: 20px !important;
}

.md-banner {
  background: var(--md-typeset-a-color);
  color: white;
  text-align: center;
  a {
    color: var(--md-primary-fg-color);
  }
}


.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: var(--md-primary-fg-color);
}
.md-typeset .info > .admonition-title,
.md-typeset .info > summary {
  background-color: rgba(255, 128, 1, 0.1);
}
.md-typeset .info > .admonition-title::before,
.md-typeset .info > summary::before {
  background-color: var(--md-primary-fg-color);
}

.md-typeset .info>.admonition-title:after, .md-typeset .info>summary:after {
  color: var(--md-primary-fg-color);
}
