/*
 * 
 * COMMON STYLES
 * 
 */


:root {
    --BORDERS: red 0px dotted;
    --OUTLINES: #0000ff40 0px dotted;
    --color-header: #bbe2ff;
    --color-even-row: #def3ff;
    --color-odd-row: #cceaff;
}

html {
  box-sizing: border-box;
}

body {
    font-family: Roboto, Verdana, Geneva, sans-serif;
    padding: 5px 10px;
    margin: 5px 10px;
    /*max-height: 100%;
    overflow-y: hidden;*/
    
    border: var(--BORDERS);
    border-color: green;
    outline: var(--OUTLINES);
}

div {
    border: var(--BORDERS);
    outline: var(--OUTLINES);
}

h3 {
    font-size: smaller;
    padding-bottom: 0;
    margin-bottom: 0;
}

p {
    padding-top: 0;
    margin-top: 0;
}

/*
 * 
 * UTILITY CLASSES
 * 
 */

.debug {
    font-size: smaller;
    color: grey;
    padding: 0;
    margin: 0;
}

.form-errors {
    color: red;
    font-weight: bold;
}

.alert {
    color: orange;
}

.sticky {
    position: sticky;
    top: 0px;
    background-color: white;
    width: 100%;
}

.align-left {
    text-align: left;
}

.align-right {
    text-align: right;
}

/* 
 * 
 * MAIN STRUCTURE
 * 
 */

body {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
}

#page-header {
    position: relative;
    /*position: fixed;*/
    top: 0;
    left: 0;
    max-width: 100%;
    
    background-color: var(--color-header);
    
    text-align: center;
    margin: 0px 0px;
    padding: 5px 5px;
    
    display: grid;
    grid-template-columns: 20% 1fr 20%;
    /*grid-gap: 0.3em 0.6em;*/
    align-items: center;
    
    border: var(--BORDERS);
    border-color: red;
    outline: var(--OUTLINES);
}

#body-container {
    position: relative;
    flex-grow: 1;
    overflow: auto;
    top: 0;
    left: 0;
    height: 100%;
}

#page-footer {
    position: relative;
    
    background-color: var(--color-header);
}

.title {
    font-size: larger;
    font-weight: bold;
    text-align: center;
}

/*
 * 
 * CONTENT ELEMENTS
 * 
 */

.notes {
    white-space: pre-wrap;
}

table.alternating tr:nth-child(even) {
    background-color: var(--color-even-row);
}

table.alternating tr:nth-child(odd) {
    background-color: var(--color-odd-row);
}

table.non-scrolling-header thead tr {
    position: sticky; 
    top: 1.3em; 
}

/* TODO require alternating class */
.comicform > :nth-child(4n+1),
.comicform > :nth-child(4n+2),
.comicformwide > :nth-child(4n+1),
.comicformwide > :nth-child(4n+2) {
    background-color: var(--color-even-row);
}
.comicform > :nth-child(4n+3),
.comicform > :nth-child(4n),
.comicformwide > :nth-child(4n+3),
.comicformwide > :nth-child(4n) {
    background-color: var(--color-odd-row);
}

.comicform p, .comicformwide p, 
.comicform label, .comicformwide label, 
.comicform input, .comicformwide input  {
    padding: 1px;
    margin: 1px;
}

.comicform {
    display: grid;
    grid-template-columns: 20% 1fr;
    
    /*background-color: #bbe2ff;*/
}

.comicformwide {
    display: grid;
    grid-template-columns: 30% 1fr;
    
    /*background-color: #bbe2ff;*/
}

form.comicform textarea {
    min-height: 50px;
}
form.comicform label {
    font-weight: bold;
}

form.filterform {
    display: grid;
    grid-template-columns: 15% 1fr;
}

form.filterform textarea {
    min-height: 150px;
}

form.filterform input, form.filterform textarea {
    width: 100%;
}

form.comicform ul {
    list-style-type: none;
}

