/** Disable annoying pull-down-to-refresh in mobile web browsers. */
html, body {
    overscroll-behavior: none;
}


body {
    color: #544832;
    background-color: var(--bg-main);
    scroll-padding-top: 60px;
    font-family: var(--font-family-main);
}

h1 { 
    font-size: var(--font-size-h1);
}

main h2 {
    font-size: var(--font-size-h2) ;
}

main h3 {
    font-size: var(--font-size-h3);
}

main h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-title);
}

.img-icon {
    height: 25px !important;
}


.text-big {
    font-size: 18pt;
}

.text-big-bold {
    font-size: 18pt;
    font-weight: bolder;
}


.document-heading {
    margin-top:  10px;
    padding-top: 10px;
    text-wrap:   balance;
    line-height: 30px !important;
    display:     block;        
    margin-top: -20px !important;
    padding-top: 40px !important;
    cursor: pointer;
}


.div-heading {
    display: flex;
}

.anchor {
	padding-top: 100px;
	margin-top: -100px;
}

.text-highlight {
    background-color: rgb(241, 228, 151);
}

a {
    z-index: 600;
}

a.link-external {
    color: var(--link-external-color);
    word-wrap: break-word;
}

a.link-sidebar {
    color:  var(--link-external-color); 
    word-wrap: break-word;
}

a.link-sidebar-clicked {
    color: black !important;
    background-color: ivory;
}

a.link-internal {
    color: green;
}

a.link-internal-missing {
    color: #b31d28;
}

a.footnote-link {
    font-size: 0.8rem;
    color: blue;
    /* Hand cursor */
    cursor: pointer;
    text-decoration-line: none;
}

a.link-toc {
    color: blue;
}

a.link-heading {
    color: var(--bg-main);
}

a.link-heading:hover {
    color: black; 
}


hr.line-under-heading {
    color: #22863a;
    margin-top:   -15px;
    margin-bottom: 20px;
}

/** Fix issues caused by the CSS class anchor */
img {
    padding-top: 10px !important;
    margin-top: 20px !important;
}

img.wiki-image {
    max-width: 100%;
    width: auto;
    cursor: zoom-in;
}


    
div.math-container {
    margin-bottom: 10px;
    /* background-color: aliceblue; */
}
    
    
img.inline-math {
    vertical-align: -2pt;
    max-height: 15px;
    padding-top: 0px !important;
    margin-top: 0px !important;
    /* background-color: aliceblue; */
}
    
    
img.inline-math:hover {
    transform: scale(1.5);
    background-color: aliceblue;
    margin: 10px;
}


body {
    font-size:      0.60rem;
    letter-spacing: 0.2px;
    text-rendering: optimizeLegibility;

}

span.search-highlight  {
    background-color: lightsalmon;
}

.content p {
    margin-block-start: 5px !important;
    margin-block-end: 5px !important;
}


/** Definition List **/
dl {
    /** background-color: aliceblue; */
    border: 5px black;
    border-radius: 10px;
}

dt {
    /* font-weight: bold; */
    color: black;
    text-decoration: underline;
    /* text-align: right; */
    /* color: green; */
}


dd {
    font-style: oblique;
}
/** --- End of Definition List Style --- */

.sidebar {
    background-color: var(--bg-sidebar); 
    font-size: var(--font-size-sidebar);
    left: 0px;
    top: 0px;
    bottom: 0px;
    right: 0px;

    position: absolute;
    border-right: 2px solid rgba(0, 0, 0, 0.973);

    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    overflow-y: auto;

    padding: 10px;

}


.sidebar-toggle-button {
    height: 50px;
    padding: 0 15px;
    line-height: 50px;
    font-size: 1.5rem;
    color: cadetblue;
    text-decoration: none;
    cursor: pointer;
}


.menu-dropdown-content  .sidebar-toggle-button:hover {
    background-color: lightgreen !important;;
}


.main {
    top: 0;
    right: 0;
    left: 0;
    bottom:  0;
    position: absolute;
    overflow-y: auto;
    max-width: var(--screen-width-desktop);
    background-color: var(--bg-main);

}

.content {
    max-width: 700px;
    letter-spacing: var(--typography-main-leter-spacing);
    line-height: var(--typography-main-line-height);
    margin-top: 50px;
    padding-top: 10px;
}

.header {
    height: 50px;
    background-color: var(--bg-sidebar); 
    overflow: visible;
    padding: 0 8px;

    position: fixed;
    z-index: 1000;
    width: 100%;
    padding-bottom: 30px;
    margin-top: -20px;

    /* background-color: cadetblue; */
}

.link-edit-admonition {
    margin-top: -20px;
}


.toc {
    margin-left: -50px;
}

/**
@media (max-width: 900px)
{
    .content{
        min-height: calc(100% - 50px);
    }
}
**/

blockquote {
  font-style: italic;
  background: #f9f9f9;
  border-left: 10px solid #ccc;
  margin: 1.5em 10px;
  padding: 0.5em 10px;

}

blockquote > p {
  display:inline;
}

blockquote:before {
   /* content: '“'; */
   content: open-quote; 
   font-size: 4em; 
   line-height: 0.1em;
   margin-right: 0.25em;
   vertical-align: -0.4em;
}

/* blockquote:after { content: '”'; } */

blockquote p {
  display: inline;
}



.div-page-info {
  /* background: #FFFFE0; */
  background: #eef5f2;
  margin: 10px;
  margin-top: 2px;
  padding: 5px;
  border-radius: 5px;
}

.popup-message-text {
    font-size: 1rem;
}

abbr {
    cursor: pointer;
}


.myst-note-role {
    cursor: pointer;
    text-decoration: underline dotted #6f6f6f 2px;
}


.admonition {
    padding: 10px;
    border: 5px;
    border-radius: 10px;
    /* max-width: 60%; */
    border-color: blue; 
    border-left: 0.2rem solid;
    border-radius: 0.25rem;
    box-shadow: 0 0.2rem 0.5rem; 
    break-inside: avoid;
    margin: 1.5625em auto;
    overflow: hidden;
    padding: 0 0.6rem 0.8rem;
    page-break-inside: avoid;
    border-radius: 10px;
    background: #F9F9F9;

}

img.admonition-icon {
    max-width: 20px;
    margin-top: 5px !important;
    padding: 0px !important;
}

.tip .admonition-title {
    font-weight: bold;
    font-size: larger;
    background-color: #a8eec8;
    margin: 0 -0.6rem;
    padding: 0.4rem 0.6rem 0.4rem 2rem;
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    /*
    font-weight: bold;
    font-size: larger;
    background-color: #22863a;
    
    */
}

.note .admonition-title {
    font-weight: bold;
    font-size: larger;
    background-color: #DCE7FC;
    margin: 0 -0.6rem;
    padding: 0.4rem 0.6rem 0.4rem 2rem;
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;

}

.info .admonition-title {
    font-weight: bold;
    font-size: larger;
    background-color: #81ff5b;
    margin: 0 -0.6rem;
    padding: 0.4rem 0.6rem 0.4rem 2rem;
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;

}


.warning .admonition-title {
    font-weight: bold;
    font-size: larger;
    background-color: #ff7a73;
    margin: 0 -0.6rem;
    padding: 0.4rem 0.6rem 0.4rem 2rem;
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;

}


.def .admonition-title {
    /* font-weight: bold; */
    font-size: larger;
    background-color:  #D7EDE1;
    margin: 0 -0.6rem;
    padding: 0.4rem 0.6rem 0.4rem 2rem;
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
}

.theorem .admonition-title {
    /* font-weight: bold; */
    font-size: larger;
    background-color:  #a8eec8;
    margin: 0 -0.6rem;
    padding: 0.4rem 0.6rem 0.4rem 2rem;
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
}

.example .admonition-title {
    font-weight: bold;
    font-size: medium;
    z-index: 1;
    display: block;
    width: 100%;
    color: #006D5B;
}

.example {
    background: #DFE9E7;
}

.solution-label  {
    color: #D64238;
    border-bottom: #D64238;
    font-weight: bolder;
    border-bottom: 1px dotted #000;
    text-decoration: none;
}

.btn-window-close {
    position: absolute;
    top: 5px;
    right: 5px;
    margin: 10x;
    background: none;
    border: none;
    font-weight: bolder;
}

.window-title {
    top: 0px;
    left: 0px;
    margin: 10px;
    position: absolute;
    display: contents;
    background: #6a737d;
}

.style-form {
  position: relative;
  width: 100%;
  height: 100%;
  /* height: 498px; */
  margin: 0 auto;
  padding: 1em;
  /* box-sizing: border-box; */
  /* background: #fff url(background.jpg); */

  /* we create our grid */
  /* display: grid; */
  grid-gap: 20px;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 10em 1em 1em 1em;
}

.style-form-input  
{
    width: 80%;
    padding: 12px 20px;
}

.style-form-button { 
  background-color: #bdf5e0;
  font-weight: bold;
  border: none;
  color: rgb(20, 17, 17);
  padding: 10px 15px;
  min-width: 50px;
  text-decoration: none;
  margin: 10px 2px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
   appearance: none;
}

.foldable-block {
    /* background: lightyellow; */
    padding: 10px;
}

.foldabel-block-div {
    margin-bottom: 15px;
    margin-top: 15px;
}

.foldabel-block-div summary {
    cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
  background-color: #eef;
}


.wiki-image-full  {
    max-width: 100% !important;
    width: 100%  !important;
    height: auto;
}

/*--- Center image ---*/
.div-wiki-image {
    text-align: center;
}

/** Center document title heading */
.div-heading-h1 {
    text-align: center;
}


.login-form {
    border: 2px solid;
    padding: 20px;
    border-radius: 2rem;
}

fieldset {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    margin-bottom: 1rem;
}

fieldset label {
    font-weight: 700;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    color: #414449 !important;
}

fieldset input[type="checkbox"] {
    padding: 0;
    accent-color: var(--primary-button-background-color);
}

fieldset select {
    margin-top: 1.5rem;
    background-color: var(--form-background-color);
    border-radius 0.25rem;
    width: 100%;
    border: 0.5px var(--form-border-color) solid;
    height: 3.0rem;
    padding: 15px;
}

/* fieldset input[type="submit"] */
.primary-button {
    background: var(--primary-button-background-color);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 5px;
    border: 0px;
    height: 2rem;
    min-width: 10rem;
    margin-bottom: 1rem;
    text-align: center;
}


input:focus, textarea:focus, select:focus {
    border: 1px solid blue;

}

fieldset input[type="text"], input[type="textarea"], input[type="password"] {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    width: 90%;
    background-color: var(--form-background-color) !important;
    font-weight: 500 !important;
}


fieldset textarea {
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    width: 95% !important;
    background-color: var(--form-background-color) !important;
    height: 160px;
    resize: none;

}

input[type="search"] {
    background-image: var(--icon-search);
    background-repeat: no-repeat;
    padding-inline-start: 1.75rem;
    height: 2.2rem;
    border-radius: 20px;
}

table {
    /* background-color: #fffebc; */
    margin-bottom: 20px;
}


main :where(table) {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  text-indent: 0;
}

main td, th {
    padding: 0.5rem;
    border-bottom: 0.1875rem solid rgb(231, 234, 239.5);
    text-align: start;
    color: #373c44;
}

main thead th {
  font-weight: 600;
  border-width: 0.1875rem;
  background-color: #fbfafa;
}

.insert-link-form input {
    width: 100%;
}




/** For desktop systems */
@media (min-width: 815px)
{

    a.link-edit {
        /** Align Button to the right **/
        position: absolute;
        right: 50px; 
    }


    .wiki-image, .external-image {
        max-width: 50%;
    }

    img.wiki-image {
        max-width: 60%;
    }

    .highlight {
        margin-bottom: -50px !important;
    }

    .main-shift 
    {
        left: 250px;
    }

   .main-visiblity {
        left: 0px; 
    }

    .content {
        font-size: 12pt;
        padding-left: 50px;
        padding-right: 20px;
    }

    .sidebar {
        max-width: 250px;
    }

    :root{
        --screen-type: desktop;
    }


    .popup-window {
        max-height: 80% !important; 
        height: 30%;
        /* max-width: 25%; */
        top: 10px;
        left: 20px;
        font-size: 1rem;
    }



}

/** For mobile devices with small screen */
@media (max-width: 810px)
{

    .sidebar-toggle-button {
        font-size: 1.5rem !important;
    }


    /*    
    .content {
        font-size: 14px !important;
    }
    */

    a.link-edit {
        /** Align Button to the right **/
        position: absolute;
        right: 10px; 
    }

    .table {
        font-size: 8pt;
    }

   .highlight {
        margin-bottom: -30px !important;
    }

    .sidebar {
        max-width: min(70%, 300px);
        z-index: 2;
    }

    .sidebar-visibility 
    {
        display: None;
    }


    .main-shift {
        left: 0; 
    }

    .main-visiblity {
        left: min(70%, 300px);
    }


    .content {
        font-size: 1rem;
        padding-left: 10px;
        padding-right: 10px;
    }

   :root{
        --screen-type: mobile;
    }

    .sidebar-toggle-button {
        height: 50px;
        padding: 0 5px;
        line-height: 50px;
        font-size: 1.0rem;
        color: cadetblue;
        text-decoration: none;
        cursor: pointer;
    }

    img.admonition-icon {
        max-width: 12px;
        margin-top: 0px !important;
        padding: 0px !important;
    }

    .admonition-title {
        /* margin: -6px -30px !important; */
        margin-top: 0px !important;
    }

    img.inline-math {
        height: 12px;
        max-height: 12px;
    }

    img.math {
        transform: scale(0.8); 
        margin-left: 0px;
        /* padding-bottom: 10px;  */
        margin-top: 5px !important;
        /* margin: -20px !important; */

        /** Debug */
        /* background-color: gray; */
    }

    .popup-window {
        max-height: 80% !important;
        max-width: 90% !important;
        /* top: 10px !important; */
        left: 10px !important;
        margin: 0px;
        padding: 0px;
    }

    /**
    .popup-window {
        max-height: 50% !important;
        max-width: 80% !important;
        top: 10px !important;
        left: 20px !important;
    }

    .popup-window label {
        padding: 5px;
    }
    */

}

.main-left 
{
    left: 0px !important;
}


pre {
    background-color: var(--code-block-background-color);
    padding: 5px;
    margin-top: 8pt     !important;
    margin-bottom: 10px  !important;
    font-family: var(--font-family-code) !important;
    font-size:  var(--font-size-code);
    line-height: initial;
    overflow-x: auto !important;
    overflow-y: auto !important;
    padding-bottom: 15px;
    /** max-height: 400px;  */  /** TODO @TODO  Enable this property later. */
}

code {
    font-family: var(--font-family-code) !important;
    font-size: var(--font-size-code);
}

.highlight {
    background-color: lightyellow;
    font-family: var(--font-family-code);
    /* overflow-x: auto; */
    /* overflow-y: auto;  */
}

.source-code {
    background-color: var(--code-block-background-color);
    display: block;
    font-family:  var(--font-family-code);
    overflow-x: auto;
    overflow-y: auto;
}

.div-sort {
    display: block;
    margin-top: 20px;
}

.div-sort-content {
    display: block;
    margin-top: 10px;
    margin-left: 20px;
}


/** ------- Flashcard Style ------**/

.div-flashcard {
  background-color: lightblue;
  border: 10px;
  padding: 0.5rem;
  border-radius: 10px;
}

.div-flashcard label {
  margin-left: 10px;
}

.card-entry {
  background-color: #e4f1f9;
  border: 20px;
  border-radius: 15px;
  padding: 10px;
  font-size: 1.025rem;
  font-weight: 550;
}

.div-flashcard-button-panel {
    margin-bottom: 15px;
}

.div-flashcard-button-panel button  {
    margin-left: 15px;
}

.flashcard-title {
   justify-content: center;
   align-items: center;
   display: flex;
   font-size: 1.2rem;
}

.hidden {
    display: none;
}

/** Syntax Highlight Style for Pyhton's Pygment 
 *
 */
.highlight .hll { background-color: #ffffcc }
.highlight  { background: #f8f8f8; }
.highlight .c { color: #6a737d } /* Comment */
.highlight .err {  } /* Error */
.highlight .k { color: #d73a49 } /* Keyword */
.highlight .o { } /* Operator */
.highlight .ch { color: #6a737d } /* Comment.Hashbang */
.highlight .cm { color: #6a737d } /* Comment.Multiline */
.highlight .cp { color: #d73a49 } /* Comment.Preproc */
.highlight .cpf { color: #032f62 } /* Comment.PreprocFile */
.highlight .c1 { color: #6a737d } /* Comment.Single */
.highlight .cs { color: #6a737d } /* Comment.Special */
.highlight .gd { color: #b31d28; background-color: #ffeef0 } /* Generic.Deleted */
.highlight .ge {  } /* Generic.Emph */
.highlight .gr {  } /* Generic.Error */
.highlight .gh { color: #005cc5 } /* Generic.Heading */
.highlight .gi { color: #22863a; background-color: #f0fff4 } /* Generic.Inserted */
.highlight .go {  } /* Generic.Output */
.highlight .gp {  } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #6f42c1; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #005cc5 } /* Keyword.Constant */
.highlight .kd { color: #d73a49 } /* Keyword.Declaration */
.highlight .kn { color: #d73a49 } /* Keyword.Namespace */
.highlight .kp { color: #d73a49 } /* Keyword.Pseudo */
.highlight .kr { color: #d73a49 } /* Keyword.Reserved */
.highlight .kt { color: #d73a49 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #032f62 } /* Literal.String */
.highlight .na { } /* Name.Attribute */
.highlight .nb { color: #005cc5 } /* Name.Builtin */
.highlight .nc { color: #6f42c1 } /* Name.Class */
.highlight .no { color: #005cc5 } /* Name.Constant */
.highlight .nd { color: #6f42c1 } /* Name.Decorator */
.highlight .ni { color: #005cc5 } /* Name.Entity */
.highlight .ne { color: #005cc5 } /* Name.Exception */
.highlight .nf { color: #6f42c1 } /* Name.Function */
.highlight .nl { color: #005cc5 } /* Name.Label */
.highlight .nn { color: #6f42c1 } /* Name.Namespace */
.highlight .nt { color: #22863a } /* Name.Tag */
.highlight .nv { color: #24292e } /* Name.Variable */
.highlight .ow { color: #d73a49; } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #005cc5 } /* Literal.Number.Bin */
.highlight .mf { color: #005cc5 } /* Literal.Number.Float */
.highlight .mh { color: #005cc5 } /* Literal.Number.Hex */
.highlight .mi { color: #005cc5 } /* Literal.Number.Integer */
.highlight .mo { color: #005cc5 } /* Literal.Number.Oct */
.highlight .sa { color: #d73a49 } /* Literal.String.Affix */
.highlight .sb { color: #032f62 } /* Literal.String.Backtick */
.highlight .sc { color: #032f62 } /* Literal.String.Char */
.highlight .dl { color: #d73a49 } /* Literal.String.Delimiter */
.highlight .sd { color: #032f62 } /* Literal.String.Doc */
.highlight .s2 { color: #032f62 } /* Literal.String.Double */
.highlight .se { color: #032f62 } /* Literal.String.Escape */
.highlight .sh { color: #032f62 } /* Literal.String.Heredoc */
.highlight .si { color: #005cc5 } /* Literal.String.Interpol */
.highlight .sx { color: #032f62 } /* Literal.String.Other */
.highlight .sr { color: #032f62 } /* Literal.String.Regex */
.highlight .s1 { color: #032f62 } /* Literal.String.Single */
.highlight .ss { color: #005cc5 } /* Literal.String.Symbol */
.highlight .bp { color: #005cc5 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #005cc5 } /* Name.Function.Magic */
.highlight .vc { color: #24292e } /* Name.Variable.Class */
.highlight .vg { color: #24292e } /* Name.Variable.Global */
.highlight .vi { color: #24292e } /* Name.Variable.Instance */
.highlight .vm { color: #005cc5 } /* Name.Variable.Magic */
.highlight .il { color: #005cc5 } /* Literal.Number.Integer.Long */

 
   /** ---- CSS For Dropdown Menu -------------------- */



.show {
    display: block;
    visibility: visible;
}

.dropdown {
    display: inline;
    position: relative;
}

 .menu-dropdown-content {
/*     position: absolute; */
    background-color: #f1f1f1;

    overflow: auto;
    position: absolute;
    left: 0px;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.menu-dropdown-content a {
    /* padding: 12px 16px; */
    display: block;
}

/*
.menu-dropdown a:hover {
    background-color: #ddd;
}
*/

.menu-hidden {
    display: none;
    visibility: none;
}   
