@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap");

:root {
    /* blue "inrae": #00a3a6 (0, 163, 166) */
    --my-color-1: rgb(0, 163, 166);
    /* pink "inrae": #ed6e6c (237, 110, 108) */
    --my-color-2: rgb(237, 110, 108);
    /* green "inrae": #9dc544 (157, 197, 68) */
    --my-color-3: rgb(157, 197, 68);
    /* light blue "inrae": #9ed6e3 (158, 214, 227) */
    --my-color-4: rgb(158, 214, 227);
    /* purple "inrae": #9ed6e3 (66, 48, 137) */
    --my-color-5: rgb(66, 48, 137);

    --pst-font-size-h1: 30px;
    --pst-font-size-h2: 26px;
    --pst-font-size-h3: 22px;
    --pst-font-size-h4: 20px;
    --pst-font-size-h5: 18px;
    --pst-font-size-h6: 16px;

    --pst-font-family-base-system: 'Open Sans', sans-serif;
    --pst-font-family-monospace-system: 'JetBrains Mono', monospace;
    --pst-font-family-monospace: var(--pst-font-family-monospace-system);
}

html[data-theme="light"] {
    --pst-color-text-base: rgb(77, 77, 77);
    --pst-color-primary: var(--my-color-1);
    --pst-color-secondary: var(--my-color-2);
    --pst-color-border: rgb(201, 201, 201);

    --pst-color-info: var(--my-color-1);
    --pst-color-success: var(--my-color-3);
    --pst-color-warning: var(--my-color-2);
    --pst-color-danger: var(--my-color-2);
    --pst-color-attention: var(--my-color-2);

    --pst-color-active-navigation: var(--my-color-1);

    --pst-color-link: var(--my-color-1);
    --pst-color-link-hover: var(--my-color-1);
    --pst-color-link-active: var(--my-color-2);

    --pst-color-preformatted-background: rgb(247, 247, 247);
    --pst-color-surface: var(--pst-color-preformatted-background);
    --pst-color-on-background: rgb(255, 255, 255);
    --pst-color-panel-background: rgb(247, 247, 247);
    --pst-color-block-code: rgb(51, 51, 51);
    --pst-color-inline-code: rgb(0, 0, 0);

    --pst-color-shadow: rgba(0, 0, 0, .05);

    --pst-color-headerlink: var(--pst-color-link);
    --pst-color-headerlink-hover: var(--pst-color-link-hover);

    --pst-color-target: rgba(0, 163, 166, 0.15);

    /* override style for tabbed sphinx panels */
    --tabs-color-label-active: var(--my-color-1);
    --tabs-color-label-inactive: rgba(0, 0, 0, .1);
    --pst-color-deactive-navigation: var(--tabs-color-label-inactive);
    --tabs-color-overline: rgba(0, 0, 0, .1);
    --tabs-color-underline: var(--tabs-color-overline);
    --my-shadow: var(--pst-color-shadow);

    /* override style for myst-nb */
    --mystnb-source-margin-color: var(--my-color-1);
    --mystnb-source-border-color: var(--pst-color-border);
    --mystnb-stdout-bg-color: var(--pst-color-panel-background);
    --mystnb-stdout-border-color: var(--pst-color-border);
}

html[data-theme="dark"] {
    --pst-color-text-base: rgb(209, 209, 209);
    --pst-color-primary: var(--my-color-1);
    --pst-color-secondary: var(--my-color-2);
    --pst-color-border: rgb(72, 72, 72);

    --pst-color-info: var(--my-color-1);
    --pst-color-success: var(--my-color-3);
    --pst-color-warning: var(--my-color-2);
    --pst-color-danger: var(--my-color-2);
    --pst-color-attention: var(--my-color-2);

    --pst-color-active-navigation: var(--my-color-1);

    --pst-color-link: var(--my-color-1);
    --pst-color-link-hover: var(--my-color-1);
    --pst-color-link-active: var(--my-color-2);

    --pst-color-preformatted-background: rgb(25, 25, 25);
    --pst-color-surface: var(--pst-color-preformatted-background);
    --pst-color-on-background: rgb(18, 18, 18);
    --pst-color-panel-background: rgb(25, 25, 25);
    --pst-color-block-code: rgb(231, 231, 231);
    --pst-color-inline-code: rgb(255, 255, 255);

    --pst-color-shadow: rgba(255, 255, 255, .05);

    --pst-color-headerlink: var(--pst-color-link);
    --pst-color-headerlink-hover: var(--pst-color-link-hover);

    --pst-color-target: rgba(0, 163, 166, .15);

    /* override style for tabbed sphinx panels */
    --tabs-color-label-active: var(--my-color-1);
    --tabs-color-label-inactive: rgba(255, 255, 255, .2);
    --pst-color-deactive-navigation: var(--tabs-color-label-inactive);
    --tabs-color-overline: rgba(255, 255, 255, .2);
    --tabs-color-underline: var(--tabs-color-overline);
    --my-shadow: var(--pst-color-shadow);

    /* override style for myst-nb */
    --mystnb-source-margin-color: var(--my-color-1);
    --mystnb-source-border-color: var(--pst-color-border);
    --mystnb-stdout-bg-color: var(--pst-color-panel-background);
    --mystnb-stdout-border-color: var(--pst-color-border);
}

.card {
    --bs-card-bg: var(--pst-color-panel-background);
    --bs-card-border-color: var(--pst-color-border);
}

.dropdown-menu {
    --bs-dropdown-bg: var(--pst-color-panel-background);
}

.bd-sidebar-primary {
    overflow-y: visible;
}

/* reduce font size in code blocks */
pre {
    font-size: .815em;
}

/* keep border color the same for all cells */
tbody, td, tfoot, th, thead, tr {
  border-color: var(--pst-color-border);
}

/* fix problem with extra padding in some sub sections */
.bd-main .bd-content .bd-article-container {
    max-width: none;
}

/* propagate colors to whole theme */
.text-primary, .sd-text-primary {
  color: var(--pst-color-primary) !important;
}
.text-secondary, .sd-text-secondary {
  color: var(--pst-color-secondary) !important;
}
.text-info, .sd-text-info {
  color: var(--pst-color-info) !important;
}
.text-success, .sd-text-success {
  color: var(--pst-color-success) !important;
}
.text-warning, .sd-text-warning {
  color: var(--pst-color-warning) !important;
}
.text-danger, .sd-text-danger {
  color: var(--pst-color-danger) !important;
}

/* turn off filter on image for dark mode */
html[data-theme="dark"]  .bd-content img:not(.only-dark):not(.dark-light) {
    background: none;
}

html[data-theme="dark"] img:not(.only-dark):not(.dark-light) {
    filter: none;
}

.navbar-brand img {
    margin-bottom: 0;
    height: 47px;
}

/* override style for nav-links */
#navbar-icon-links i.fab::before {
    color: var(--pst-color-text-base);
}

#navbar-icon-links i:hover.fab::before {
    color: var(--pst-color-headerlink-hover);
}

/* override style for code blocks */
pre {
    border: 1px solid var(--pst-color-preformatted-background); /* e1e4e5 */
    font-family: var(--pst-font-family-monospace-system);
    border-radius: 4px;
    box-shadow: none;
}

/* override style for class and attributes */
.sig {
    font-family: var(--pst-font-family-monospace-system);
    font-weight: 300;
}

.sig-paren {
    font-family: var(--pst-font-family-monospace-system);
    font-size: 100%;
}

.sig-param {
    font-family: var(--pst-font-family-monospace-system);
    font-style: italic;
    font-weight: 300;
    font-size: 100%;
}

em.property{
    font-family: var(--pst-font-family-monospace-system);
    font-size: 100%;
    padding-right: 6px;
}

code {
    font-family: var(--pst-font-family-monospace-system);
}

code.descclassname {
    font-weight: 300;
    font-size: 100%;
}

code.descname {
    font-weight: 600;
    font-size: 100%;
}

.text-monospace {
    font-family: var(--pst-font-family-monospace-system);
}

/* override style for images */
img {
    margin-bottom: 10px;
}

/* override style for RST directive "contents" */
div.topic {
    background-color: transparent;
    border: hidden;
}

/* override style for permalink */
a.headerlink{
    color:var(--pst-color-text-base);
    text-align: center;
    padding-left: 10px;
    font-size: 14px;
    border-bottom: hidden;
}
a.headerlink:hover{
    background-color: transparent;
    color:var(--pst-color-headerlink-hover);
    border-bottom: hidden;
}

/* override style for hyperlinks in paragraphs */
a, a:visited {
    color: var(--pst-color-text-base);
    border-bottom: 1px dotted;
}

a:hover {
    text-decoration: none;  /* to remove text-decoration: underline */
    border-bottom: 1px solid;
}

nav a, nav a:hover,
.figure a, .figure a:hover,
a.image-reference, a.image-reference:hover {
    border-bottom: hidden;
}

nav a.list-group-item , nav a.list-group-item:hover {
    border-bottom: inherit;
}

p a, .code-block-caption a code.literal {
    color: var(--pst-color-text-base);
    border-bottom: 1px dotted;
}

p a:hover, .code-block-caption a:hover code.literal {
    text-decoration: none;
    color: var(--pst-color-link-hover);
    border-bottom: 1px solid;
}

/* override style for inline code */
code.literal{
    font-size: 95%;
    font-weight: normal;
    color: var(--pst-color-inline-code);
}
a code.literal{
    font-size: 95%;
    font-weight: normal;
    color: var(--pst-color-inline-code);
}
a:hover code.literal{
    font-size: 95%;
    font-weight: normal;
    color: var(--pst-color-link-hover);
}

/* override style for tables */
.table {
    color: var(--pst-color-text-base);
}
table {
    margin-top: 10px;
}
.table thead th {
    border-bottom: 2px solid var(--pst-color-border);
}
.table td, .table th {
    padding: .65rem;
    border-top: 1px solid var(--pst-color-border);
}

/* customise hightlight for target reference */
dt:target, span.highlighted {
    background-color: var(--pst-color-target);
}

rect.highlighted {
    fill: var(--pst-color-target);
}

/* override style for sphinx-panels */
.shadow {
    box-shadow: 0 .2rem .5rem var(--my-shadow),0 0 .0625rem var(--my-shadow) !important;
}

.bg-white {
    background-color: var(--pst-color-background) !important;
}

.btn-outline-primary,
.card-text .sd-btn-outline-primary {
    color: var(--pst-color-link) !important;
    border-color: transparent !important;
}

.sd-btn-outline-primary:hover {
    color: var(--pst-color-background) !important;
}

.btn-outline-primary:hover,
.card-text .sd-btn-outline-primary:hover {
    color: var(--pst-color-background) !important;
    border-color: var(--pst-color-link-hover) !important;
    background-color: var(--pst-color-link-hover) !important;
}

.sd-btn-outline-primary:not(.disabled):not(.disabled):active {
    color: var(--pst-color-background) !important;
}

.btn-outline-primary:not(.disabled):not(.disabled):active,
.card-text .sd-btn-outline-primary:not(.disabled):not(.disabled):active {
    color: var(--pst-color-background) !important;
    border-color: var(--pst-color-link-active) !important;
    background-color: var(--pst-color-link-active) !important;
}

.theme-switch-button:hover, .theme-switch-button:active {
    background-color: var(--pst-color-on-surface) !important;
    border-color: var(--pst-color-on-background) !important;
}

/* override style for tabbed sphinx panels */
.tabbed-label {
    margin-bottom: 0;
}

.tabbed-content {
    background-color: var(--pst-color-preformatted-background);
}

/* customise footer */
.bd-footer .footer-items__end, .bd-footer .footer-items__start {
    gap: 0
}

.navbar-corporate img {
    margin-bottom: 0;
    height: 77px;
}

.navbar-corporate img {
    margin-bottom: 0;
    height: 77px;
}
a.navbar-corporate, a.navbar-corporate:hover {
    border-bottom: hidden;
}

/* customise field list for sphinx-simplepdf */
dl.field-list dd, dl.field-list dt {
    max-width: 100%;
}
