/* Dark theme overrides for Ark Server API Wiki */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== Base Typography ===== */
body, table, div, p, dl {
    font-family: 'Roboto', Arial, sans-serif;
}

/* Code typography */
code, .memname, .params, pre.fragment, div.fragment,
div.line, div.line a, span.lineno,
td.memItemLeft, td.memItemRight,
td.memTemplItemLeft, td.memTemplItemRight,
td.memTemplParams {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

/* ===== Dark Base ===== */
body {
    background-color: #1b1b2f;
    color: #d4d4d8;
}

/* ===== Links ===== */
a {
    color: #60a5fa;
    text-decoration: none;
}

a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

a:visited {
    color: #818cf8;
}

/* ===== Header / Title Area ===== */
#titlearea {
    background-color: #161625;
    border-bottom: 1px solid #2e2e4a;
    padding: 8px 16px;
}

#titlearea table td {
    vertical-align: middle;
}

#projectname {
    color: #e4e4e8;
    font-size: 1.5em;
    font-weight: 500;
}

#projectbrief {
    color: #9ca3af;
    font-size: 0.85em;
}

#projectlogo img {
    max-height: 55px;
    max-width: 55px;
}

/* ===== Navigation Tabs ===== */
.sm-dox {
    background-color: #161625;
}

.sm-dox a {
    color: #d4d4d8 !important;
    text-shadow: none !important;
}

.sm-dox a:hover,
.sm-dox a:focus,
.sm-dox a:active,
.sm-dox a.highlighted {
    background-color: #2e2e4a !important;
    color: #60a5fa !important;
}

.tabs, .tabs2, .tabs3 {
    background-color: #161625;
    border-bottom: 1px solid #2e2e4a;
}

.tablist li a {
    color: #d4d4d8;
    background-color: #161625;
}

.tablist li a:hover {
    background-color: #2e2e4a;
    color: #60a5fa;
}

.tablist li.current a {
    background-color: #2e2e4a;
    border-bottom: 2px solid #60a5fa;
    color: #60a5fa;
}

/* ===== Side Navigation (Tree View) ===== */
#side-nav {
    background-color: #1e1e35;
    border-right: 1px solid #2e2e4a;
}

#nav-tree {
    background-color: #1e1e35;
}

#nav-tree .selected {
    background-color: #2e2e4a;
}

#nav-tree a {
    color: #d4d4d8;
}

#nav-tree .item {
    color: #d4d4d8;
}

/* Splitter between side nav and content */
#side-nav, .ui-resizable-e {
    background-color: #1e1e35;
}

/* ===== Content Area ===== */
div.contents {
    padding: 12px 20px;
}

div.header {
    background-color: #1e1e35;
    border-bottom: 1px solid #2e2e4a;
    padding: 10px 20px;
}

div.headertitle {
    padding: 0;
}

div.summary {
    padding: 4px 0;
    color: #9ca3af;
}

div.summary a {
    color: #60a5fa;
}

/* ===== Member Documentation ===== */
.memtitle {
    background-color: #1e1e35;
    border: 1px solid #2e2e4a;
    color: #e4e4e8;
    padding: 6px 10px;
    font-weight: 500;
    border-radius: 6px 6px 0 0;
}

.memproto, .memname {
    font-weight: 500;
    color: #d4d4d8;
}

.memproto {
    background-color: #1e1e35;
    border: 1px solid #2e2e4a;
    border-radius: 6px 6px 0 0;
    text-shadow: none;
}

.memitem {
    border: 1px solid #2e2e4a;
    border-radius: 6px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    background-color: #1e1e35;
}

.memdoc {
    border-top: 1px solid #2e2e4a;
    padding: 10px 14px;
    background-color: #1b1b2f;
}

.memSeparator {
    border-bottom: 1px solid #2e2e4a;
}

/* ===== Code Fragments ===== */
div.fragment, pre.fragment {
    background-color: #141422;
    border: 1px solid #2e2e4a;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.9em;
    overflow-x: auto;
    color: #d4d4d8;
}

code {
    background-color: #141422;
    border-radius: 4px;
    padding: 1px 5px;
    color: #d4d4d8;
}

div.line {
    color: #d4d4d8;
}

div.line a {
    color: #60a5fa;
}

span.lineno {
    color: #6b7280;
    border-right: 1px solid #2e2e4a;
}

/* Syntax highlighting */
span.keyword { color: #c792ea; }
span.keywordtype { color: #82aaff; }
span.keywordflow { color: #c792ea; }
span.comment { color: #6a9955; }
span.preprocessor { color: #c3e88d; }
span.stringliteral { color: #c3e88d; }
span.charliteral { color: #c3e88d; }
span.vhdldigit { color: #f78c6c; }
span.vhdlchar { color: #c3e88d; }
span.vhdlkeyword { color: #c792ea; }
span.vhdllogic { color: #89ddff; }

/* ===== Tables ===== */
table.memberdecls {
    border-spacing: 0;
    width: 100%;
}

table.memberdecls td {
    border-bottom: 1px solid #2e2e4a;
    padding: 4px 8px;
}

.mdescLeft, .mdescRight {
    background-color: #1e1e35;
    color: #9ca3af;
}

.memItemLeft, .memItemRight {
    border-top: 1px solid #2e2e4a;
    padding: 4px 8px;
    color: #d4d4d8;
}

/* ===== Section Headers ===== */
h2.groupheader {
    border-bottom: 2px solid #60a5fa;
    color: #e4e4e8;
    padding-bottom: 4px;
    font-weight: 500;
}

h1, h2, h3, h4, h5, h6 {
    color: #e4e4e8;
}

/* ===== Search Box ===== */
#MSearchBox {
    border: 1px solid #2e2e4a;
    border-radius: 6px;
    background-color: #141422;
}

#MSearchField {
    font-family: 'Roboto', Arial, sans-serif;
    color: #d4d4d8;
    background-color: #141422;
}

#MSearchResultsWindow {
    background-color: #1e1e35;
    border: 1px solid #2e2e4a;
    color: #d4d4d8;
}

/* ===== Footer ===== */
.footer {
    background-color: #161625;
    color: #9ca3af;
    border-top: 1px solid #2e2e4a;
    padding: 8px 16px;
    font-size: 0.8em;
    text-align: center;
}

.footer a {
    color: #60a5fa;
}

/* ===== Directory / File List ===== */
.directory td.entry {
    padding: 4px 8px;
}

.directory tr.even {
    background-color: #1e1e35;
}

.arrow {
    color: #60a5fa;
}

/* ===== Breadcrumbs ===== */
.navpath ul {
    background-color: #1e1e35;
    border: 1px solid #2e2e4a;
    border-radius: 6px;
}

.navpath li {
    color: #60a5fa;
}

.navpath li a {
    color: #60a5fa;
}

/* ===== Misc ===== */
hr {
    border-color: #2e2e4a;
}

.dotgraph, .mscgraph, .diagraph {
    text-align: center;
}

.paramname {
    color: #60a5fa;
    font-weight: 500;
}

.fieldname {
    color: #60a5fa;
}

/* Enum / define values */
td.fieldname {
    color: #60a5fa;
}

/* Text content areas */
.textblock {
    color: #d4d4d8;
}

/* Class index */
td.indexkey {
    background-color: #1e1e35;
    border: 1px solid #2e2e4a;
    color: #d4d4d8;
}

td.indexvalue {
    background-color: #1e1e35;
    border: 1px solid #2e2e4a;
    color: #9ca3af;
}

/* Custom nav links in header */
.custom-nav {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 6px 16px;
    background-color: #141422;
    border-bottom: 1px solid #2e2e4a;
}

.custom-nav a {
    color: #9ca3af;
    font-size: 0.85em;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s;
}

.custom-nav a:hover {
    color: #60a5fa;
    text-decoration: none;
}

.custom-nav a:visited {
    color: #9ca3af;
}

/* ===== Doxygen overrides for dark ===== */
/* Override any remaining light backgrounds from Doxygen defaults */
#doc-content {
    background-color: #1b1b2f;
}

.title {
    color: #e4e4e8;
}

dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant {
    border-left: 4px solid #60a5fa;
    background-color: #1e1e35;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
}

dl.warning {
    border-left-color: #f59e0b;
}

dl.deprecated {
    border-left: 4px solid #ef4444;
    background-color: #1e1e35;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
}

/* Tooltips */
.ttc {
    background-color: #1e1e35;
    border: 1px solid #2e2e4a;
    color: #d4d4d8;
}
