@import url('normalize.css');

/* includes regular, bold and semibold in normal and italic styles */
@import url('fonts/OpenSans.css');



body
{
  background: white;
  color: black;
  width: min(100%, 1200px);
  margin: auto;
  font-family: 'Open Sans', sans-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%; }

@media (max-width: 500px)
{
  ul { padding-left: 20px } /* default is 40 */
}  

ul li { font-weight: 600; /* semi bold */ }

a:link, a:visited { font-weight: 600 }
a:hover { background: #ddf }

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


/* contains nav information, full width, colour background or images */
header
{
  display: flex;
  flex-wrap: wrap;
  background: #cdc;
  padding: 20px 10px 10px 10px;
}


header div.title
{
  width: min(400px, 100%);
  margin-left: 40px;
  font-size: 200%;
  color: #060;
}

@media (max-width: /* 1020px */ 500px )
{
  header { padding-top: 5px; padding-left: 5px }
}

@media (max-width: 500px)
{
  header { padding-bottom: 0 }
  header div.title 
  {
    margin-left: 5px; 
    font-size: 120% 
  }
}

header div.title img
{
  display: block;
  max-width: 100%;
}

/* contains nav buttons or icon, set positioning */
nav
{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: flex-end;
  margin: 0 0 0 auto;
  /* width: 600px; */
  width: max-content;
  min-width: 400px;
  padding: 5px;
}

/* under nav header, all page content between header and footer */
main
{
  padding: 5px;
  background: #f8f8f8;
  color: black;
}


/* buttons for wide screen menu */
nav a
{
  display: block;
  font-size: 100%;
  text-decoration: none;
  margin: 4px;
  width: max-content;
  max-width: 100%;
  height: max-content;
  padding: 2px;
  background: none;
  color: black;
  text-align: center;
}

nav a:hover
{
  background: #d4e4d4;
  color: #060;
}

nav a.selflink, nav a.selflink:hover
{
  color: #060;
  background: #ded;
}

@media (max-width: 1060px )
{
  nav a { font-size: 95% }
}

/* 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: 600px )
{
  nav { display: none }
  /* contains site name/logo and hamburger icon */
  nav.small 
  { 
    display: block; 
    text-align: center;
    padding: 0;
    min-width: 0;
    width: 100%;
    /* min-height: 20px; */
  }
  /* styles for dropdown menu */
  nav a 
  { 
    display: block;
    margin: 0 auto;
    width: 100%;
  }

  /* menu icon ("hamburger") and 'menu' text if shown */
  div.menuiconcontainer, div.menuiconcontainer a
  { 
    background: none;
    display: block; 
    color: black;
    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: black;
  }
}

/* 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: 90%;
  max-width: 500px;
  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.home_subtitle { text-align: center }

div.panel
{
  background: white;
  max-width: 700px;
  padding: 20px;
  margin: 20px 20px 40px;
  border-radius: 10px;
  line-height: 1.5;
  box-shadow: 5px 10px 5px #ccc;
  border-width: 5px;
  border-style: outset;
}

div.panel.wide
{
  max-width: 1000px;
}

@media (max-width: 500px)
{
  div.panel 
  { 
    padding: 5px; 
    border-width: 2px;
    font-size: 95%;
  }
}

div.panel h2 { font-size: 130%; text-align: left; margin-top: 10px }
div.panel h3 { font-size: 120%; text-align: left; margin-top: 10px }

div.panel img
{
  display: block;
  width: 100%;
  margin: 20px 0;
}

div.panel.centred
{
  margin-left: auto;
  margin-right: auto;
}

div.panel.yellow
{
  border-color: #cc3;
  background: #ffd;
}

div.panel.green
{
  border-color: #6c6;
  background: #efd;
}

div.panel.blue
{
  border-color: blue;
  background: #e8f0ff;
}

div.panel.purple
{
  border-color: purple;
  background: #fef;
}

.red { color: red }

div.doclist
{
  width: max-content;
  max-width: 100%;
  margin: 20px auto;
  line-height: 1.8;
}

div.doclist a { text-decoration: none }


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

div.formwrapper { background: #ccc; }
form.datarec_form { margin: 10px; padding: 10px; }
div.form_input_pair { margin: 5px; padding: 5px; background: #aaa;}
div.form_input_pair div.label 
{ 
  display: inline-block; 
  vertical-align: top;
  width: 20%;
}
div.form_input_pair div.input { display: inline-block; width: 75%; }
div.form_input_pair div.input input,
div.form_input_pair div.input textarea { max-width: 100% }
form.datarec_form div.form_input_pair div.info
{ 
  color: green;
  background: white;
  font-style: italic;
  text-align: center;
}
form.datarec_form div.form_input_pair div.error
{
  color: red;
  background: white;
  font-style: italic;
  text-align: center;
  border: 2px solid #fcc;
}

@media (max-width: 500px)
{
  div.form_input_pair div.label, div.form_input_pair div.input
  {
    display: block;
    width: 100%;
  }
}

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

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


/*************** simple login ********/


table.login
{
  margin: 10px 0;
  width: auto;
  background: #cdc;
}

table.login tr td
{
  padding: 10px;
}

table.login tr td input
{
  max-width: 180px;
}

table.login tr td input[type=submit]
{
  width: auto;
}

