/* Highly Readable mdBook custom.css */

/*
:root {
     --bg-color: #ffffff;
    --text-color: #333333;
    --link-color: #0000EE;
    --visited-link-color: #0000EE;
    --sidebar-bg: #f2f2f2;
    --sidebar-fg: #3b2e2a;
    --sidebar-active: #4a4a4a;
    --heading-color: #000000;
    --code-bg: #f8f8f8;
    --menu-title-bg: #f2f2f2; 
    --menu-title-color: #333333; 
}
*/

:root {
    --link-color: #0000EE;
    --visited-link-color: #0000EE;
}

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

body {
    font-family: 'Nunito', 'Segoe UI', 'Helvetica', 'Arial', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    margin-top: 0.3em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h1 { font-size: 2.1em; }
h2 { font-size: 1.7em; }
h3 { font-size: 1.4em; }
h4 { font-size: 1.1em; }

h1:has(a.header) {
    border-bottom: 2px solid black;
    padding-bottom: 0.25em;
    margin-bottom: 0.75em;
}


a {
    color: var(--link-color);
    text-decoration: underline;
}

a:visited {
    color: var(--visited-link-color);
    text-decoration: underline;
}

/* New styles for menu title */
.menu-title {
    /*padding: 15px 20px;*/
    background-color: var(--menu-title-bg);
    color: var(--menu-title-color);
    font-size: 40px;
    font-weight: bold;
    text-align: center;
    /*margin-bottom: 20px;*/
    border-bottom: 2px solid var(--sidebar-active);
}

.sidebar {
    background-color: var(--sidebar-bg);
    font-size: 17px;
    padding: 10px;
}

.sidebar ul {
    padding-left: 10px;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    color: var(--sidebar-fg);
    text-decoration: none;
}

.sidebar a:hover, .sidebar a.active {
    color: var(--sidebar-active);
    font-weight: normal;
}

code {
    font-family: "Courier New", Courier, monospace;
    background-color: var(--code-bg);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 1.1em;
}

pre {
    background-color: var(--code-bg);
    padding: 15px;
    overflow-x: auto;
    border-radius: 4px;
    font-size: 16px;
}

code, pre {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

blockquote {
    margin: 20px 0;
    padding: 10px 20px;
    border-left: 5px solid #ccc;
    background-color: #f9f9f9;
    font-style: italic;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

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

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .content {
        padding: 10px;
    }
}

/* Book Version */
#footer-class{    
    font-size: 0.6em;
    padding: 0 0;
    display: block;
    text-align: right;
}

/*Last Change Date*/
footer {
    display: block;
    font-size: 0.6em;
    text-align: right;
    padding: 0 0;
}

/*Avg Reading Time*/
#header-class{    
    display: block;
    text-align: right;
    font-size: 0.7em;
    padding: 2px 0;
}

/* this draws a line above the tags in the footer */
p:has(a[title^="Tag:"])::before {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background-color: black;
    margin-bottom: 0.5em;
}

p:has(a[title^="Tag:"]) .hljs{
    display:inline-flexbox;
    color:black;
    font-size: 0.7em;
}


/* this draws a line above the tags in the footer */
/* This is needed for webinclude pages */

p:has(code)::before {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background-color: black;
    margin-bottom: 0.5em;
}

p:has(code) .hljs{
    display:inline-flexbox;
    color:black;
    font-size: 0.7em;
}




/*Tabs*/
.mdbook-tabs {
    display: flex;
    
}

.mdbook-tab {
    background-color: var(--table-alternate-bg);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border: none;
    font-size: 1.6rem;
    line-height: 1.45em;
}

.mdbook-tab.active {
    background-color: var(--table-header-bg);
    font-weight: bold;
}

.mdbook-tab-content {
    padding: 1rem 0rem;
}

.mdbook-tab-content table {
    margin: unset;
}