/* Background colors for the different sets */

:root {
  --docset-color-bridle: #15729d;       /* Bridel color code */
  --docset-color-zephyr: #333f67;       /* Zephyr color code */
  --docset-color-kconfig: #e82424;      /* Kconfig color code */
  --docset-color-devicetree: #e5c100;   /* Devicetree color code */
  --docset-color-theme-red: #cd5c5c;    /* IndianRed */
  --docset-color-theme-green: #228b22;  /* ForestGreen */
  --docset-color-theme-blue: #4169e1;   /* RoyalBlue */
  --docset-color-theme-cyan: #48d1cc;   /* MediumTurquoise */
  --docset-color-theme-yellow: #ffd700; /* Gold */
  --docset-color-theme-black: #000000;  /* Black */
  --docset-color-theme-gray: #cccccc;   /* Gray */
  --docset-color-theme-white: #ffffff;  /* White */
  --docset-color-pin-fgd: #363a44;
  --docset-color-pin-bgd: #cccccc;
  --docset-color-rpi-fgd: #ffffff;
  --docset-color-rpi-gnd: #363a44;
  --docset-color-rpi-vdd: #e83131;
  --docset-color-rpi-sys: #f6adad;
  --docset-color-rpi-swd: #ea8326;
  --docset-color-rpi-pio: #7ac943;
  --docset-color-rpi-pwm: #2fa199;
  --docset-color-rpi-pcm: #a67c52;
  --docset-color-rpi-i2s: #50c5fb;
  --docset-color-rpi-dac: #965bf1;
  --docset-color-rpi-adc: #427f21;
  --docset-color-rpi-spi: #d83a94;
  --docset-color-rpi-spi-dfl: #a22c6f;
  --docset-color-rpi-i2c: #439ed6;
  --docset-color-rpi-i2c-dfl: #1d6089;
  --docset-color-rpi-can: #db9a6e;
  --docset-color-rpi-can-dfl: #c55a11;
  --docset-color-rpi-uart: #9d89ce;
  --docset-color-rpi-uart-dfl: #613da5;
  --docset-color-rpi-hsi: #08ffac;
  --docset-color-rpi-mmc: #ff5461;
  --docset-color-rpi-csi: #c4c42c;
  --docset-color-rpi-dsi: #54c4ff;
  --docset-color-rpi-dpp: #2f69f8;
  --docset-color-rpi-tsi: #df6da6;
}

/* Bridle */
a > span.bridle {
    color: var(--docset-color-bridle);
    background-color: var(--docset-color-theme-gray);
    text-decoration: underline solid var(--docset-color-bridle);
    font-style: oblique;
}

.bridle:not(.xref) {
    background-color: var(--docset-color-bridle);
}

.bridle-api:not(.xref) {
    background-color: var(--docset-color-bridle);
}

/* Zephyr Project RTOS */
a > span.zephyr {
    color: var(--docset-color-zephyr);
    background-color: var(--docset-color-theme-gray);
    text-decoration: underline solid var(--docset-color-zephyr);
    font-style: oblique;
}

.zephyr:not(.xref) {
    background-color: var(--docset-color-zephyr);
}

.zephyr-api:not(.xref) {
    background-color: var(--docset-color-zephyr);
}

/* Kconfig Reference */
a > span.kconfig {
    color: var(--docset-color-kconfig);
    background-color: var(--docset-color-theme-gray);
    text-decoration: underline solid var(--docset-color-kconfig);
    font-style: oblique;
}

.kconfig:not(.xref) {
    background-color: var(--docset-color-kconfig);
}

/* Devicetree Bindings */
a > span.devicetree {
    color: var(--docset-color-devicetree);
    background-color: var(--docset-color-theme-gray);
    text-decoration: underline solid var(--docset-color-devicetree);
    font-style: oblique;
}

.devicetree:not(.xref) {
    background-color: var(--docset-color-devicetree);
}

/* tweak grid items color */
.grid h2 {
  color: #fcfcfc !important;
}

/* tweak list style for edge pinout */
ul.edge-pinout > li {
  list-style: none !important;
}

/* tweak literal-block border inside a RST highlight container */
.rst-content div[class^=highlight] > pre.literal-block {
  border: none !important;
}

/* tweak literal-block div container to be the same as pre.literal-block */
.rst-content div.literal-block > * {
  font-size: 80% !important;
  line-height: 100% !important;
  margin: 0;
}

.rst-content div.literal-block {
  white-space: pre-line;
  margin: 0;
  padding: 12px;
  font-family: SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;
  display: inline-block;
  overflow: auto;
  width: 80ch;
}

/* tweak toggle-button link position and color */
.rst-content .admonition.toggle {
  overflow: visible;
}

.rst-content .admonition.toggle button {
  display: inline-flex;
  color: var(--admonition-note-title-color);
}
