/* Base styles and content styles */

@import 'variables.css';

:root {
    /* Browser default font-size is 16px, this way 1 rem = 10px */
    font-size: 62.5%;
}

html {
    font-family: "Roboto", "Open Sans", sans-serif;
    color: var(--fg);
    background-color: var(--bg);
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
}

body {
    margin: 0;
    font-size: 1.6rem;
    overflow-x: hidden;
}

code {
    font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important;
    font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
}

/* Don't change font size in headers. */
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
    font-size: unset;
}

.left { float: left; }
.right { float: right; }
.boring { opacity: 0.6; }
.hide-boring .boring { display: none; }
.hidden { display: none !important; }

h2, h3 { margin-top: 2.5em; }
h4, h5 { margin-top: 2em; }

.header + .header h3,
.header + .header h4,
.header + .header h5 {
    margin-top: 1em;
}

h1:target::before,
h2:target::before,
h3:target::before,
h4:target::before,
h5:target::before,
h6:target::before {
    display: inline-block;
    content: "»";
    margin-left: -30px;
    width: 30px;
}

/* This is broken on Safari as of version 14, but is fixed
   in Safari Technology Preview 117 which I think will be Safari 14.2.
   https://bugs.webkit.org/show_bug.cgi?id=218076
*/
:target {
    scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
}

.page {
    outline: 0;
    padding: 0 var(--page-padding);
    margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
}
.page-wrapper {
    box-sizing: border-box;
}
.js:not(.sidebar-resizing) .page-wrapper {
    transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
}

.content {
    overflow-y: auto;
    padding: 0 15px;
    padding-bottom: 50px;
}
.content main {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--content-max-width);
}
.content p { line-height: 1.45em; }
.content ol { line-height: 1.45em; }
.content ul { line-height: 1.45em; }
.content a { text-decoration: none; }
.content a:hover { text-decoration: none; }
.content img, .content video { max-width: 100%; }
.content .header:link,
.content .header:visited {
    color: var(--fg);
}
.content .header:link,
.content .header:visited:hover {
    text-decoration: none;
}

table {
    margin: 0 auto;
    border-collapse: collapse;
}
table td {
    padding: 3px 20px;
    border: 1px var(--table-border-color) solid;
}
table thead {
    background: var(--table-header-bg);
}
table thead td {
    font-weight: 700;
    border: none;
}
table thead th {
    padding: 3px 20px;
}
table thead tr {
    border: 1px var(--table-header-bg) solid;
}
/* Alternate background colors for rows */
table tbody tr:nth-child(2n) {
    background: var(--table-alternate-bg);
}

.title
{
    display:flex;
    padding: auto;
}

.title img {
    max-height: inherit;
    height: 75px;
    width: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.page-metadata {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.page-metadata h4{
    color: var(--icons);
    font-style: italic;
}

/* 
.tableContainer{
    width: 50%; This will center the columns on mobile devices when the side bar is collapsed.
    margin: auto;
}
*/

.navTable {
    display: grid;
    width: fit-content;
    align-items: stretch;
    grid-template-columns: repeat( var(--column-count), 1fr);
    gap: 1em;
    
    text-decoration: none; /*turning link highlighting off*/
    
    font-size: 2rem;
    color: var(--fg);
    
    position: relative;
    
    vertical-align: middle;
    text-align: center;
}

.pageContainer {
    transition: transform 1s ease; /* Animation */
    max-width: 30em;
    overflow: hidden;
    width: var(--column-width);
    height: auto;
    border-spacing: 20px;
    background-color: var(--bg-alt);
    border: 1px solid var(--theme-popup-bg);
    box-shadow: 0px 0px 2px #000000;
    padding-bottom: 0%;
    -moz-box-shadow: 0px 0px 2px #000000;
    -webkit-box-shadow: 0px 0px 2px #000000;
}

/*
*/

.pageContainer:hover img {
    transform: scale(1.25);
    cursor: pointer;
}

.pageContainer:hover {
    box-shadow: 0px 0px 8px black;
    -moz-box-shadow: 0px 0px 8px black;
    -webkit-box-shadow: 0px 0px 8px black;
}

.imageContainer {
    display: block;
    position:relative;
    overflow: hidden;
    width: fit-content;
    height: auto;
    max-width: 30rem;
    max-height: 33.4%;
    -webkit-transition: all 1s ease;
    -moz-transition: all 1s ease;
    -o-transition: all 1s ease;
    -ms-transition: all 1s ease;
    transition: all 1s ease;
    top: 0;
    left: 0;
}

.imageContainer img {
    aspect-ratio: 9/8;
    position: relative;
    align-self: center;
    display: block;
    width: auto;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}
/*

@media screen and (max-width: 900px) { /*unlock aspect ratio on smaller devices so that the images would cover the entirety of the element
    .imageContainer img {
    }
}

@media screen and (max-width: 725px) { /*unlock aspect ratio on smaller devices so that the images would cover the entirety of the element*
    .imageContainer img {
    }    
}
*/

.content {
    padding-bottom: 0.5em;
}

.subject {
    margin-top: 1em;
}

.description{
    margin-top: 0.5em;
    margin-bottom: 0em;
    text-decoration: none;
    color: rgb(255, 200, 99);
    color: var(--fg);
    font-size: medium;
    text-align: justify left;
}

blockquote {
    margin: 20px 0;
    padding: 0 20px;
    color: var(--fg);
    background-color: var(--quote-bg);
    border-top: .1em solid var(--quote-border);
    border-bottom: .1em solid var(--quote-border);
}


:not(.footnote-definition) + .footnote-definition,
.footnote-definition + :not(.footnote-definition) {
    margin-top: 2em;
}
.footnote-definition {
    font-size: 0.9em;
    margin: 0.5em 0;
}
.footnote-definition p {
    display: inline;
}

.tooltiptext {
    position: absolute;
    visibility: hidden;
    color: #fff;
    background-color: #333;
    transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
    left: -8px; /* Half of the width of the icon */
    top: -35px;
    font-size: 0.8em;
    text-align: center;
    border-radius: 6px;
    padding: 5px 8px;
    margin: 5px;
    z-index: 1000;
}
.tooltipped .tooltiptext {
    visibility: visible;
}

.chapter li.part-title {
    color: var(--sidebar-fg);
    margin: 5px 0px;
    font-weight: bold;
}

.result-no-output {
    font-style: italic;
}
