@import url('normalize.css');
@import url('style.php');


body
{
  background: #ffe;
  color: black;
  font-family: Helvetica, Arial, sans-serif;
  font-size: var(--textsize);
}

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)
{
  h1 { font-size: 120% }
  h2 { font-size: 115% }
  h3 { font-size: 112% }
  h4 { font-size: 110%; }
}

a:link, a:visited
{
  text-decoration: none;
  background: #f0f0e0;
}

a:link
{
  color: #00f;
  background: #f8f8ff;
}

a:visited
{
  color: #630;
}

a:hover
{
  text-decoration: underline;
}


/* standardise UL and OL lists */
ul, ol
{
  margin-left: 0;
  padding-left: 0;
}

ul li, ol li
{
  margin: 3px 3ex;
  padding-left: 0;
  line-height: 1.2em;
}

.redtext { color: red }

a.aktarget { visibility: hidden }

/******* debug **********/

table.reqvars tr td
{
  font-size: 90%;
  font-family: sans-serif;
  border: 1px solid #666;
  padding: 2px 10px;
  background: white;
}


/*
 * Overall page layout
 *   +------------wholepage-----------------------+
 *   | +--------------navheader-----------------+ |
 *   | |      +----------banner---------+       | |
 *   | |      |                         |       | |
 *   | |      +-------------------------+       | |
 *   | |      +-----------nav-----------+       | |
 *   | |      |                         |       | |
 *   | |      +-------------------------+       | |
 *   | +----------------------------------------+ |
 *   | +---------------content------------------+ |
 *   | | +------------------------------------+ | |
 *   | | |      local navigation              | | |
 *   | | +------------------------------------+ | |
 *   | |              text content              | |
 *   | +----------------------------------------+ |
 *   +--------------------------------------------+
 */

/* 
 * Set size limits and background for the whole page, both navigation
 * and content. Centred as a block if page is wide enough
 */
div.wholepage
{
  background: none;
  color: black;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

/* contains nav information, full width, colour background or images */
div.navheader
{
  background: none;  
}


div.banner
{
  /* border: 1px solid red; */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: url(images/header-bg.png);
  background-position-y: top;
}

div.banner div.rspacer { width: 100px }

@media (max-width: 500px)
{
  div.banner div.rspacer { width: 20px }
  div.banner img { width: 50px }
}

/* under nav header, all page content */
div.content
{
  padding: 5px;
  background: none;
  color: black;
}

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

}

div.navbar
{
  display: flex;
  justify-content: center;
  font-size: 120%;
}

@media (max-width: 500px)
{
  div.navbar 
  {
    font-size: 100%;
  }
}

/* contains nav buttons or icon, set positioning */
nav
{
  margin: auto;
  padding: 0;
  text-align: center;
  background: #eee;
  border-radius: 5px;
}

div.sizecontrol
{
  margin: auto;
  padding: 0;
  text-align: center;
  background: #eee;
}

div.sizecontrol a
{
  color: black;
  text-decoration: none;
}

/* buttons for wide screen menu */


nav a.navlink
{
  display: inline-block;
  vertical-align: top;
  font-weight: bold;
  text-decoration: none;
  background: none;
  color: black;
  margin: 5px 10px;
  width: max-content;
  padding: 2px;
  border-radius: 5px;
  text-align: center;
}

@media (max-width: 500px)
{
  nav a.navlink
  {
    margin: 2px;
  }
}

a.navlink:hover
{
  background: #fc0;
  color: black;
}

nav a.selflink, nav a.selflink:hover
{
  color: white;
  background: #960;
}


/***** nav submenus ****/

div.homesub
{
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

div.homesub a
{
  display: block;
  margin: 5px;
  border-radius: 5px;
  padding: 1px;
  line-height: 1.2em;
}

div.homesub a.thispage
{
  color: white;
  background: #960;
}


a.sublink { display: none }

@media (max-width: 500px)
{
  a.sublink.hide 
  { 
    display: block;
    width: max-content;
    margin: 5px auto 0;
    font-weight: bold;
    background: #eee;
    padding: 2px;
  }
}

div.subnav
{
  background: white;
  width: max-content;
  max-width: 100vw;
}

@media (max-width: 500px)
{
  div.subnav.hide { display: none }
}

h3.sub
{
  text-align: left;
}

table.subnav
{
  border-bottom: none;
  max-width: 100vw;
}

table.subnav tr td
{
  border-top: 1px solid #fc0;
  padding: 0px 10px 0px 0;
  vertical-align: top;
}

table.subnav tr td:first-child
{
  font-weight: bold;
}

table.subnav tr td a:link
{
  display: inline-block;
  vertical-align: middle;
  width: 170px;
  background: none;
  margin: 0 10px 0 0;
  border-radius: 5px;
  padding: 0 2px;
  line-height: 1.2em;
}

@media (max-width: 500px)
{
  table.subnav tr td a:link 
  {
    margin: 0 10px 0 0;
    width: 100%;
  }
}

table.subnav tr td a.thispage
{
  color: white;
  background: #960;
}

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

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

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


div.panel
{
  /* background: white; */
  max-width: 600px;
  padding: 10px;
  margin: 10px;
  border-radius: 5px;
  line-height: 1.4em;
}

@media (max-width: 500px)
{
  div.panel { margin: 0; padding: 0 }
}

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

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

div.panel img { max-width: 100% }

/*** eyebag advert above footer ***/
div.eyebag
{
  margin: 20px auto; 
  width: max-content;
  text-align: center; 
  border: thin solid #f90; 
  background: white;
}

/*** footer for all pages ***/
div.footer
{
  background: white; 
  color: black; 
  clear: both;
  text-align: center;
  border-top: thin solid black;
  margin: 10px auto;
  padding: 5px;
  max-width: 600px;
}

div.footer a { text-decoration: none }


/* factsheet list table */
table.links
{
  width: 100%;
  max-width: 800px;
  background: #fffff8;
  border-bottom: solid 1px #996;
  margin: 20px auto;
}

table.links tr td
{
  vertical-align: middle;
  font-family: Arial, Helvetica, sans-serif;
  border-top: solid 1px #996;
  padding: 5px;
}

table.links tr td img
{
  vertical-align: middle;
}

@media (max-width: 500px)
{
  table.links tr
  {
    display: block;
    border-top: 1px solid black;
  }
  table.links tr td
  {
    display: block;
    width: 100%;
    border: none;
  }
  table.links tr td.links
  {
    display: inline-block;
    width: 40%;
  }
}

/* used on several pages with in-table headings */
table.links h4 { margin-top: 0 }

/*** patient info ***/

table.patient
{
  margin: 10px auto;
}

table.patient tr td
{
  border: 1px solid black;
  padding: 5px;
  vertical-align: top;
  line-height: 1.2em;
}

/* link to top in heading (e.g. FAQ and Glossary) */
div.toplink
{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 10px 0;
  border-top: 1px solid #cc9;
  border-bottom: 1px solid #cc9;
  padding: 2px 0;
  text-align: right;

}

div.toplink h3, div.toplink h4
{
  width: 90%;
  text-align: left;
  margin: 0;
}

/* move lines closer together in glossary entries */
div.glossary
{
  line-height: 1.2em;
}

div.author
{
  border-top: 1px solid red;
  padding-top: 10px;
  margin-top: 10px;
}

/* warning boxes in medical articles */
div.box
{
  border: 1px solid #900;
  margin: 10px 0;
  padding: 5px;
  border-radius: 5px;
}

img.patient
{
  display: block;
  margin: 0 auto 10px;
}
