/* ----------base---------- */
html,
body {
    height: 100%;
}

body {
    padding-top: 55px;
    display: flex;
    text-align: center;
    flex-direction: column;
}

main {
    margin: auto;
    padding: 25px;
    flex: 1 0 auto;
    max-width: 750px;
}


p,
ul,
ol,
li {
    font-size: 16px;
}

h2 {
    padding-top: 20px;
    padding-bottom: 10px;
}

h3 {
    padding-top: 10px;
}

h4 {
    padding-top: 5px;
}

blockquote {
    font-style: italic;
}


#post-content-body video {
    padding: 15px;
}

#post-content-body img {
    text-align: center;
    padding: 15px;
}

#post-content-body figure {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}


/* Tables main text */
table {
    margin-left: 5px;
    margin-top: 20px;
    margin-bottom: 20px;
}

td {
    vertical-align: bottom;
}

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

tr:nth-child(even) {
    background-color: #f2f2f2;
}

figcaption {
    font-size: 1.2em;
    margin-top: 0.5em;
    margin-bottom: 1.5em;
}

.row {
    display: flex !important;
    flex-flow: row wrap;
}

/* ----------links---------- */

a:link,
a:visited {
    color: var(--accent);
}

a.icon:hover {
    text-decoration: none;
}

a:hover {
    color: var(--accent) !important;
}

#post-content-body a:link,
#post-content-body a:visited {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 0.2rem;
    text-underline-offset: 0.2rem;
    color: #212121;
}

#badges a:link,
#badges a:visited,
#badges a:hover {
    text-decoration: none;
}

#badges {
    margin-bottom: 2rem;
}


/* ----------navigation bar icons---------- */

.navbar-icon {
    font-size: 120%;
    display: inline-block !important;
}

/*coloured borders at top and bottom of the page*/

.navbar.navbar-default {
    border-top: var(--border-width) solid var(--accent);
}


/* ----------footer---------- */

footer {
    border-bottom: var(--border-width) solid var(--accent);
}


.copyright {
    margin: 15px 0;
}


/* ----------home page---------- */

.intro {
    margin: 25vh 0;
}

.intro>h1 {
    color: #212121;
    font-size: 12vh;
}

.intro>h2 {
    color: #757575;
    font-size: 3vmin;
}



/* ----------paginator and item list--------- */

.pages {
    padding: 15px 0;
}

.pages-icon {
    padding: 0 15px;
}


.item {
    padding: 10px 0;
}

.item-tag {
    /* background-color: var(--accent); */
    background-color: #3fb3b288;
}

.item-tag2 {
    background-color: #ffdd5566;
    color: #3fb3b2;
    font-weight: 700;
}

.item {
    text-align: left;
}

.item h1 {
    font-size: 1.8em;
    padding: 0rem 0rem 0.25rem 0rem;
    margin: 0px;
}

.item-bottom {
    text-align: center;
}

.item-bottom h1 {
    font-size: 1.8em;
}


/* ----------Code---------- */

pre {
    max-width: 92vw;
}

code {
    color: #3fb3b2;
    background-color: #f7f7f7;
    font-family: "Fira Code";
    font-size: 15px;
}

pre > code {
    max-width: inherit;
    white-space: inherit;
    overflow-x: auto;
}

.highlight-wrapper {
    border: 1px solid #3fb3b2;
    margin-bottom: 1rem;
    border-radius: 4px;
    max-width: 92vw;
}


/* ----------post sections---------- */

.tricksortips {
    border-radius: 20px;
    border: 2px solid #3fb3b2;
    padding: 1em;
    margin-bottom: 3rem;
}


.tldr {
    text-align: left;
    background-color: #eff8f8;
    font-size: 1.2em;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.references {
    margin-bottom: 4rem;
}


#post-content-body {
    margin-top: 4rem;
}


/* ----------details---------- */

details {
    color: #3fb3b2;
}

details summary::after {
    content: ">";
    font-size: 1.2em;
}

details[open] summary::after {
    content: '\2304';
    font-size: 1.2em;
}

/* https://stackoverflow.com/questions/255170/markdown-and-image-alignment */

img[alt$=">"] {
    float: right;
    margin-top: 12px;
    margin-bottom: 12px;
}

img[alt$="<"] {
    float: left;
    margin-top: 12px;
    margin-bottom: 12px;
}

img[alt$="><"] {
    display: block;
    max-width: 100%;
    height: auto;
    margin: auto;
    float: none !important;
    margin-top: 12px;
    margin-bottom: 12px;
}

/* see for the one below http://www.ebadf.net/2016/10/19/centering-images-in-hugo/ */
img[src$='#center'] {
    display: block;
    margin: 0.1rem auto;
}

.caption {
    display: block;
    max-width: 92%;
    height: auto;
    margin: auto;
    float: none !important;
    font-size: 1.15em;
    margin-bottom: 20px;
    text-align: center;
}


/* ----------toc---------- */

#TableOfContents ul,
#TableOfContents li {
    font-size: 2.5rem;
    padding: 0px;
}

#TableOfContents ul {
    list-style-type: none;
}

.toc {
    position: -webkit-sticky;
    position: sticky;
    top: 10rem;
    padding-left: 2rem;
    padding-right: 1rem;
}


.toc a:link,
.toc a:visited {
    text-decoration: none;
    color: var(--accent);
}

.toc a:hover {
    text-decoration: underline;
    color: var(--accent);
    text-decoration-thickness: 0.3rem;
}


/* ----------copy paste button---------- */
/* adapated from https://aaronluna.dev/blog/add-copy-button-to-code-blocks-hugo-chroma/ */

.copy-code-button {
    position: relative;
    display: block;
    float: right;
    z-index: 2;
    right: 0;
    top: 0;
    font-size: 1.8rem;
    font-weight: 700;
    width: 3.6rem;
    color: #3fb3b2;
    background-color: rgba(0, 0, 0, 0);
    border: 0px;
    white-space: nowrap;
    padding: 0.25rem;
    margin: 0rem;
    cursor: pointer;
    opacity: 0.6;
}

.copy-code-button:hover,
.copy-code-button:focus,
.copy-code-button:active,
.copy-code-button:active:hover {
    color: #ccc;
    background-color: #3fb3b2;
    border: 2px solid #3fb3b2;
    border-top-right-radius: 2px;
}

.copyable-text-area {
    position: absolute;
    height: 0;
    z-index: -1;
    opacity: .01;
}