/*
  Site-wide css.
*/

html { overflow-y: scroll; }

:root {
    /*
      I have commented-out all color settings, deferring to pico.
      But I'm leaving the commented colors here, just in case!
     */
    --std_hue: 45;
    --contrast_hue: 15;
    --p_link_color: hsl(var(--std_hue), 0%, 13%);
    --link_color: hsl(var(--contrast_hue), 80%, 25%);
    --font_color: hsl(var(--std_hue), 0%, 13%);
}

body {
    font-family: 'Roboto', sans-serif;
    /* This will likely do nothing, becauuse of more specific selectors */
    /* color: var(--font_color); */
    /* background-color: hsl(var(--std_hue), 30%, 97%); */
    height: 100%;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px 20px;
}

nav ul {
    display: flex;
    list-style: none;
}

.checkbtn {
    cursor: pointer;
    display: none;
}

#check {
    display: none;
}

@media (max-width: 720px) {
    nav {
	/* background-color: lightgreen; */
	justify-content: flex-start;
    }
 }

/* Links */
/* Links not in a paragraph are colored differenty. */
/* a:link, a:visited, a:hover { */
/*     color: var(--link_color); */
/*     text-decoration: none; */
/* } */

/* Links in a paragraph are merely underlined. */
p a:link, p a:visited, p a:hover {
    /* color: var(--p_link_color); */
    text-decoration: underline;
    /* text-decoration-color: hsl(var(--std_hue), 50%, 55%); */
    text-decoration-skip: ink;
}

/* Forms */
input {
    /* background-color: hsl(var(--std_hue), 40%, 95%); */
}

select {
    /* background-color: hsl(var(--std_hue), 40%, 90%); */
}

/* Miscellaneous items */

figcaption, .caption {
    font-style: italic;
    font-size: smaller;
}

dt {
    font-weight: bold;
    margin-bottom: -0.25em;
    padding-top: 0.25em;
}


pre {
    /* background-color: hsl(var(--std_hue), 100%, 95%); */
    border: 1px solid grey;
    padding-left: 5px;
}

.footnotes {
    font-size: smaller;
}

.title {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1.5em;
    /* color: hsl(var(--std_hue), 100%, 25%); */
    margin-bottom: 0;
}

.author {
    font-size: 1.0em;
}
.date {
    font-size: 0.6em;
    /* color: hsl(var(--std_hue), 20%, 60%); */
    font-style: italic;
}

.colophon {
    font-size: 0.7em;;
    line-height: 0.8;
}

/*
For basic multi-column output. apply this class to a div, then direct children
(for example other divs) will be laid out columnwise.
*/
.multi-column {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

/*
To make an an unordered list not have any list markers (asterisk, for example),
assign the unadorned-list-container class to its parent.
This is useful for index pages or glossaries, for example.
*/
.unadorned-list-container ul, ul.unadorned-list-container {
    list-style-type: none;
}

.unadorned-list-container ul li, ul.unadorned-list-container li {
    list-style: none;
}

/* Indent the footer a little ways */
footer {
    padding-left: 2em;
}

/* Make the footer text smaller and with less vertical white space. */
footer p, footer p a {
    font-size: smaller;
    line-height: 0.8;
    /* color: hsl(var(--std_hue), 20%, 50%); */
}

/* Navigation links should be different color than embedded links */
/* div#right-nav a:link, div#right-nav a:visited { */
/*     /\* color: hsl(var(--std_hue), 40%, 15%); *\/ */
/* } */

/* Special rendering for brief-notes pages */
.short-piece-head {
    font-size: 90%;
    /* color: hsl(var(--std_hue), 80%, 10%); */
    /* background-color: hsl(var(--std_hue), 50%, 40%); */
    /* background: linear-gradient(to bottom, */
    /* 				hsla(30, 50%, 40%, 0.9), */
    /* 				hsla(30, 30%, 97%, 0)); */
    padding: 10px;
    padding-bottom: 30px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.short-piece-date {
    font-style: italic;
}

h2#metadata, h3#image, h3#metadata-info {
    display: none;
}

/* TODO: add smart divs to pandoc-generated headers so that the following
   can be made to work.
h3#metadata-info ul {
    list-style-type: none;
}
*/

/* For the favorites book covers on the reviews/index page */
.favorites-book-cover {
    border: 1px solid black;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* For the recent movies watched page */
.movie-attrs-container ul {
    margin-top: 0px;
    margin-left: 0px;
    padding-left: 2px;
}

.movie-attrs-container {
    margin-left: 1px;
    font-size: smaller;
}

/* For the all_movies index page */
#movie-detail-popup {
    display: none;
    z-index: 10; /* on top, I hope */
    position: fixed;
    top: 50px;
    left: 10px;
    width: 300px;
    border: 1px solid black;
    padding: 3px;
    box-shadow: 10px 5px 5px grey;
    border-radius: 10px;
    /* background-color: hsl(var(--std_hue), 80%, 95%); */
}

.movie-title {
    font-style: bold;
    font-size: larger;
}

.movie-detail {
    line-height: 1.1;
    font-size: smaller;
}

@page
{
    size: auto;
    margin: 0.75in 0.75in 1.0in 0.5in;
}

/* Turn off navigation and metadata, and adjust fonts for printing */
@media print {
    body {
	font-size: 12pt;
	line-height: 1.2;
	font-family: serif;
	background-color: white;
    }
    p {
	text-align: left;
    }
    #metadata { display: none; }
    #section-index-link-div { display: none; }
    #right-nav { display: none; }
    div#header { display: none; }
    div#site-header { display: none; }
    #title {
	font-size: larger;
	font-style: bold;
    }
}

/* Styling for sortable/paged tables */

/* Ensures that the sortable/pager controls are on one line. */
.pagedisplay, .pagesize, .gotoPage {
    display: inline;
}

/* Wrap tables in <div class="scroll-wrapper>...</div> so just the table scrolls on overflow */
.scroll-wrapper {
    overflow: auto;
}

/*
The following should be repeated for dark mode (twice!), with different color, maybe.
See https://picocss.com/docs/css-variables

It is necessary to override the 'stripped' (sic) background color to make
the sticky first column work correctly. The pico default value has non-100%
opacity, so the scrolled columns show under the sticky column.
*/
[data-theme="light"],
:root:not([data-theme="dark"]) {
    --pico-table-row-stripped-background-color:rgb(240,240,240);
}

/* Sticky first table column. */
tr>th:first-child,tr>td:first-child {
    position: sticky;
    left: 0;
}
