/* remove read the docs fly out menu */

readthedocs-flyout {
    display: none !important;
    /* bottom: -200px !important;
    opacity: 0.2; */
}

/* remove read the docs drop down menu for versions */

.switch-menus {
    display: none !important;
}

/* ========================================== */

/* inline literals; change colour from built in red to blue */

.rst-content tt.literal, .rst-content tt.literal, .rst-content code.literal {
    color: #3333ff;
    font-size: 90%!important;
}
/* ========================================== */
/* Custom transition  4+char like ---- */
/* keep grey for both #e1e4e5  and not rst  #413d3d */
hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 4px solid #e1e4e5;
    margin: 24px 0;
    padding: 0;
}

.rst-versions .rst-other-versions hr {
    display: block;
    height: 1px;
    border: 0;
    margin: 24px 0;
    padding: 0;
    border-top: 4px solid #e1e4e5;
}

/* ========================================== */
/* Custom admonition */
/* sphinx auto generates classes from .. admonition:: Question  etc  */
/* ========================================== */

div.admonition.answer,
div.admonition.answers{
    color: #404040;
    border-left: 6px solid blue;
    /* border: 2px solid; */
    background-color: #e7f2fa;
}

div.admonition.answer p.admonition-title,
div.admonition.answers p.admonition-title{
    text-transform: capitalize;
    color: #404040!important;
    background-color: #6ab0de;
}

div.admonition.question,
div.admonition.questions{
    color: #404040;
    border-left: 6px solid #ffd700;
    /* border: 2px solid gold; */
    background-color: #ffffe8!important;
}

div.admonition.question p.admonition-title,
div.admonition.questions p.admonition-title{
    text-transform: capitalize;
    color: #404040!important;
    background-color: gold!important;
}

div.admonition.task,
div.admonition.tasks {
    color: #404040;
    border-left: 6px solid gold;
    /* border: 2px solid gold; */
    background-color: rgb(252, 252, 232)!important;
}

div.admonition.task p.admonition-title,
div.admonition.tasks p.admonition-title {
    text-transform: capitalize;
    color: #404040!important;
    background-color: gold!important;
}

div.admonition.exercise,
div.admonition.exercises {
    color: #404040;
    border-left: 6px solid rgb(0, 255, 0);
    /* border: 2px solid rgb(0, 255, 0); */
    background-color: rgb(253, 253, 232)!important;
}

div.admonition.exercise p.admonition-title,
div.admonition.exercises p.admonition-title {
    text-transform: capitalize;
    color: #404040!important;
    background-color: rgb(0, 255, 0)!important;
}



/* ========================================== */
/* Custom dropdown light primary D4D4F7 F7F7FF */
.sd-dropdown-container {
    background-color: #F7F7FF;
}

/* Custom dropdown reduce padding of dropdown */
details.sd-dropdown summary {
    padding: 0.2em;
}

/* Custom dropdown move arrow on right up 0.5em cf default */
details.sd-dropdown .sd-summary-up, details.sd-dropdown .sd-summary-down {
    top: 0.4em;
}

/* Custom dropdown lighten primary color 2E2FE3 7171FF */
.sd-bg-primary {
    background-color: #7171FF !important;
}

/* Custom dropdown reduce margin from 1em 1em */
.sd-tab-set {
    margin: 0.1em 0.1em;
}

.sd-card-body {
    padding: 0.2rem 0.5rem;
}

.sd-tab-set>label {
    border-bottom: .125rem solid transparent;
    margin-bottom: 0;
    color: var(--sd-color-tabs-label-inactive);
    border-color: var(--sd-color-tabs-underline-inactive);
    cursor: pointer;
    font-size: var(--sd-fontsize-tabs-label);
    font-weight: 700;
    padding: 1em 0.5em .5em;
    transition: color 250ms;
    width: auto;
    z-index: 1;
}

/* ========================================== */
/* Hide "Search" section from versions menu */
div.rst-versions > div.rst-other-versions > div.injected > dl:nth-child(5) {
    display: none;
}
/* Hide "On GitHub" section from versions menu */
div.rst-versions > div.rst-other-versions > div.injected > dl:nth-child(4) {
    display: none;
}
/* Hide "On Read the Docs" section from versions menu */
div.rst-versions > div.rst-other-versions > div.injected > dl:nth-child(3) {
    display: none;
}
/* Hide "versions" section from versions menu */
div.rst-versions > div.rst-other-versions > div.injected > dl:nth-child(1) {
    display: none;
}

/* ========================================== */
/* kbd role for keyboard shortcuts */
/* ========================================== */

.rst-content kbd {
    -moz-border-radius:3px;
    -moz-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
    -webkit-border-radius:3px;
    -webkit-box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
    background-color:#f7f7f7;
    border:1px solid #ccc;
    border-radius:3px;
    box-shadow:0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset;
    color:#333;
    display:inline-block;
    font-family:Arial,Helvetica,sans-serif;
    font-size:14px;
    line-height:1.6;
    margin:0 .1em;
    padding:.1em .6em;
    text-shadow:0 1px 0 #fff;
}

/* ========================================== */
/* Copy buttons for sphinx-copybutton extension */
/* ========================================== */

a.copybtn {
    position: absolute;
    top: .2em;
    right: .2em;
    width: 1.3em;
    height: 1.3em;
    opacity: .3;
    transition: opacity 0.5s;
    border: none;
    user-select: none;
}

div.highlight  {
    position: relative;
}

a.copybtn > img {
    vertical-align: top;
    margin: 0;
    top: 0;
    right: 0;
    position: absolute;
}

/* Make Copy button visible and coloured, not just on hover */
button.copybtn {
    color: blue;
    opacity: 1;
 }

.highlight:hover .copybtn {
    opacity: 1;
}

/* ========================================== */
/**
 * A minimal CSS-only tooltip copied from:
 *   https://codepen.io/mildrenben/pen/rVBrpK
 * To use, write HTML like the following:
 * <p class="o-tooltip--left" data-tooltip="Hey">Short</p>
 */
/* ========================================== */

.o-tooltip--left {
    position: relative;
}

.o-tooltip--left:after {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    content: attr(data-tooltip);
    padding: 2px;
    top: 0;
    left: -.2em;
    background: grey;
    font-size: 1rem;
    color: white;
    white-space: nowrap;
    z-index: 2;
    border-radius: 2px;
    transform: transLaTeX(-102%) translateY(0);
    transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
}

.o-tooltip--left:hover:after {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: transLaTeX(-100%) translateY(0);
    transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
    transition-delay: .5s;
}

/* ========================================== */
/**  overrides */
/* ========================================== */
/** to override text  file background */

div.highlight-default div.highlight {
    background: #eef5ff;
}

/** to override table padding from 8 and 16 */

.rst-content table.docutils td, .rst-content table.docutils th, .rst-content table.field-list td, .rst-content table.field-list th, .wy-table td, .wy-table th {
    padding: 4px 8px;
}

/* override table width restrictions */
.wy-table-responsive table td, .wy-table-responsive table th {
    white-space: normal;
}

.wy-table-responsive {
    margin-bottom: 24px;
    max-width: 100%;
    overflow: visible;
}

.wy-table-responsive th p {
    margin-bottom: unset;
}

/* ========================================== */
/* list tables class relaxed-logic-table */
/* ========================================== */

/* Target only paragraphs inside cells of tables with the 'relaxed-logic-table' class */
html.writer-html5 .rst-content table.docutils.relaxed-logic-table td > p {
    line-height: 1.5 !important;
}

/* Optional: do the same for the header if needed */
html.writer-html5 .rst-content table.docutils.relaxed-logic-table th > p {
    line-height: 1.5 !important;
}

/* ========================================== */
/* tight-table */
/* ========================================== */

table.tight-table td,
table.tight-table th {
    padding: 2px 6px;
}