@import url('normalize.css');
@import url('fonts/NotoSerif.css');

body
{
  background: white;
  color: black;
  max-width: 1600px;
  margin: auto;
  font-family: NotoSerif, 'Times New Roman', serif;
}

h1, h2, h3, h4, h5, h6
{
  margin: 5px 0 5px;
  text-align: center;
}

h1 { font-size: 150% }
h2 { font-size: 140% }
h3 { font-size: 130% }
h4 { font-size: 120%; }
h5 { font-size: 110%; }
h6 { font-size: 100%; }

  


/*
 * Overall page layout
 *   +-----------------body-----------------------+
 *   | +-----------------header-----------------+ |
 *   | |      +------------nav----------+       | |
 *   | |      |                         |       | |
 *   | |      +-------------------------+       | |
 *   | +----------------------------------------+ |
 *   | +------------------main------------------+ |
 *   | |                                        | |
 *   | +----------------------------------------+ |
 *   +--------------------------------------------+
 */


/* contains nav information, full width, colour background or images */
header
{
  background: #606;
  font-weight: bold;
  color: white;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header div.banner small
{
  display: block;
  font-size: 1rem;
}

@media (max-width: 500px)
{
  header div.banner small { display: none }
}

header div.banner
{
  flex-basis: 800px;
  flex-shrink: 1;
  flex-grow: 1;
  text-align: center;
  padding: 30px 0;
  font-size: clamp(100%, 4vw, 200%);
}

header div.leftcol, header div.rightcol
{
  flex-basis: 150px;
  flex-shrink: 1;
}

header div.leftcol img,
header div.rightcol img
{ 
  display: block; 
  width: 100% 
}

@media (max-width: 500px)
{
  header div.banner { padding: 10px 0 }
  header div.rightcol { display: none }
}


/* contains nav buttons or icon, set positioning */
nav
{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: auto;
  padding: 10px 5px;
  text-align: center;
  background: black;

}

/* under nav header, all page content between header and footer */
main
{
  width: calc(100% - 10px);
  padding: 5px;
  background: #f4f0f4;
  color: #303;
  min-height: 400px;
}

footer
{
  background: #606;
  color: white;
  padding: 5px;
  font-family: sans-serif;
  text-align: center;
}

/* buttons for wide screen menu */
nav a
{
  display: block;
  font-size: 100%;
  text-decoration: none;
  width: max-content;
  padding: 2px 1px;
  border-radius: 5px;
  background: none;
  color: #eef;
  text-align: center;
  font-family: sans-serif;
}

nav a:hover
{
  background: #545;
  color: white;
}

nav a.selflink, nav a.selflink:hover
{
  color: white;
  text-decoration: underline;
}

/* hide small menu and icon for wide screen */
nav.small { display: none }
div.menuicon { display: none }
div.menuiconcontainer { display: none }

/* Nav menu changes for small screen */

@media screen and ( max-width: 500px )
{
  nav { display: none }
  /* contains site name/logo and hamburger icon */
  nav.small 
  { 
    display: block; 
    text-align: center;
    /* padding: 10px; */
    overflow: auto;
    width: auto;
    /* min-height: 30px; */
  }
  /* styles for dropdown menu */
  nav a 
  { 
    display: block;
    margin: auto;
    margin: 10px 0;
    width: 100%;
  }

  /* menu icon ("hamburger") and 'menu' text if shown */
  div.menuiconcontainer, div.menuiconcontainer a
  { 
    background: none;
    display: block; 
    float: right;
    margin: 0;
    color: white;
    text-decoration: none;
    font-size: 90%;
  }


  div.menuicon
  {
    background: none;
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    height: 20px;
  }

  div.menuicon div.menuline
  {
    display: block;
    margin: 3px;
    height: 3px;
    width: 18px;
    background: white;
  }
}

/* captioned images */
div.caption 
{ 
  font-family: 'Times New Roman', serif; 
  font-style: italic; 
  text-align: center;
  color: black;
  background: white;
}


/*********** reqvars debug info *******/
table.reqvars { margin: 5px 0 }
table.reqvars tr td
{
  font-size: 90%;
  font-family: monospace;
  vertical-align: top;
  background: white;
  color: black;
  border: 1px solid #ccc;
  padding: 2px;
}


/*********** message and error boxes ***********/
div.errorbox, div.msgbox
{
  width: max-content;
  max-width: 90%;
  padding: 10px;
  background: white;
}

div.errorbox
{
  border: 2px solid #900;
  color: #900;
}
div.msgbox
{
  border: 2px solid #090;
  color: #090;
}

/***************** navigation and action buttons **********/

/*
 * actionbutton and navbutton are implemented as a form
 * default form is display:block with no margins 
 */

/* vertical space between buttons */
form.spacedbutton
{
  margin-top: 10px;
  margin-bottom: 10px;
}

/* inline with 10px gap */
form.inlinebutton 
{ 
  display: inline-block; 
  width: max-content; 
  margin-right: 20px;
}

form.delbutton input[type=submit]
{ background: linear-gradient(white, #f99); }

form.greenbutton input[type=submit]
{ background: linear-gradient(white, lightgreen) }

/* adapt the examples above for other coloured buttons */


/**** text boxes ****/

div.text
{
  background: white;
  padding: 20px;
  width: auto;
  max-width: 800px;
  margin: auto;
  line-height: 1.6;
  overflow: auto;
}

div.text.wide
{
  max-width: 1400px;
}

@media (max-width: 500px)
{
  div.text
  {
    padding: 10px;
  }
}


div.panel
{
  background: white;
  max-width: 600px;
  padding: 10px;
  margin: 10px;
  border-radius: 5px;
}

div.panel.centred
{
  margin: 10px auto;
}

blockquote
{
  background: #efe;
  padding: 10px;
  margin: 0 20px;
}

/********** DataRec class and derivatives: form components ********/

/* forms */
form.datarec_form 
{ 
  background: #e0d0e0; 
  margin: 5px; 
  padding: 5px; 
  max-width: 1000px;
}
div.form_input_pair 
{ 
  display: grid;
  grid-template-columns: 1fr 8fr;
  background: #e0d0e0;
  margin: 10px 0;
}

form.datarec_form.mail div.form_input_pair 
{ 
  grid-template-columns: 80px 1fr;
}

div.form_input_pair div.input input[type=text],
div.form_input_pair div.input textarea { width: 99% }

div.form_input_pair div.info,
div.form_input_pair div.error
{
  grid-column-start: 2;
  grid-column-end: 3;
}

@media (max-width: 500px)
{

  div.form_input_pair 
  { 
    grid-template-columns: 1fr;
  }
  
}

input.escode  {display: none}

/***** basic datarec form */
form.datarec_form { background: #cbc; margin: 5px; padding: 10px; }
div.form_input_pair { display: grid; grid-template-columns: 1fr 5fr;    
  background: #cbc; margin: 10px 0;}
div.form_input_pair div.input input[type=text],
div.form_input_pair div.input textarea { width: 99% }




/********************** Authenticator (login) forms ***************/

div.auth_form 
{ 
  width: 90%; 
  max-width: 500px;
  margin: 0 auto; 
  padding: 10px;
  background: #dcd;
} 
div.auth_form input { width: 90%}
div.auth_form input[type="submit"] 
{ 
  width: max-content;
  background: linear-gradient(white, lightgreen);
}
input.login_button
{
  margin: 10px 0 20px;
}
div.auth_form table tr td { padding: 0 2px }
div.auth_error { color: red; background: white; padding: 5px }
