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

/* Roboto 400 Regular */
@font-face {
  font-family: 'Roboto';
  font-weight: 400;
  font-style: normal;
  src: url('/fonts/Roboto-Regular.woff') format('woff');
  font-display: swap;
}

/* Roboto 400 Italic */
@font-face {
  font-family: 'Roboto';
  font-weight: 400;
  font-style: italic;
  src: url('/fonts/Roboto-Italic.woff') format('woff');
  font-display: swap;
}

/* Roboto 700 Bold */
@font-face {
  font-family: 'Roboto';
  font-weight: 700;
  font-style: normal;
  src: url('/fonts/Roboto-Bold.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  font-weight: 700;
  font-style: italic;
  src: url('/fonts/Roboto-BoldItalic.woff') format('woff');
  font-display: swap;
}

body
{
  background: white;
  color: black;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  font-family: 'LibreBaskerville', serif;
}

h1, h3, h4, h5, h6
{
  margin: 5px 0 5px;
  text-align: center;
  color: rgb(21,40,220);
}

h2
{
  margin: 5px 0 5px; 
  text-align: left;
  color: rgb(21,40,220);
}



h1 { font-size: 160% }
h2 { font-size: 150%; margin: 10px 0 20px; }
h3 { font-size: 140% }
h4 { font-size: 130%; }
h5 { font-size: 120%; }
h6 { font-size: 110%; }

  


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


/* contains nav information, full width, colour background or images */
header
{
  background: white;
  color: rgb(67,67,67);
  /* border: 1px solid blue; */
}

header div.header
{
  /* border: 1px solid red; */
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 4fr 1fr;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

header div.header
{
  text-align: center;
}

header div.header img
{
  width: 100px;
}



@media (max-width: 700px)
{
  header div.header { display: block; }
  header div.header img { display: none }
}

header div.header h1
{
  border: 4px solid #9cf;
  padding: 4px;
  margin: auto;
}

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

footer
{
  background: #06f;
  color: white;
  padding: 10px;
  text-align: center;
  margin-top: 40px;
}

footer p.copyright
{
  font-size: 90%;
}

/* under nav header, all page content between header and footer */
main
{
  padding: 5px;
  background: white;
  color: /* black; */ rgb(67,67,67);
  line-height: 1.5;
}

@media screen and ( min-width: 500px )
{

}

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

nav a:hover
{
  color: blue;;
}

nav a.selflink, nav a.selflink:hover
{
  color: blue;
  background: #f0f8ff;
  outline: #f0f8ff 5px solid;
}

/* 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;
    min-height: 30px;
  }
  /* styles for dropdown menu */
  nav a 
  { 
    display: block;
    margin: 10px auto;
    width: 100%;
  }

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

/* 
 * Most main page content (possibly excluding headers) inside <main> 
 * This is likely to be overridden (especially max-width) per page
 */
div.content
{
  width: 90%;
  max-width: 1200px;
  margin: auto;
}


/* 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;
  margin: 20px auto;
}

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

/* all submit buttons sans serif */
input[type=submit]
{
  font-family: Roboto, sans-serif;
}

/* 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 {margin: 10px 0}

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

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

form.cancelbutton 
{ 
  font-family: Roboto, sans-serif; 
  margin: 10px 0;
}

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

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


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

div.text
{
  background: white;
  max-width: 600px;
  padding: 10px;
  margin: 10px;
}

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

div.twocolumns
{
  display: flex;
  gap: 0 30px;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* these go inside div.twocolumns */
div.col1
{
  flex-basis: 400px;
  flex-grow: 1;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 10px;
}

div.col2
{
  flex-basis: 400px;
  flex-grow: 1;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 10px;
}


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

/* forms */
form.datarec_form 
{ 
  background: var(--accentbg); 
  font-family: Roboto, sans-serif;

}
div.form_input_pair 
{ 
  display: grid;
  grid-template-columns: 1fr 4fr;
  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;
}

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

@media (max-width: 500px)
{

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

input.escode  {display: none}

/************* Google map ****************/

iframe.googlemap
{
  width: 100%;
  height: 450px;
  border: none;
}



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

div.auth_form 
{ 
  width: 90%; 
  max-width: 500px;
  margin: 0 auto; 
  padding: 10px;
  background: #bdf;
  font-family: Roboto, sans-serif;
} 
div.auth_form input { width: 90%}
div.auth_form input[type="submit"] 
{ 
  width: max-content;
  margin: 10px 0 10px;
}
div.auth_form table tr td { padding: 0 2px }
div.auth_error { color: red; background: white; padding: 5px }