/*--- OVERRIDE VARIABLES ---*/
html {
  /*doxygen awesome variables*/
  --content-maxwidth: 1180px !important;
  --side-nav-arrow-opacity: 0.25 !important;
}

html.dark-mode{

}

/* MOBILE ONLY */
@media only screen and (max-width: 767px) {
  /*-- menu (uncomment code in rsi_header.html to use) --*/
  #menu-left-wrapper {
      display: none;
  }
}

/* prevent headers top margin-collapse, only margin-collapse bottom */
.textblock h1,
.textblock h2,
.textblock h3,
.textblock h4,
.textblock h5,
.textblock h6 {
   padding-top: 1rem;
}

b {
  font-weight: 500 !important;
}

button{
  font-family: var(--font-family) !important;
}


/* get P @briefs closer to H1 */
div.contents > div.textblock > p:first-child {
  margin-top: -10px !important;
}

/* border radius to all images*/
img {
  border-radius: var(--border-radius-small);
}

/*--- TITLE ---*/
@media screen and (min-width: 768px) {
  #top {
    justify-content: inherit !important;
  }
}

#titlearea {
  width: 258px;
}

#projectname > a {
  text-decoration: none;
  color: var(--header-foreground) !important;
}

/*--- MENU ITEMS ---*/
@media screen and (min-width: 768px) {
  .right-menu-item {
    float: right !important;
    margin: 0 var(--spacing-small) !important;
  }
}

/*--- SEARCH BAR ---*/
#MSearchBox:focus-within {
  border-color: var(--primary-color);
  box-shadow: inset 0 0 0 1px var(--primary-color);
}

#MSearchBox {
  margin: 0 var(--spacing-small);
  display: flex !important;
  flex-direction: row !important;
}

input[type="search"] {
  color: var(--searchbar-foreground);
  background: var(--searchbar-background);
  border: 0px;
  height: var(--searchbar-height);
  padding-left: 12px;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

input#MSearchField:focus-visible {
  outline: none;
}

#MSearchSelect {
  fill: var(--page-foreground-color);
  opacity: 0.75;
  margin: auto;
  margin-right: 10px;
}

/* Parameter Colors Fix (will not be needed once dox-awesome matches dox version) */
.paramname em {
  color: inherit !important;
}

.memitem {
  margin-bottom: 200px !important;
}

/*--- DOXYGEN AWESOME ---*/
/* Better class and brief mappings */
/* Row Cell Padding */
td.memItemLeft,
td.memItemRight,
td.mdescLeft,
td.mdescRight {
  padding: 5px !important;
  background: var(--fragment-background) !important;
}

/* Row Top-Left Cell */
td.memItemLeft {
  border-radius: 5px 0 0 5px !important;
  border-top: 1px solid var(--separator-color) !important;
  border-left: 1px solid var(--separator-color) !important;
  border-bottom: 1px solid var(--separator-color) !important;
  padding-bottom: 2.5px !important;
}

/* Row Top-Right Cell */
td.memItemRight {
  border-radius: 0 5px 5px 0 !important;
  border-top: 1px solid var(--separator-color) !important;
  border-bottom: 1px solid var(--separator-color) !important;
  border-right: 1px solid var(--separator-color) !important;
  padding-bottom: 2.5px !important;
}

/* Row Bottom-Left Cell */
td.mdescLeft {
  border-radius: 0 0 0 5px !important;
  border-left: 1px solid var(--separator-color) !important;
  border-bottom: 1px solid var(--separator-color) !important;
  padding-top: 2.5px !important;
}

/* Row Bottom-Right Cell */
td.mdescRight {
  border-radius: 0 0 5px 0 !important;
  border-right: 1px solid var(--separator-color) !important;
  border-bottom: 1px solid var(--separator-color) !important;
  color: var(--page-secondary-foreground-color) !important;
  padding-top: 2.5px !important;
}

/* Separator Row Cell */
td.memSeparator {
  height: 0px !important;
  margin-bottom: -1px;
  display: block;
}

/* Code Row */
tr[class*="memitem"] {
  font-family: var(--font-family-monospace) !important;
}

/* Class Summary/Brief Row */
tr[class*="memdesc"] {
  transform: translateY(-4px) !important;
}

/* Selects Separator Row Cell if there is no class summary/brief */
tr[class*="memitem"] + tr[class*="separator"] > td.memSeparator {
  border-bottom: 4px solid transparent !important;
}


/*** style issues from doxygen 1.15.0 ***/
/* remove group borders */
tr:not(:first-child) > td.ititle{
  border: none !important;
}
div.groupHeader {
  box-shadow: none !important;
}
/* right TOC highlighter */
#page-nav ul.page-outline .vis::after {
  display: none !important;
}
/*** style issues from doxygen 1.15.0 ***/



/* fix white background on dark theme */
.image > svg {
  background: var(--page-background-color) !important;
}

/* better header margin */
table.memberdecls .groupheader,
#doc-content > div.contents > h2.groupheader {
  margin-bottom: 0px !important;
}
table.markdownTable {
  margin-left: 0 !important;
}

/* Remove module and description H2 & bottom border */
h2.groupheader {
  box-shadow: none !important;
  display: none !important;
}

/* remove header bottom-border */
div.header {
  border-bottom: 0px !important;
}

/* table spacing */
#doc-content > div > div.contents > div > table {
  display: revert !important;
}

/* change class fontsize */
table.memberdecls tr[class^="memitem"] {
  font-size: inherit !important;
}

/*logo */
#projectlogo img {
  max-height: inherit !important;
  margin-right: 0 !important;
}

/*div group header*/
div.groupText {
  margin-left: auto !important;
}

/*markdown images*/
#doc-content > div.contents > div > img {
  border-radius: var(--border-radius-small);
  border: 1px solid var(--separator-color);
  max-width: 1100px;
}

/* Hide "More..." brief links (sample apps) (maybe other sections) */
#doc-content > div.contents > p > a[href="#details"] {
  display: none;
}

/* As of Doxygen v1.10.0 */
/* treeview hover color bug fix */
div.item > a:hover,
div.item > a:hover > span.arrow {
  background: transparent !important;
}

/* Add Namespace Icon */
div#nav-tree
  ul.children_ul
  ul.children_ul
  ul.children_ul
  ul.children_ul
  a[class*="cartesian.html"]::before,
div#nav-tree
  ul.children_ul
  ul.children_ul
  ul.children_ul
  ul.children_ul
  a[class*="rttask.html"]::before {
  content: "N ";
  /* from .icon */
  font-size: 12px;
  width: 16px;
  display: inline-block;
  background-color: var(--primary-color) !important;
  color: white;
  text-align: center;
  border-radius: 4px;
  margin-left: 2px;
  margin-right: 4px;
  height: 16px;
  line-height: 16px;
}

/* MENU */
#menu-right-wrapper {
  display: flex;
  flex-direction: row;
}

/* MENU (DESKTOP) */
@media screen and (min-width: 768px) {
  /* hide main menu for non-mobile */
  #main-nav {
    display: none;
  }

  /* align search right */
  #menu-right-wrapper {
    right: 5px;
    position: absolute;
  }
}

/* MENU (MOBILE) */
@media screen and (max-width: 767px) {
  #menu-right-wrapper-list {
    display: ruby !important;
  }
}

/* THEM TOGGLE BUTTON */
doxygen-awesome-dark-mode-toggle {
  height: inherit !important;
  margin: 0 var(--spacing-small) !important;
}

/*--- EXPANDER ---*/
details {
  border: 1px solid var(--separator-color); /* Using separator color for border */
  border-radius: var(
    --border-radius-small
  ); /* Smaller radius for subtle curves */
  margin-bottom: var(--spacing-large);
  line-height: var(
    --content-line-height
  ); /* Line height used in main content */
}

details > summary {
  font-weight: 600;
  cursor: pointer;
  /* margin: var(--spacing-medium) 0;  Top and bottom margin, no horizontal margin */
  padding: var(--spacing-medium); /* Padding applied inside summary */
  color: var(
    --page-foreground-color
  ); /* Main text color used throughout the page */
}

details > p {
  padding: var(
    --spacing-medium
  ); /* Consistent padding inside <p> tags within details */
  margin: 0; /* Consistent padding inside <p> tags within details */
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  background: var(--tablehead-background);
}

details[open] > summary {
  border-bottom: 1px solid var(--separator-color);
  background: var(--tablehead-background);
}

/*fix right facing arrow*/
details > summary::before {
  font-family: Arial, sans-serif;
}

/* content bottom margin for better scrolling and reading */
div.contents {
  margin-bottom: 50vh !important;
}

/* --- TREEVIEW ITEM IMPROVEMENTS --- */
/* --- (HOVER BOX, ARROW BOX, LARGER CLICKING AREA, ETC) --- */
#nav-tree .item {
  position: relative;
  z-index: 0 !important;
  display: flex;          /* Use flexbox to layout child elements */
  align-items: center;    /* Center align items vertically */
  top: 5px;
}

/* treeview item hover box */
#nav-tree .selected::before, #nav-tree .item:hover::before {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  content: '';
  margin: 0px 5px;
  height: 28px;
  width: calc(100% - 10px);
  opacity: .5;
  z-index: -2 !important;
  background-color: var(--separator-color);
  border-radius: var(--border-radius-small);
}

/* positioning */
#nav-tree .arrow::before, #nav-tree .label::before {
  z-index: 100 !important;
  position: relative;
}
#nav-tree .arrow {
  opacity: 0.2 !important;
}
#nav-tree .arrow:hover {
  opacity: 1 !important;
}

/* make sure the text in treeview item expands to max width */
#nav-tree .label {
  position: relative; /* Set the position to relative to contain the absolute child */
  margin-top: -2px;
  flex: 1; /* Allow label to take the remaining space */
}

#nav-tree .label a {
  position: absolute; /* Set the position to absolute */
  left: 0; /* Align it to the left */
  top: 50%; /* Center vertically */
  transform: translateY(-50%); /* Center vertically */
  width: 100%; /* Ensure the anchor tag inside the label takes full width */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  display: block; /* Ensure the anchor tag inside the label takes full width */
  text-decoration: none; /* Optional: Remove underline from the link */
  color: inherit; /* Optional: Inherit color from parent */
  white-space: nowrap; /* Prevent text from wrapping to the next line */
}

/* treeview item arrow box */
.arrow{
    height: inherit !important;
}
#nav-tree a .arrow:hover::before {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  content: '';
  margin-left: -1px;
  padding: 11px 8px 11px 9px;
  top: calc(50% - 11px);
  z-index: -1 !important; /* Ensure the pseudo-element is below the arrow */
  background-color: var(--separator-color);
  border-radius: var(--border-radius-small);
}
span.arrowhead {
  width: 4px !important;
  height: 4px !important;
  border-right: 2px solid var(--side-nav-foreground) !important;
  border-bottom: 2px solid var(--side-nav-foreground) !important;
  margin: 0 0 3px 3px !important;
  transition: transform 0ms ease-in-out !important;
}
span.arrowhead.opened {
    transform-origin: 5px 4.5px !important;
}

/* hide doxygen awesome blue selection border */
#nav-tree .selected::after {
  display: none;
}

/** DIVIDERS **/
.contents hr {
  margin-top: 38px !important;
  box-shadow: none !important;
}

/** VIDEO **/
video {
  border-radius: var(--border-radius-small) !important;
  width: 100% !important;
}


/** TABS **/

/* button wrapper */
.tabs-overview {
  border-bottom: 0px !important;
  font-weight: 500 !important;
}

/* button */
.tab-button {
  padding: 0 !important;
}

/* button content */
.tab-title {
  box-shadow: none !important;
  border-radius: var(--border-radius-small) !important;
  color: var(--deprecated-color-darker); /*or --page-secondary-foreground-color*/
}

/* button content (not-active) (hover) */
.tab-button:hover:not(.active) .tab-title {
  border-radius: var(--border-radius-small) !important;
  color: inherit !important;
}

/* button content (active) */
.tab-button.active .tab-title {
  box-shadow: none !important;
  color: var(--primary-color) !important;
  font-weight: 600;
  background: var(--page-background-color) !important;
  border-radius: var(--border-radius-small) var(--border-radius-small) 0 0 !important;
  border: 1px solid var(--separator-color) !important;
  border-bottom: 1px solid transparent !important;
}

/* button content underline */
.tab-button.active::after {
  display: none !important;
}

/* content */
.tabbed > ul {
  border: 1px solid var(--separator-color);
  padding: 0 13px !important;
  margin-top: -1px !important;
}


/** CARDS / NOTES**/
/* remove left border & left spacing */
dl {
  border-left: 0px !important;
  padding: 10px 13px !important;
  display: flex;
  flex-direction: column;
  gap: 7.5px;
}

dl ul {
  margin: 0;
}

dt {
  font-weight: 500 !important;
}

dl.todo dt {
  color: var(--todo-color-darker) !important;
}

.card {
  background: var(--code-background);
  border-radius: var(--border-radius-small);
  flex: 1;
  margin: 0;
}

.card .card-title {
  /* text-transform: uppercase; */
  /* font-size: 1.17em; */ /*H3 font size*/
}

.card .card-text {
  padding-top: 7.5px;
}

.card .card-text, .card-text > p, .card-text a {
  font-size: var(--navigation-font-size) !important;
}

.card-text div > a {
  display: contents;
  line-height: var(--content-line-height);
}

.card .card-text, .card-text > p:last-child {
  margin-bottom: 0px;
}

/** CODE **/

code{
  display: inline-block !important;
  margin-top: -3px;
  vertical-align: middle;
  line-height: normal !important;
  font-weight: initial;
}

code.path {
  color: goldenrod !important;
  border: 0px !important
}

/* comments */
div.fragment span.comment {
  color: var(--fragment-token) !important;
}

/** COLUMNS **/

/* mobile */
@media only screen and (max-width: 767px) {
  .row {
    flex-direction: column !important;
  }
}

.row {
  display: flex;
  gap: 25px;
  align-items: stretch;
}

.column {
  display: flex;
  flex: 50%;
  box-sizing: border-box;
}

.stack {
  display: flex;
  gap: 25px;
  flex-direction: column;
}

/* remove margin on notes within columns */
.column > dl  {
  margin: 0 !important;
}

/** TAGS **/
.tag {
  color: var(--page-background-color);
  border: 0px;
  font-size: 11px !important;
  font-weight: 600;
  font-family: var(--font-family) !important;
  text-transform: uppercase;
}

.tag.orange {
  background: var(--fragment-keywordflow);
}

/** BADGES **/
.badge, .badge > a {
  border: 0px;
  font-size: 11px !important;
  font-weight: 600;
  font-family: var(--font-family) !important;
}
.badge, .badge.font-regular > a {
  font-size: 14px !important;
}

.badge.orange, .badge.orange > a {
  background: var(--separator-color);
  color: var(--fragment-keywordflow) !important;
}

.badge.green, .badge.green > a {
  background: var(--invariant-color);
  color: var(--invariant-color-dark) !important;
}

.badge.yellow, .badge.yellow > a {
  background: var(--warning-color);
  color: var(--warning-color-dark) !important;
}

.badge.red, .badge.red > a {
  background: var(--bug-color);
  color: var(--bug-color-dark) !important;
}

.badge.purple, .badge.purple > a {
  background: var(--todo-color);
  color: var(--todo-color-dark) !important;
}

.badge.blue, .badge.blue > a {
  background: var(--note-color);
  color: var(--note-color-dark) !important;
}

/** FANCYBOX **/
#myCarousel {
  margin: 0 auto;
}

#myCarousel .f-carousel__slide {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--blockquote-background);
}

/** MARKS **/ 
.mark {
  font-weight: bold !important;
  /* border: 1px solid !important; */
  cursor: help;
  padding: 0px 10px;
  font-size: 13px !important;
  letter-spacing: 0.25px;
  font-family: monospace !important;
  margin: 0px 4px 18px 0px;
  border-radius: var(--border-radius-small);
  display: inline-block;
  box-shadow: 0 1px 4px -2px var(--menu-selected-background), 
              inset 0 2px 1px -1px rgba(255, 255, 255, 0.1);
  line-height: 2;
  top: -4px;
}

/* Tooltip styling */
[data-tooltip] {
  position: relative;
  /* Ensures the tooltip is positioned relative to the element */
  z-index: auto;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0%;
  top: 33px;
  background: inherit;
  color: var(--page-foreground-color);
  padding: 12px 20px;
  white-space: pre;
  z-index: 9999;
  font-size: 14px;
  pointer-events: none;
  margin-left: 0;
  transition: none;
  border-radius: var(--border-radius-small);
  line-height: 1.5;
  font-weight: 400;
  font-family: var(--font-family);
  box-shadow: 0 1px 12px 0px var(--page-background-color);
}

/* DOXYGEN AUTOLINK TOOLTIP */
#powerTip {
  opacity: 1 !important;
  box-shadow: 1px 1px 6px #333 !important;
  border: 0px !important;
  padding: .75em !important;
  border-radius: var(--border-radius-medium) !important;
  gap: 2px !important;
  background-color: white !important;
}

/*method*/
#powerTip div.ttname a {
  /* color: #074871 !important; */
}

/*method signature*/
#powerTip div.ttdeci {
  font-size: 11px;
}

/*info*/
#powerTip div.ttdoc {
  color: #222;
  font-style: normal;
}

/*definition*/
#powerTip div.ttdef {
  margin-top: 10px;
  color: #666;
}

/* AI Search Button - FontAwesome Icon Styling */
#rsi-ai-search_trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--searchbar-height);
  height: var(--searchbar-height);
  background: transparent;
  border-radius: var(--border-radius-medium);
  cursor: pointer;
  transition: all var(--animation-duration) ease-in-out;
  fill: var(--fragment-foreground);
  font-size: 14px;
  transform-origin: center center;
  position: relative;
  margin: 0 var(--spacing-small) !important;
}

#rsi-ai-search_trigger:hover {
    background-color: rgba(0, 0, 0, .03);
}

html.dark-mode #rsi-ai-search_trigger:hover {
  background-color: rgba(0,0,0,.18);
}

/* METHOD EXAMPLES SECTION */

.section.examples dd {
  display: flex;
  flex-direction: column;
  font-size: 0px;
  line-height: 0px;
}

.section.examples dd > a {
  line-height: var(--table-line-height);
  font-size: 16px;
}
