/* Rosé Pine Moon theme for Doxygen
 *
 * Color scheme based on Rosé Pine Moon
 * https://rosepinetheme.com/
 *
 * Rosé Pine is licensed under the MIT License
 * Copyright (c) Rosé Pine
 * https://github.com/rose-pine
 *
 * This stylesheet applies Rosé Pine Moon colors to Doxygen-generated documentation.
 */

/* Rosé Pine Moon color palette */
:root {
  --base: #232136;
  --surface: #2a273f;
  --overlay: #393552;
  --muted: #6e6a86;
  --subtle: #908caa;
  --text: #e0def4;
  --love: #eb6f92;
  --gold: #f6c177;
  --rose: #ea9a97;
  --pine: #3e8fb0;
  --foam: #9ccfd8;
  --iris: #c4a7e7;
  --highlight-low: #2a283e;
  --highlight-med: #44415a;
  --highlight-high: #56526e;
}

/* Global background and text */
body, div.contents {
  background-color: var(--base) !important;
  color: var(--text) !important;
}

div.header {
  background-color: var(--base) !important;
  color: var(--text) !important;
  border-color: var(--overlay) !important;
}

.headertitle {
  border-color: var(--overlay) !important;
}

/* Top bar / title area */
#top,
#titlearea {
  background-color: var(--surface) !important;
  border-bottom: 1px solid var(--overlay) !important;
}

#titlearea table {
  background-color: var(--surface) !important;
}

#projectrow {
  background-color: var(--surface) !important;
}

/* Headers */
h1, h2, h3, h4, h5, h6,
.title,
div.headertitle .title {
  color: var(--foam) !important;
  border-bottom-color: var(--overlay) !important;
}

/* Links */
a, a:link, a:visited {
  color: var(--iris) !important;
  text-decoration: none;
}

a:hover, a:active {
  color: var(--foam) !important;
  text-decoration: underline;
}

/* Main menu */
#main-nav,
#main-menu,
.sm,
.sm-dox {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
}

#main-menu a,
.sm-dox a {
  color: var(--text) !important;
  background-color: var(--surface) !important;
}

#main-menu a:hover,
.sm-dox a:hover {
  color: var(--foam) !important;
  background-color: var(--overlay) !important;
}

#main-menu a.highlighted,
.sm-dox a.highlighted {
  background-color: var(--overlay) !important;
}

/* Mobile menu button */
.main-menu-btn,
.main-menu-btn-icon {
  background-color: var(--surface) !important;
  color: var(--text) !important;
}

/* Submenu styling */
.sm-dox ul {
  background-color: var(--surface) !important;
  border: 1px solid var(--overlay) !important;
}

.sm-dox ul a {
  background-color: var(--surface) !important;
}

.sm-dox ul a:hover {
  background-color: var(--overlay) !important;
}

/* Modern chevron indicators instead of diamond */
.sm-dox a span.sub-arrow {
  border-right: 2px solid var(--subtle) !important;
  border-bottom: 2px solid var(--subtle) !important;
  background-color: transparent !important;
}

.sm-dox a:hover span.sub-arrow,
.sm-dox a.highlighted span.sub-arrow {
  border-right: 2px solid var(--foam) !important;
  border-bottom: 2px solid var(--foam) !important;
  background-color: transparent !important;
}

/* Mobile menu - replace +/- with chevrons */
@media(max-width: 767px) {
  .sm-dox a span.sub-arrow:before {
    content: '›' !important;
    color: var(--subtle) !important;
  }

  .sm-dox a.highlighted span.sub-arrow:before {
    content: '▾' !important;
    color: var(--foam) !important;
  }
}

/* Navigation path (breadcrumbs at bottom) */
#nav-path,
.navpath {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
}

#nav-path ul,
.navpath ul {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
}

#nav-path li,
.navpath li,
.navelem {
  background-color: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--overlay) !important;
}

#nav-path a,
.navpath a,
.navelem a {
  color: var(--iris) !important;
}

#nav-path a:hover,
.navpath a:hover,
.navelem a:hover {
  color: var(--foam) !important;
}

/* Navigation bar / tabs */
.tabs,
.tabs1, .tabs2, .tabs3 {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
}

.tablist li,
.tabs1 li, .tabs2 li, .tabs3 li {
  background-color: var(--surface) !important;
}

.tablist li.current,
.tabs1 li.current, .tabs2 li.current, .tabs3 li.current {
  background-color: var(--overlay) !important;
}

.tablist a,
.tabs1 a, .tabs2 a, .tabs3 a {
  color: var(--text) !important;
}

/* Code blocks - terminal/console colors */
div.fragment,
pre.fragment {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
  color: var(--text) !important;
}

div.line {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
  color: var(--foam) !important; /* Use foam for console text like in terminal */
}

/* Comments in code blocks (lines starting with #) */
div.line:first-line {
  color: var(--text) !important;
}

/* Line numbers */
.lineno {
  color: var(--muted) !important;
}

/* Syntax highlighting - based on Atom Rosé Pine Moon theme */
span.keyword,
.keyword {
  color: #eabbb9 !important; /* pink - keywords like if, for, class */
  font-weight: normal;
}

span.keywordtype,
.keywordtype {
  color: #c3a5e6 !important; /* purple - types like int, void */
  font-style: italic;
}

span.keywordflow,
.keywordflow {
  color: #eabbb9 !important; /* pink - control flow like return, break */
  font-weight: normal;
}

span.comment,
.comment {
  color: #6f6e85 !important; /* muted gray - comments */
  font-style: italic;
}

span.preprocessor,
.preprocessor {
  color: #ea6f91 !important; /* love/red - preprocessor directives */
}

span.stringliteral,
.stringliteral {
  color: #f1ca93 !important; /* yellow/gold - string literals */
}

span.charliteral,
.charliteral {
  color: #f1ca93 !important; /* yellow/gold - character literals */
}

/* Additional syntax elements */
.hl_function {
  color: #9bced7 !important; /* cyan/foam - function names */
}

.hl_enumvalue {
  color: #c3a5e6 !important; /* purple - enum values */
}

span.type,
.type {
  color: #c3a5e6 !important; /* purple - type names */
  font-style: italic;
}

/* Tables */
table.memberdecls,
table.fieldtable,
table.memname {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
}

.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight,
.memTemplParams {
  background-color: var(--surface) !important;
  color: var(--text) !important;
}

/* Function/member documentation */
.memproto,
.memdoc {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
  color: var(--text) !important;
}

.memname {
  color: var(--foam) !important;
}

.paramtype {
  color: var(--gold) !important;
}

.paramname {
  color: var(--rose) !important;
}

/* Sections */
div.toc,
div.textblock,
div.ah {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
  color: var(--text) !important;
}

/* Search box */
#MSearchBox,
.MSearchBoxInactive,
.MSearchBoxActive {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
  color: var(--text) !important;
}

/* Warnings/Notes/etc */
dl.warning,
dl.attention,
dl.note {
  background-color: var(--highlight-low) !important;
  border-left: 4px solid var(--gold) !important;
  color: var(--text) !important;
}

dl.bug,
dl.deprecated {
  background-color: var(--highlight-low) !important;
  border-left: 4px solid var(--love) !important;
  color: var(--text) !important;
}

/* Directory/file lists */
.directory {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
}

table.directory {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
}

table.directory tr {
  background-color: var(--surface) !important;
}

table.directory tr.even {
  background-color: var(--surface) !important;
}

table.directory tr.odd {
  background-color: var(--highlight-low) !important;
}

table.directory td {
  color: var(--text) !important;
  border-color: var(--overlay) !important;
}

table.directory td.entry {
  color: var(--text) !important;
}

table.directory td.desc {
  color: var(--subtle) !important;
}

table.directory a {
  color: var(--iris) !important;
}

table.directory a:hover {
  color: var(--foam) !important;
}

.directory .levels {
  color: var(--text) !important;
}

.directory .levels span {
  color: var(--iris) !important;
  cursor: pointer;
}

.directory .levels span:hover {
  color: var(--foam) !important;
}

.directory .arrow,
.arrow {
  color: var(--iris) !important;
}

.arrowhead {
  border-color: var(--iris) !important;
}

/* Icons */
.icona,
.iconfopen,
.iconfclosed {
  filter: brightness(0) saturate(100%) invert(88%) sepia(11%) saturate(291%) hue-rotate(198deg) brightness(103%) contrast(92%);
}

/* Top page header */
#projectname {
  color: var(--foam) !important;
  font-weight: bold;
}

#projectbrief,
#projectnumber {
  color: var(--subtle) !important;
}

/* Footer */
.footer,
hr.footer {
  background-color: var(--surface) !important;
  color: var(--muted) !important;
  border-top-color: var(--overlay) !important;
}

/* Class list */
.classindex dl,
.classindex dd {
  color: var(--text) !important;
}

/* Sidebar/tree view */
#side-nav,
#nav-tree,
#nav-tree-contents,
.ui-resizable-e {
  background-color: var(--surface) !important;
  border-color: var(--overlay) !important;
}

#nav-tree .item,
#nav-tree .label {
  color: var(--text) !important;
}

#nav-tree .selected {
  background-color: var(--overlay) !important;
  color: var(--foam) !important;
}

/* Tree view links */
#nav-tree a {
  color: var(--text) !important;
}

#nav-tree a:hover {
  color: var(--foam) !important;
}

/* Member items */
.mdescLeft, .mdescRight {
  background-color: var(--surface) !important;
  color: var(--subtle) !important;
}

/* Alternating row colors in tables */
.memberdecls tr:nth-child(even) {
  background-color: var(--highlight-low) !important;
}

/* Namespace/class member groups */
tr.heading {
  background-color: var(--overlay) !important;
  color: var(--text) !important;
  font-weight: bold;
}

/* Return type, parameter qualifiers */
.mlabels {
  color: var(--subtle) !important;
}

.mlabels .mlabel {
  background-color: var(--pine) !important;
  color: var(--base) !important;
  border-color: var(--pine) !important;
}

/* Template parameters */
.memtemplate {
  color: var(--iris) !important;
}

/* Enum values */
.fieldtable th {
  background-color: var(--overlay) !important;
  color: var(--text) !important;
}

/* Inline code - high contrast for readability */
code,
tt,
.tt {
  background-color: var(--highlight-low) !important;
  color: var(--foam) !important;
  border: 1px solid var(--overlay) !important;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Brief descriptions */
.brief {
  color: var(--subtle) !important;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--overlay);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--highlight-high);
}
