/** Enhanced typography with ABeeZee font **/

div.page, h1, h2, h3, h4, h5, h6, .sidebar-tree .current-page>.reference, button, input, optgroup, select, textarea, th.head {
    font-weight: 400;
    font-family: var(--font-stack);
}

.toc-tree li.scroll-current>.reference, dl.glossary dt, dl.simple dt, dl:not([class]) dt {
    font-weight: 400;
}

/** Improved heading hierarchy **/
h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 400;
}

h4, h5, h6 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

/** Enhanced paragraph spacing and readability **/
p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    text-align: justify;
    font-family: var(--font-stack);
}

/** Enhanced list styling **/
ul, ol {
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

/** Enhanced table styling **/

th.head {
    text-transform: uppercase;
    font-size: var(--font-size--small);
    font-weight: 400;
    letter-spacing: 0.5px;
    background-color: var(--color-background-hover);
    padding: 1rem 0.75rem;
}

table.docutils {
    border: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0;
}

table.docutils td, table.docutils th {
    border-right: none;
    border-left: none;
    padding: 0.875rem 0.75rem;
    vertical-align: top;
    line-height: 1.5;
}

table.docutils td:last-child, table.docutils th:last-child, 
table.docutils td:first-child, table.docutils th:first-child {
    border-right: none;
    border-left: none;
}

table.docutils tr:nth-child(even) {
    background-color: var(--color-background-hover);
}

table.docutils tr:hover {
    background-color: var(--color-highlighted-background);
    transition: background-color 0.2s ease;
}

/* Allow to centre text horizontally in table data cells */
table.align-center {
    text-align: center !important;
}

/** Enhanced code blocks and admonitions **/

.admonition, code.literal, .sphinx-tabs-tab, .sphinx-tabs-panel, .highlight {
    border-radius: 8px;
}

/** Enhanced admonition styling **/

.admonition {
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    background-color: var(--color-background-primary);
}

.admonition .admonition-title {
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-stack);
}

/** Enhanced code styling **/
code.literal {
    background-color: var(--color-inline-code-background);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-stack--monospace);
    font-size: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.highlight {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.highlight pre {
    padding: 1.25rem;
    line-height: 1.5;
    font-size: 0.9rem;
    overflow-x: auto;
}

/** Enhanced image styling **/
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
    display: block;
}

.figure {
    text-align: center;
    margin: 2rem 0;
}

.figure img {
    margin: 0 auto 1rem;
}

.figure .caption {
    font-style: italic;
    color: var(--color-foreground-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/** Hide edit this page button and header links **/
.edit-this-page,
a[title="Edit this page"],
.source-link,
.edit-on-github,
.headerlink {
    display: none !important;
}

/** Color for the "copy link" symbol next to headings **/
a.headerlink {
    color: var(--color-brand-primary);
    opacity: 0.6;
    transition: opacity 0.2s ease;
    display: none !important; /* Hide header links completely */
}

a.headerlink:hover {
    opacity: 1;
}

/** Enhanced navigation and sidebar styling **/

.sidebar-tree li.current-page {
    border-left: 3px solid var(--color-brand-primary);
    background-color: var(--color-sidebar-item-background--current);
    border-radius: 0 4px 4px 0;
}

.sidebar-tree .reference {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: var(--font-stack);
}

.sidebar-tree .reference:hover {
    background-color: var(--color-sidebar-item-background--hover);
    transform: translateX(2px);
}

.toc-tree {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Make TOC scrollbar content font even smaller */
.toc-scroll .toc-tree,
.toc-scroll .toc-tree li,
.toc-scroll .toc-tree a {
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Ensure TOC items in sidebar have smaller font */
.sidebar-tree .toc-tree,
.sidebar-tree .toc-tree li,
.sidebar-tree .toc-tree a {
    font-size: 0.9rem;
    line-height: 1.2;
}

/** Enhanced tab styling **/

[role="tablist"] {
    border-bottom: 1px solid var(--color-sidebar-item-background--hover);
    margin: 1.5rem 0 0 0;
}

.sphinx-tabs-tab[aria-selected="true"] {
    border: 0;
    border-bottom: 3px solid var(--color-brand-primary);
    background-color: var(--color-sidebar-item-background--current);
    font-weight: 400;
    font-family: var(--font-stack);
    border-radius: 4px 4px 0 0;
}

.sphinx-tabs-tab {
    color: var(--color-brand-primary);
    font-weight: 400;
    font-family: var(--font-stack);
    padding: 0.75rem 1.25rem;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease;
}

.sphinx-tabs-panel {
    border: 0;
    border-bottom: 1px solid var(--color-sidebar-item-background--hover);
    background: var(--color-background-primary);
    padding: 1.5rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

button.sphinx-tabs-tab:hover {
    background-color: var(--color-sidebar-item-background--hover);
    transform: translateY(-1px);
}

/** Custom classes to fix scrolling in tables by decreasing the
    font size or breaking certain columns.
    Specify the classes in the Markdown file with, for example:
    ```{rst-class} break-col-4 min-width-4-8
    ```
**/

table.dec-font-size {
    font-size: smaller;
}
table.break-col-1 td.text-left:first-child {
    word-break: break-word;
}
table.break-col-4 td.text-left:nth-child(4) {
    word-break: break-word;
}
table.min-width-1-15 td.text-left:first-child {
    min-width: 15em;
}
table.min-width-4-8 td.text-left:nth-child(4) {
    min-width: 8em;
}

/** Enhanced link styling **/
a {
    color: var(--color-brand-content);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--color-brand-primary);
    border-bottom: 1px solid var(--color-brand-primary);
}

/** Underline for abbreviations **/

abbr[title] {
    text-decoration: underline solid #cdcdcd;
    cursor: help;
}

/** Use the same style for right-details as for left-details **/
.bottom-of-page .right-details {
    font-size: var(--font-size--small);
    display: block;
}

/** Version switcher */
button.version_select {
  color: var(--color-foreground-primary);
  background-color: var(--color-toc-background);
  padding: 5px 10px;
  border: none;
}

.version_select:hover, .version_select:focus {
    background-color: var(--color-sidebar-item-background--hover);
}

.version_dropdown {
  position: relative;
  display: inline-block;
  text-align: right;
  font-size: var(--sidebar-item-font-size);
}

.available_versions {
  display: none;
  position: absolute;
  right: 0px;
  background-color: var(--color-toc-background);
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 11;
}

.available_versions a {
  color: var(--color-foreground-primary);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.available_versions a:hover {background-color: var(--color-sidebar-item-background--current)}

.show {display:block;}

/** Fix for nested numbered list - the nested list is lettered **/
ol.arabic ol.arabic {
  list-style: lower-alpha;
}

/** Make expandable sections look like links **/
details summary {
    color: var(--color-link);
}

/** Fix the styling of the version box for readthedocs **/

#furo-readthedocs-versions .rst-versions, #furo-readthedocs-versions .rst-current-version, #furo-readthedocs-versions:focus-within .rst-current-version, #furo-readthedocs-versions:hover .rst-current-version  {
    background: var(--color-sidebar-item-background--hover);
}

.rst-versions .rst-other-versions dd a {
    color: var(--color-link);
}

#furo-readthedocs-versions:focus-within .rst-current-version .fa-book, #furo-readthedocs-versions:hover .rst-current-version .fa-book, .rst-versions .rst-other-versions {
    color: var(--color-sidebar-link-text);
}

.rst-versions .rst-current-version {
    color: var(--color-version-popup);
    font-weight: bolder;
}

/** Enhanced card styling for grid layout **/
.sd-card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    background-color: var(--color-background-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.sd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.sd-card-header {
    background-color: var(--color-background-hover);
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sd-card-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-brand-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-stack);
}

.sd-card-text {
    color: var(--color-foreground-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 1.5rem;
    font-family: var(--font-stack);
}

/** Enhanced grid layout **/
.sd-container-fluid {
    padding: 2rem 0;
}

.sd-row {
    gap: 2rem;
}

/** Smooth scrolling for the entire page **/
html {
    scroll-behavior: smooth;
}

/** Enhanced blockquote styling **/
blockquote {
    border-left: 4px solid var(--color-brand-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--color-foreground-muted);
    background-color: var(--color-background-hover);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

/** Reduce spacing between author and published information **/
article[role="main"] p:has(strong:first-child:contains("Author:")) {
    margin-bottom: 0.2rem;
}

article[role="main"] p:has(strong:first-child:contains("Published:")) {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* Fallback for browsers that don't support :has() */
article[role="main"] section:first-child p:nth-of-type(1) {
    margin-bottom: 0rem;
}

article[role="main"] section:first-child p:nth-of-type(2) {
    margin-top: 0;
    margin-bottom: 1.5rem;
}