/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Body */
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px;
    color: #333;
    background: #fefefe;
    margin: 0;
    padding: 2em;
    max-width: 960px;
    margin-left: 270px; /* Room for sidebar */
}

#table-of-contents ul {
    list-style: none; /* Remove bullets */
    padding-left: 0; /* No padding for top level */
}

#table-of-contents ul ul {
    padding-left: 1em; /* Only a little indent for deeper levels */
}

#table-of-contents li {
    margin: 0.2em 0;
}

/* Sidebar */
#elot-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    overflow-y: auto;
    background: #f9f9f9;
    border-right: 1px solid #ddd;
    padding: 1em;
    font-size: 0.9em;
}

#elot-sidebar ul {
    list-style: none;
    padding-left: 0;
}

#elot-sidebar li {
    margin: 0.5em 0;
}

#elot-sidebar a {
    text-decoration: none;
    color: #4a7ba7;
}

#elot-sidebar a:hover {
    text-decoration: underline;
    color: #003366;
}

#elot-sidebar span.nodeclare {
    color: #aaa;
    font-style: italic;
    font-size: 90%;
}

#elot-sidebar .toc-toggle {
    font-size: 0.8em;
    margin-right: 0.3em;
    user-select: none;
}

#elot-sidebar li.has-children {
    list-style-type: none; /* remove bullet when toggle is present */
}

#elot-sidebar .section-number {
    display: none;
}

#elot-sidebar .toc-spacer {
    display: inline-block;
    width: 1em;
    text-align: center;
    user-select: none;
}

/* Heading styles */
h1 {
    font-weight: 700;
    font-size: 2.4em;
    margin-top: 2em;
    margin-bottom: 0.8em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.3em;
}

h2 {
    font-weight: 700;
    font-size: 1.8em;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: #333;
    border-bottom: 2px solid #ccc;
    padding-bottom: 0.3em;
}

/* h3 = Important section: Classes, Properties */
h3 {
    font-weight: 700;
    font-size: 1.6em;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    color: #005a9c; /* Dark blue tone */
    border-bottom: 2px solid #007acc; /* Light blue underline */
    padding-bottom: 0.3em;
}

span.nodeclare {
    color: #999;        /* Light grey */
    font-style: italic; /* Optional: italicize it for more subtlety */
    font-size: 90%;     /* Slightly smaller */
}

/* Uniform small headings for deep ontology classes */
h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14, h15 {
    font-weight: bold;
    font-size: 1.2em;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #222;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.2em;
}

/* Make only the number part of h4+ headings non-bold */
h4 .section-number-4,
h5 .section-number-5,
h6 .section-number-6,
h7 .section-number-7,
h8 .section-number-8,
h9 .section-number-9,
h10 .section-number-10,
h11 .section-number-11,
h12 .section-number-12,
h13 .section-number-13,
h14 .section-number-14,
h15 .section-number-15 {
    font-weight: normal;
    color: #999;        /* Light grey */
}

.collapse-toggle {
    cursor: pointer;
    margin-right: 0.3em;
    user-select: none;
}

/* Base: spacing for top-level entries */
dl {
    margin: 0.6em 0;
    padding-left: 2em;
}

dt {
    # font-weight: bold;
    font-weight: normal;
    # font-style: italic; 
    margin: 0;
    display: inline;
}

dd {
    margin: 0;
    display: inline;
}

/* Term + value formatting */
dt::after {
    content: ": ";
}

dt + dd::after {
    content: "\A";
    white-space: pre;
}

/* Suppress the extra linebreak after a dd that contains a nested dl.
   Without this, the dt+dd::after "\A" newline creates a blank line
   below the nested sub-items. */
dd:has(> dl)::after {
    content: none;
}

/* Nested description list inside a dd */
dd dl {
    display: block;
    margin: 0.3em 0 0em 1.5em;  /* soft top spacing + indent, no bottom margin */
    padding: 0;
}

/* Remove extra space from paragraphs inside dd */
dd p {
    margin: 0;
    padding: 0;
}

dd p + dl {
    margin-top: 0.3em;
}

/* Remove any unexpected spacing between nested dl and the next top-level dt */
dd dl + * {
    margin-top: 0;
    padding-top: 0;
}

dl dl + dt {
    margin-top: 0.3em; /* reintroduce small space after nested list */
}

/* Nested terms inline as well */
dd dl dt,
dd dl dd {
    display: inline;
    margin: 0;
    padding: 0;
}

dd dl dt::after {
    content: ": ";
}

dd dl dt + dd::after {
    content: "\A";
    white-space: pre;
}

dd > dl:last-child {
    margin-top: 0em;
    padding: 0;
    margin-bottom: 0;
}

dd:last-child {
  margin-bottom: 0;
}


/* OMN keyword highlight */
dt.elot-omn-keyword {
    font-family: monospace;
    color: #006699;
    background-color: #f0f8ff;
    padding: 0 0.3em;
    border-radius: 3px;
}

/* Code Blocks */
pre, code {
    background: #f5f5f5;
    font-family: Consolas, Monaco, "Courier New", monospace;
}

pre {
    font-size: 13px;
    padding: 1em;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

code {
    font-size: 14px;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 0.75em;
    text-align: left;
}

th {
    background: #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Copy link button */
.copy-link-button {
    margin-left: 0.5em;
    font-size: 0.8em;
    background: none;
    border: none;
    cursor: pointer;
    color: #4a7ba7;
}

.copy-link-button:hover {
    color: #003366;
}

/* Global link color override */
a {
    text-decoration: none;
    color: #4a7ba7;
}

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