/* The look of the CamelGraph wiki: BIMCamel black and white, one blue accent (the editor's #0a74da).
   Material for MkDocs does the layout; this file only sets colours, the header and a few page parts. */

/* ---------------------------------------------------------------------------------------------------------------------
   Fonts: system fonts only, so the page asks no other server for anything.
   --------------------------------------------------------------------------------------------------------------------- */
:root {
  --md-text-font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --md-code-font-family: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, "DejaVu Sans Mono", monospace;
  --dyc-accent: #0a74da;
  --dyc-accent-strong: #0861b8;
  --dyc-logo-h: 36px;
}

/* A little wider than Material's default, so tables and the node reference have room. */
.md-grid { max-width: 70rem; }

/* ---------------------------------------------------------------------------------------------------------------------
   Colours. Light: white page, black text. Dark: near-black page, white text. The accent is the same blue in both
   (a lighter blue for text on dark, so links stay readable).
   --------------------------------------------------------------------------------------------------------------------- */
[data-md-color-scheme="default"] {
  --md-default-bg-color: #ffffff;
  --md-default-fg-color: #0d0f12;
  --md-default-fg-color--light: #4b525c;
  --md-default-fg-color--lighter: #8a919b;
  --md-default-fg-color--lightest: #e3e6ea;
  --md-typeset-color: #14171c;
  --md-typeset-a-color: #0a74da;
  --md-typeset-mark-color: #fff2a8;
  --md-code-bg-color: #f3f5f7;
  --md-code-fg-color: #1d2430;
  --md-footer-bg-color: #0d0f12;
  --md-footer-bg-color--dark: #000000;
  --md-primary-fg-color: #ffffff;
  --md-primary-fg-color--light: #ffffff;
  --md-primary-fg-color--dark: #ffffff;
  --md-primary-bg-color: #0d0f12;
  --md-primary-bg-color--light: #4b525c;
  --md-accent-fg-color: #0a74da;
  --md-accent-fg-color--transparent: rgba(10, 116, 218, 0.1);
  --md-accent-bg-color: #ffffff;
  --md-accent-bg-color--light: #ffffff;
}

[data-md-color-scheme="slate"] {
  --md-hue: 220;
  --md-default-bg-color: #0d0e11;
  --md-default-bg-color--light: rgba(13, 14, 17, 0.54);
  --md-default-bg-color--lighter: rgba(13, 14, 17, 0.26);
  --md-default-bg-color--lightest: rgba(13, 14, 17, 0.07);
  --md-default-fg-color: #f2f4f7;
  --md-default-fg-color--light: #b4bbc6;
  --md-default-fg-color--lighter: #7d8591;
  --md-default-fg-color--lightest: #272a31;
  --md-typeset-color: #e6e9ee;
  --md-typeset-a-color: #4aa8f5;
  --md-typeset-mark-color: rgba(10, 116, 218, 0.45);
  --md-code-bg-color: #16181d;
  --md-code-fg-color: #e6e9ee;
  --md-footer-bg-color: #000000;
  --md-footer-bg-color--dark: #000000;
  --md-primary-fg-color: #0d0e11;
  --md-primary-fg-color--light: #0d0e11;
  --md-primary-fg-color--dark: #0d0e11;
  --md-primary-bg-color: #f2f4f7;
  --md-primary-bg-color--light: #b4bbc6;
  --md-accent-fg-color: #4aa8f5;
  --md-accent-fg-color--transparent: rgba(74, 168, 245, 0.12);
  --md-accent-bg-color: #0d0e11;
  --md-accent-bg-color--light: #0d0e11;
  --md-shadow-z1: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.6), 0 0 0.05rem rgba(255, 255, 255, 0.08);
  --md-shadow-z2: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.7), 0 0 0.05rem rgba(255, 255, 255, 0.1);
}

/* ---------------------------------------------------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------------------------------------------------- */
.md-header { border-bottom: 1px solid var(--md-default-fg-color--lightest); box-shadow: none; }
.md-header--shadow { box-shadow: none; }
.md-tabs { border-bottom: 1px solid var(--md-default-fg-color--lightest); }

/* The wordmark and the name. */
.dyc-logo, .dyc-sitename { align-self: center; flex: none; }
.dyc-logo { display: block; line-height: 0; margin-left: 0.4rem; }
/* The picture is an artboard with empty margins around the artwork (24 left, 40 right, of 520 units, 120 high); the
   negative margins trim them so the artwork starts at the edge. */
.dyc-logo__img {
  display: block;
  height: var(--dyc-logo-h);
  width: auto;
  margin-left: calc(var(--dyc-logo-h) * -0.2);
  margin-right: calc(var(--dyc-logo-h) * -0.333);
}
/* The artwork is black on transparent; in the dark theme it is turned white. */
[data-md-color-scheme="slate"] .dyc-logo__img { filter: invert(1); }
.dyc-sitename {
  margin-left: 0.8rem;
  padding-left: 0.8rem;
  border-left: 1px solid var(--md-default-fg-color--lightest);
  color: var(--md-primary-bg-color);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.dyc-sitename:hover { color: var(--md-accent-fg-color); }
/* The product's own mark, before its name. */
.dyc-sitename { display: inline-flex; align-items: center; gap: 0.5rem; }
.dyc-sitemark { display: block; width: 1.4rem; height: 1.4rem; flex: none; }
/* Two drawings of the mark, no plate: dark node ends on a light header, light ones on a dark header. */
.dyc-sitemark--dark { display: none; }
[data-md-color-scheme="slate"] .dyc-sitemark--light { display: none; }
[data-md-color-scheme="slate"] .dyc-sitemark--dark { display: block; }

/* The name in the pixel letters of the BIMCamel wordmark, and "Wiki" after it in the site's own face. */
.dyc-sitename__word { display: block; height: 1.1rem; width: auto; flex: none; image-rendering: pixelated; }
.dyc-sitename__word--dark { display: none; }
[data-md-color-scheme="slate"] .dyc-sitename__word--light { display: none; }
[data-md-color-scheme="slate"] .dyc-sitename__word--dark { display: block; }
.dyc-sitename__label { font-weight: 700; }

/* The spacer: the colour toggle is the first thing pushed to the right. */
.md-header__inner > .md-header__option:first-of-type,
.md-header__inner > form.md-header__option:first-of-type { margin-left: auto; }

/* The two buttons. */
.dyc-actions { display: flex; align-items: center; gap: 0.4rem; flex: none; margin: 0 0.2rem 0 0.4rem; }
.dyc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-sizing: border-box;
  height: 1.7rem;
  padding: 0 0.7rem;
  border: 1px solid transparent;
  border-radius: 0.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.dyc-btn svg { width: 0.85rem; height: 0.85rem; fill: currentcolor; flex: none; }
.dyc-btn--primary { background: var(--dyc-accent); color: #ffffff; }
.dyc-btn--primary:hover, .dyc-btn--primary:focus-visible { background: var(--dyc-accent-strong); color: #ffffff; }
.dyc-btn--secondary { color: var(--md-primary-bg-color); border-color: var(--md-default-fg-color--lighter); background: transparent; }
.dyc-btn--secondary:hover, .dyc-btn--secondary:focus-visible { border-color: var(--md-accent-fg-color); color: var(--md-accent-fg-color); }

/* Not available yet (no address in tools/wiki/site.yml): greyed out, no link, no hover effect. */
.dyc-btn--disabled, .dyc-btn--disabled:hover {
  opacity: 0.5;
  cursor: default;
  color: var(--md-primary-bg-color);
  border-color: var(--md-default-fg-color--lighter);
  background: transparent;
}

/* Between a phone and a laptop only the icons show (the text stays for screen readers). */
@media screen and (max-width: 69.984em) {
  .dyc-btn { width: 1.7rem; padding: 0; }
  .dyc-btn__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dyc-btn svg { width: 1rem; height: 1rem; }
}

/* On a phone the buttons move into the drawer, at its foot (they stay in view at every level of the menu). */
.dyc-drawer-actions { display: none; }
@media screen and (max-width: 35.984em) {
  .dyc-actions { display: none; }
  .md-sidebar--primary .md-sidebar__scrollwrap { padding-bottom: 7.5rem; box-sizing: border-box; }
  .md-sidebar--primary .dyc-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.6rem 0.8rem;
    background: var(--md-default-bg-color);
    border-top: 1px solid var(--md-default-fg-color--lightest);
  }
  .dyc-drawer-actions .dyc-btn {
    width: auto;
    height: auto;
    min-height: 1.9rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.65rem;
    justify-content: flex-start;
    white-space: normal;
    text-align: left;
  }
  .dyc-drawer-actions .dyc-btn__text { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .dyc-drawer-actions .dyc-btn svg { width: 0.95rem; height: 0.95rem; }
}

/* Narrow screens: the logo and the name shrink so the menu, the toggle and the search icon all fit (checked at 360 px). */
@media screen and (max-width: 35.984em) {
  :root { --dyc-logo-h: 26px; }
  .dyc-sitename {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.62rem;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
  }
  .md-header__inner { padding: 0 0.1rem; }
  .md-header__option { margin-left: 0; margin-right: 0; flex: none; }
  .md-header__button { margin-left: 0.1rem; margin-right: 0.1rem; }
}
@media screen and (max-width: 29.984em) {
  .dyc-logo { margin-left: 0; }
}

/* The title of the drawer. */
.dyc-drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--md-primary-bg-color);
  font-weight: 700;
  text-decoration: none;
}
.dyc-drawer-brand .dyc-logo__img { height: 28px; }
[data-md-color-scheme="slate"] .dyc-drawer-brand .dyc-logo__img { filter: invert(1); }

/* The search box sits on the header colour. */
@media screen and (min-width: 60em) {
  [data-md-color-scheme="default"] .md-search__form { background-color: rgba(0, 0, 0, 0.05); }
  [data-md-color-scheme="default"] .md-search__form:hover { background-color: rgba(0, 0, 0, 0.09); }
  [data-md-color-scheme="slate"] .md-search__form { background-color: rgba(255, 255, 255, 0.08); }
  [data-md-color-scheme="slate"] .md-search__form:hover { background-color: rgba(255, 255, 255, 0.13); }
}
.md-search__input::placeholder { color: var(--md-default-fg-color--light); }
.md-search__form { border-radius: 0.2rem; }

/* ---------------------------------------------------------------------------------------------------------------------
   Announcement bar
   --------------------------------------------------------------------------------------------------------------------- */
.md-banner { background: #0d0f12; color: #f2f4f7; border-bottom: 1px solid #262a31; }
[data-md-color-scheme="slate"] .md-banner { background: #16181d; border-bottom-color: var(--md-default-fg-color--lightest); }
.md-banner .md-banner__inner { font-size: 0.65rem; margin: 0 auto; padding: 0.5rem 2.2rem 0.5rem 0.8rem; line-height: 1.5; }
.md-banner a { color: #ffffff; font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; }
.md-banner a:hover { color: #8cc7fa; }
.md-banner .md-banner__button { color: #f2f4f7; }

/* ---------------------------------------------------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------------------------------------------------- */
.dyc-footer { width: 100%; }
.dyc-footer__links { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin: 0.3rem 0 0.4rem; }
.dyc-footer__links a { font-weight: 600; }
.md-footer-meta__inner { align-items: flex-start; }

/* ---------------------------------------------------------------------------------------------------------------------
   Page content
   --------------------------------------------------------------------------------------------------------------------- */
.md-typeset h1 { font-weight: 700; color: var(--md-default-fg-color); letter-spacing: -0.01em; margin-bottom: 0.7em; }
.md-typeset h2 { font-weight: 700; color: var(--md-default-fg-color); }
.md-typeset h3, .md-typeset h4 { color: var(--md-default-fg-color); }
.md-typeset a { text-underline-offset: 0.15em; }

/* Pictures: a thin frame, the caption below. */
.md-typeset figure { margin: 1.2em auto; }
.md-typeset figure img, .md-typeset p > img {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.3rem;
}
.md-typeset figure br { display: none; }
.md-typeset figcaption { color: var(--md-default-fg-color--light); font-size: 0.7rem; margin-top: 0.5rem; }

/* Tables: the header row is quiet, the rows are easy to follow. */
.md-typeset table:not([class]) {
  font-size: 0.7rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.2rem;
}
.md-typeset table:not([class]) th {
  background: var(--md-code-bg-color);
  color: var(--md-default-fg-color);
  font-weight: 700;
  min-width: 0;
}
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th { padding: 0.6em 0.9em; vertical-align: top; }
.md-typeset table:not([class]) tbody tr:hover { background: var(--md-accent-fg-color--transparent); }
.md-typeset__table { display: block; }
.md-typeset table:not([class]) { display: table; width: 100%; }

/* Keys, as in the Keyboard and mouse page. */
.md-typeset .keys kbd { white-space: nowrap; }

/* ---------------------------------------------------------------------------------------------------------------------
   Cards (Material's grid cards): for the landing page and for the "quick links" strips.
   Write <div class="grid cards" markdown> with a list inside; add the class "quick-links" for a compact strip.
   --------------------------------------------------------------------------------------------------------------------- */
.md-typeset .grid.cards > ul > li, .md-typeset .grid.cards > ol > li, .md-typeset .grid > .card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.3rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.md-typeset .grid.cards > ul > li:hover, .md-typeset .grid.cards > ol > li:hover,
.md-typeset .grid.cards > ul > li:focus-within, .md-typeset .grid.cards > ol > li:focus-within,
.md-typeset .grid > .card:hover, .md-typeset .grid > .card:focus-within {
  border-color: var(--md-accent-fg-color);
  box-shadow: var(--md-shadow-z1);
}
.md-typeset .grid.cards > ul > li > p:first-child a, .md-typeset .grid.cards > ul > li > p:first-child strong { font-weight: 700; }
.md-typeset .grid.cards > ul > li > p .twemoji, .md-typeset .grid.cards > ul > li > p .lg { color: var(--md-accent-fg-color); }
.md-typeset .grid.cards > ul > li > hr { margin: 0.6em 0; }
/* Three cards in a row where there is room (Material's default is two). */
.md-typeset .grid.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
/* A quick-links strip: small cards in one row where there is room. */
.md-typeset .grid.cards.quick-links { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem; }
.md-typeset .grid.cards.quick-links > ul > li { padding: 0.6rem 0.8rem; font-size: 0.7rem; }
.md-typeset .grid.cards.quick-links > ul > li > p { margin: 0; }

/* Buttons in the text: [Text](page.md){ .md-button } and { .md-button .md-button--primary }. The theme's primary colour is the
   header colour (white in the light theme), so the buttons take the accent colour instead. */
.md-typeset .md-button {
  border-radius: 0.2rem; font-weight: 600; margin: 0 0.4rem 0.4rem 0;
  color: var(--md-accent-fg-color); border-color: var(--md-accent-fg-color);
}
.md-typeset .md-button:hover, .md-typeset .md-button:focus-visible {
  background: var(--md-accent-fg-color--transparent); color: var(--md-accent-fg-color); border-color: var(--md-accent-fg-color);
}
.md-typeset .md-button--primary { background: var(--dyc-accent); border-color: var(--dyc-accent); color: #ffffff; }
.md-typeset .md-button--primary:hover, .md-typeset .md-button--primary:focus-visible {
  background: var(--dyc-accent-strong); border-color: var(--dyc-accent-strong); color: #ffffff;
}

/* ---------------------------------------------------------------------------------------------------------------------
   Node library
   --------------------------------------------------------------------------------------------------------------------- */
.md-typeset h3.node {
  font-family: var(--md-code-font-family);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 2.2em;
  padding-top: 0.9em;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}
.md-typeset .chip {
  display: inline-block;
  padding: 0.1em 0.6em;
  margin: 0.1em 0.15em 0.1em 0;
  border-radius: 1em;
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  color: var(--md-default-fg-color--light);
  font-size: 0.62rem;
  line-height: 1.5;
  white-space: nowrap;
}
.md-typeset .chip.chip--required { color: var(--md-accent-fg-color); border-color: var(--md-accent-fg-color); background: transparent; }
.md-typeset .admonition.note:not(:has(p)) { margin: 0.8em 0; }
.md-typeset code.nowrap { white-space: nowrap; word-break: normal; }
.md-typeset .node-sub { margin: 1em 0 0.2em; font-weight: 700; color: var(--md-default-fg-color); }
.md-typeset table.node-ports td:first-child { white-space: nowrap; }

/* ---------------------------------------------------------------------------------------------------------------------
   Print: just the page.
   --------------------------------------------------------------------------------------------------------------------- */
@media print {
  .md-banner, .md-header, .md-tabs, .md-sidebar, .md-footer, .md-top, .md-search, .dyc-actions, .dyc-drawer-actions,
  .md-content__button, .headerlink { display: none !important; }
  .md-main__inner, .md-content { margin: 0 !important; max-width: none !important; }
  .md-grid { max-width: none; }
  body, .md-typeset { color: #000; background: #fff; font-size: 11pt; }
  .md-typeset a { color: #000; text-decoration: underline; }
  .md-typeset a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
  .md-typeset pre, .md-typeset table, .md-typeset figure, .md-typeset .admonition { break-inside: avoid; }
  .md-typeset h1, .md-typeset h2, .md-typeset h3 { break-after: avoid; }
  .md-typeset img { max-width: 100% !important; }
  /* a picture that comes in two versions prints in its light version */
  .md-typeset img[src$="#only-dark"] { display: none !important; }
  .md-typeset img[src$="#only-light"] { display: inline !important; }
}
