/* @import url('normalize.css'); */

/***** colours ****/
:root
{
  --bodybg: /* #960 */ blue;
  --textbg: #fff0d0;
  --text: rgb(110, 46, 3);
  --headerbg: black;
  --headertext: #fdc;
  --accentbg: #dfd;
  --accent-text: #060;
  --hoverbg: #aca;
  --hovertext: #060;
  --htmlbg: #a44;
}

html
{
  background: var(--htmlbg);
  color: white;
}

body
{
  /* this should never show, unless there are PHP error messages */
  background: var(--bodybg);
  color: var(--text);
  color: white;
  font-family: Helvetica, Arial, sans-serif;
  width: 100%;
  max-width: 1000px;
  margin: auto;
}

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------------------+ |
 *   | |                                        | |
 *   | +----------------------------------------+ |
 *   +--------------------------------------------+
 */


a:link, a:visited
{
  text-decoration: underline;
  color: var(--accent-text);
}

a:hover
{
  background: var(--accentbg);
}


table.reqvars { border-collapse: collapse }
table.reqvars tr td 
{ 
  border: 1px solid black;
  background: white;
  color: black; 
  font-family: monospace; 
  font-size: 80% 
}


/* contains nav information, full width, colour background or images */
header, nav
{
  background: var(--headerbg);
  color: var(--headertext);
}

header
{
  text-align: center;
  font-size: 200%;
  font-weight: bold;
}

@media (max-width: 500px)
{
  header { font-size: 150%; }
}

@media (max-width: 400px )
{
  header { font-size: 115% }
}

footer
{
  background: black;
  color: white;
}

footer form
{
  width: max-content;
  margin: auto;
  padding: 10px;
}

footer input[type=submit]
{
  background: #ccc;
  color: var(--htmlbg);
}

/* contains nav buttons or icon, set positioning */
nav
{
  display: flex;
  justify-content: center;
  /* gap: 20px; */
  flex-wrap: wrap;
}

/* under nav header, all page content */
main
{
  padding: 20px;
  background: var(--textbg);
  color: var(--text);
}

@media screen and ( max-width: 500px )
{
  main { padding: 5px }
}

/* buttons for wide screen menu */
nav a:link, nav a:visited, nav a.selflink:hover
{
  display: inline-block;
  vertical-align: top;
  font-size: 100%;
  text-decoration: none;
  margin: 2px 5px;
  width: max-content;
  padding: 2px 2px;
  border: none;
  background: none;
  color: var(--headertext);
  text-align: center;
}

@media ( max-width: 500px )
{
  nav a:link, nav a:visited, nav a.selflink:hover 
  { margin: 2px }
}

nav a:hover
{
  background: var(--hoverbg);
  color: var(--hovertext);
}

nav a.selflink, nav a.selflink:hover
{
  border-bottom: 2px solid var(--textbg);
  border-radius: 0;
}

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

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


  div.menuicon
  {
    display: inline-block;
    background: none;
    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;
  padding: 10px 0;
}

/*********** 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;
}

form.datarec_form div.error
{
  color: red;
  font-style: italic;
}



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


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

div.text
{
  margin: auto;
  max-width: 600px;
}

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

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

form.vspacedbutton
{
  margin: 10px 0;
}

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

/* home page image */

figure.home
{
  display: block;
  width: 100%;
  max-width: 500px;
  margin: auto;
  background: white;
}

figure.home img
{
  width: 100%;
}

figcaption
{
  text-align: center;
  font-style: italic;
  padding: 10px 0;
}


/* forms */
form.datarec_form 
{ 
  background: var(--accentbg); 
  margin: 5px; 
  padding: 5px; 

}
div.form_input_pair 
{ 
  display: grid;
  grid-template-columns: 1fr 8fr;
  background: var(--accentbg);
  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}
