/*
 * Copyright (C) 2020 Andrew Gegg
 *
 *	This file is part of the Garden Notebook application
 *
 * The Garden Notebook application is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/gpl.html>.
 */

/*
I am grateful to Liam Flavelle for much of this functionality:
https://jsfiddle.net/LiamFlavelle/czpjdfr4/
*/

/*
@font-face {
    font-family: "Roboto Light";
    src: url("Roboto-Light.ttf");
}
@font-face {
    font-family: "Roboto Medium";
    src: url("Roboto-Medium.ttf");
}
*/
@font-face {
    font-family: "Roboto";
    src: url("Roboto-Regular.ttf");
}
@font-face {
    font-family: "Roboto";
    src: url("Roboto-Bold.ttf");
    font-weight: bold;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Roboto;
}

body {
    overflow-y: hidden;
    overflow-x: hidden;
    max-width: 70em;
    margin: 0 auto;
    padding: 5px 5px 5px 5px;
    background-color: #f0fff8;
    background-image: linear-gradient(aliceblue, #f0fff8);
    background-repeat: no-repeat;    /* fills bottom of canvas with background-color */
}

/* this should make the header, when scrolled to (from the nav menu), display below the top of the window */
[id] {
  scroll-margin-top: 2ex;
}

/* number nested sections (from https://www.joshwcomeau.com/css/styling-ordered-lists-with-css-counters/) */

ol {
    counter-reset: gnhct;
    list-style: none;
}
ol > li {
    counter-increment: gnhct;
}
ol > li:before {
    content: counters(gnhct, '.') '  ';
}

.text-area ol > li:before {
    font-weight: bold;
    font-size: 1.17em;
}

li > p {
    margin-top: 0;
}
ol > li > h2, h3 {
    display: inline;
}


.base-container {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-y: hidden;
    align-items: stretch;
}

.banner {
    flex: 0 0 50px;
    color: black;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-bottom-color: lightgrey;
}

header h1 {
    font-size: 3em; text-shadow: 2px 2px 4px rgba(0,0,0,.7);
    text-align: center;
}

.main-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.main-body .body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
}

.main-body .body .nav-area {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    margin-right: 5px;
    /* border: 1px solid white;*/
    border-right-style: solid;
    border-right-width: 1px;
    border-right-color:lightgrey;
    padding-right: 2px;
}
.main-body .body .nav-area .content,
.main-body .body .text-area .content {
    flex: 1 1 auto;
    overflow-y: auto;
    height: 100px;
    /*scrollbar-gutter: always;*/
}

.main-body .body .text-area {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    width: 50%; /* this makes text wrap round */
    padding-right: 5px;
}

.main-body .text-area .content > p::first-letter{
    font-size: calc(400% + 0.25vw);
    font-weight: bold;
    float: left;
    line-height: 0.5;
    margin-top: .2rem;
    /*margin-left: -.5rem;*/
    @supports (initial-letter: 7) or (-webkit-initial-letter: 7) {
        -webkit-initial-letter: 7;
        initial-letter: 7;
        color: hsl(41, 68%, 51%);

        margin-left: unset;
    }
}