/* Styles for www.cntv.org.uk */

body {
  text-align: center;

  color: green;
  /* The page originally used two different shades of green. I prefer the
   * darker one above, but it jars more with the other colours used. */
  /*color: #388c2f;*/  /* Shade originally used at the top of the home page */
  /*color: #008040;*/  /* Another colour occasionally used */

  background-color: #d7cabd;
  font-family: "arial", "helvetica", sans-serif;
  margin: 8px;
}

h1 {
  font-size: 175%;
}

/* Enforce link colours - causes a few problems with "a name" links */
/*
a {
  color: #0000EE;
}

a:visited {
  color: #551A8B;
}
*/

/*** Page titles start ***/

div.page-title {
  border: 0.4em solid green;
  width: 98%;  /* XXX Want it to be automatic, but this is necessary for IE6 in order to get the height (!) right - see below. */
  background-color: #006400;
  color: white;
  text-shadow: #005500 2px 2px; 
  font-weight: bold;
  background-image: url('/resources/CNTV_small_logo2.gif');
  background-repeat: no-repeat;
  /*padding-left: 145px;*/  /* XXX Would like to have this, but causes problems in conjunction with width above, which shouldn't be needed, except for IE6! */
  min-height: 131px;
  background-position: 3px 3px;
  text-align: left;
}

div.page-title a {
  text-decoration: underline;
  text-shadow: none;
  color: white;
}

div.page-title p, div.page-title h1, div.page-title ul {
  /* XXX Would prefer to have this in div.page-title, above. */
  padding-left: 145px;
} 

div.page-title ul.options {
  /* XXX A consequence of the padding-left above */
  padding-left: 0.5em;
}

div.page-title h1 {
  margin-top: 18px;
}

div.page-title p, div.page-title li {
  font-style: italic;
  margin-left: 0;
  margin-right: 0;
}

div.page-title ul.options li {
  padding: 3px 5px;
  list-style-type: square;
  list-style-position: inside;
  font-style: normal;
}

div.page-title ul.options li a {
  text-decoration: none;
  text-shadow: #005500 2px 2px; 
}

div.page-title ul.options li a:hover {
  text-decoration: underline;
  text-shadow: none;
}

div.page-title ul.options li.selected {
  background-color: #004400;
  text-shadow: #002200 2px 2px;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
}

/* "Special" (stand-out) link - e.g., for home page */
div.page-title ul.options li.special, div.page-title ul.options li.special a {
  color: yellow;
}

/* XXX Something horrible - hopefully, temporary until I can decide how best to
 * fix this. Experiment has shown that this fixes up the height of the
 * div.page-title (actually, adding a paragraph with this class makes it
 * shorter). If the description already ends with a paragraph, we're OK. If
 * this hack is forgotten, then it looks almost as good. */
div.page-title p.ie-fix-height {
  margin: 0px;
  font-size: 1px;
}

/*** Page titles end ***/

/* "Compact" list (on one line) */
ul.compact {
  padding-left: 0px;
  margin-left: 0px;
}

ul.compact li {
  display: inline;
}

div.page-title ul.compact {
  margin-bottom: 0px;
}

/* Clickable list of options */
div.page-title ul.options {
  float:right;
  margin: 15px;
  margin-left: 0px;
}

cite {
    font-style: italic;
}

em {
    color: #006400;
}

strong {
    font-weight: bolder;
}

h2 {
  font-size: 125%;
  color: black;
}

h3 {
  font-size: 115%;
  font-style: italic;
  color: #006400;
}

dd {
  padding-bottom: 0.5em;
}

dl, p, li {
  font-weight: bold;
}

/* Image (etc.) caption */
p.caption {
  font-size: 90%;
  font-weight: normal;
  margin-top: 0;
}

/* Where we might have longer amounts of text, avoid the text going right to
 * the edge of the screen (mainly intended for centered text). */
p {
  margin-left: 5%;
  margin-right: 5%;
}

/* Get rid of this for paragraphs within tables (the right thing to do?) */
table p, p.credits {
  margin-left: auto;
  margin-right: auto;
}

/* For copyright information, etc. */
p.credits {
    color: #8b0000;
    font-size: 90%;
    font-weight: bold;
}

/* To highlight (probably important) information */
p.highlight {
    font-weight: normal;
    background-color: yellow;
    color: black;
    text-align: center;
    font-size: 125%;
    border-style: solid;
    padding: 0.5em;
}

p.highlight em {
    font-weight: bold;
    color: black;
}

/* General style for important information */
.important {
    color: red;
    font-weight: bold;
}

/* This is used as a slightly stronger form of division on some pages when they
 * contain multiple sections. */
hr.hard {
    height: 5px; 
    border-width: 0px;
    color: green;
    background-color: green;
}

/* This is used as a way of breaking up sections. It should be an "hr" - it
 * isn't because of an IE6 bug (can't elminate the <hr> border). */
div.section-separator {
    text-align: center;
    background:url('resources/section_separator.gif') no-repeat center center;
    width: 100%;
    height: 13px;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    border: none;
}

/*** Clickable buttons (begin) ***/
/* XXX For removal - the new toolbar should replace this. */
ul.buttons {
  padding-left: 0px;
  padding-right: 0px;
}

ul.buttons li {
  line-height: 130%;
  list-style-type: none;
  display: inline;
  text-shadow: none;
  padding-left: 0px;
  padding-right: 0px;
}

ul.buttons a.top, ul.buttons a {
  text-decoration: none;
  border-color: black;
  border-style: outset;
  border-width: 1px;
  font-size: 0.8em;
  font-family: "arial", sans-serif;
  font-weight: bold;
  padding-top: 1px;
  padding-bottom: 1px;
  padding-left: 5px;
  padding-right: 5px;
  text-transform: uppercase;
  white-space: pre;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
}

ul.buttons a.top {
  color: #004b40;
  background-color: #e7f0ef; /* XXX was f7f7f7 */
}
ul.buttons a.top:hover { color: #005D50; background-color: #f0f0f0; text-decoration: none; }
ul.buttons a.top:active { color: #004440; background-color: #dae3e2; text-decoration: none; }

ul.buttons a {
  color: #f7f7f7;
  background-color: #004b40;
}
ul.buttons a:hover { color: white; background-color: #005D50; text-decoration: none; }
ul.buttons a:active { color: #dedede; background-color: #004440; text-decoration: none; }
/*** Clickable buttons (end) ***/


/*** "Toolbar" (horizontal list of links) (begin) ***/
ul.toolbar {
  text-align: center;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
  border: 0px;
  margin-left: 0%;
  margin-right: 0%;
  margin-top: 0.5em;
  margin-bottom: 0px;
  width: 100%;
}
ul.toolbar li {
  display: inline;
  float: left;
  list-style-type: none;
  border: 0px;
  width: 19%; /* Compare with IE workaround in fix-ie.css */
  min-height: 3em;
  height: 3em;
  padding: 0px;
  border: 0px;
  margin-top: 0px;
  margin-left: 0.5%;
  margin-right: 0.5%;
  margin-bottom: 0px;
  position: relative;
  background-image: url('resources/gradient1.gif');
  border-color: red;
}
ul.toolbar li:hover {
  background-image: url('resources/gradient1b.gif');
}
ul.toolbar li.special {
  background-image: url('resources/gradient2.gif');
}
ul.toolbar li.special:hover {
  background-image: url('resources/gradient2b.gif');
}
ul.toolbar li a {
  text-decoration: none;
  color: black;
  width: 100%;
  bottom: 0px;
  left: 0px;
  height: 3em;
  cursor: pointer;
}
ul.toolbar li a:hover {
  color: #101010;
}
ul.toolbar li a, ul.toolbar li span {
  position: absolute;
  width: 100%;
  bottom: 0px;
  left: 0px;
}

/*** Table styles ***/

table {
    text-align: left;
    margin-left: auto;   /* Allow centering */
    margin-right: auto;  /* Allow centering */
    border: 2px outset #c0a992;
    width: 85%;
}

th {
    background-color: #c0a992;
    color: black;
    text-align: left;
    font-size: 150%;
}

td, th {
    border: 2px inset #c0a992;
    padding: 7px;
}

/* For a table subordinate to the main theme of the page */

table.subordinate, table.subordinate td {
    border: none;
    background-color: #d1c4b8;
    font-weight: bold;
}

table.subsubordinate, table.subsubordinate td {
    border: none;
    font-weight: bold;
}

/* Marking up alternate rows */
/* This is for shading lines in a table to make them easier to read. Ideally,
 * this should be done automatically, but I don't know how. */
tr.alternate {
    background-color: #c0a992;
}

/* Invalid rows in a table (e.g., for dates which have passed). */
tr.invalid {
    background-color: #cacaca;
}

tr.invalid td {
    color: gray;
}

tr.invalid .important {
    color: #ff8080;
}

tr.invalid a {
    color: #8080ff;
}

tr.invalid a:visited {
    color: #a565a5;
}

tr.invalid a:active {
    color: #ff8080;
}

/* Headings for sections of tables */

th.section {
    text-align: center;
    font-size: 125%;
    color: black;
    background-color: #d7cabd;
    padding-top: 16px;
    padding-bottom: 16px;
    border: none;
}

/* We sometimes have a list of things which is displayed in multiple columns,
 * going down before going right. It works by having a table with a single row
 * representing the columns. Each cell in the row is an individual list.
 * Depending upon wrapping, the columns can end up being different lengths.
 * When this happens, it looks awkward, although depending upon what we are
 * using it for, it may not matter. Having short items makes this unlikely. */

/* When a table is used as a sort of list (outer table) */
table.multicolumn-list {
    width: auto;
    border: none;
}

table.multicolumn-list td {
    vertical-align:top;
    border: none;
    padding: 1px;
}

/* Dividing the list into columns */
table.multicolumn-list td.separated {
    border-left:thin dotted green;
}

/* Unordered list used within this multi-column set-up */
table.multicolumn-list ul {
    padding: 0px 4px;
    margin: 0px;
}

table.multicolumn-list ul li {
    font-weight: bold;
    padding: 4px;
    list-style-type: none;
}

/* For when the multi-column list is itself tabular (but we want it in multiple
 * columns). */
table.multicolumn-list table {
    font-weight: bold;
    width: 100%;
    border: none;
}

table.multicolumn-list table td {
    padding: 5px;
}

/* For formatting photographs */
div.photos {
    overflow: auto;
    white-space: nowrap;
}

div.photos img {
    border: 10px solid white;
    margin-left: 4px;
    margin-right: 4px;
    margin-top: 5px;
    margin-bottom: 5px;
    vertical-align: middle;
}

div.photos img, table.photos td img, img.photo, div.floating-photo img {
    border: 10px solid white;
    box-shadow: 2px 2px 0px #a1988d;
    -moz-box-shadow: 2px 2px 0px #a1988d;
    -webkit-box-shadow: 2px 2px 0px #a1988d;
}

img.photo {
    margin: 5px;
}

div.floating-photo {
    float:right;  /* Can, of course, be overridden */
    padding-left: 1em;
    padding-bottom: 1em;
    font-size: 90%;
    font-weight: normal;
}

/*** DISPLAY TABLES ***/
/* Generic table class for when there doesn't appear to be a better way than a
 * table to lay something out. Seatching for these and finding a better way
 * might be a good exercise. */
table.display {
    width: auto;
}

table.display, table.display td, table.display th {
    border: none;
}

/*** NAVIGATION TABLES ***/
/* FIXME: this could probably be done better. And it perhaps shouldn't be a
 * table, but that does relate the different sections in a well-defined way. */
table.navigation {
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid #006400;
  width: 100%;
  font-weight: bold;
}

table.navigation tr, table.navigation tr td {
  border: none;
  padding: 0px;
}

table.navigation a {
  color: #006400;
}

span.editorial {
  font-style: italic;
}

/*** PRINTING ***/
@media print {
  body, div.page-title, p {
    background-color: white;
    margin-left: 0;
    margin-right: 0;
  }

  table {
    width: 100%;
  }

  div.page-title {
    text-align: center;
  }

  div.page-title p, div.page-title h1, div.page-title ul {
    /* XXX This bit only lives here because the padding cannot go into div.page-title, above */
    padding-left: 0px;
  } 

  /* XXX Preferably eliminate the "ie-fix-height" bit below */
  .noprint, div.page-title ul.options, table.navigation, div.page-title p.ie-fix-height {
    display: none;
  }

  body, p, em, h1, h2, h3, div.page-title ul.options, div.page-title ul.options li.special, div.page-title ul.options li.special a {
    color: black;
  }

  div.page-title, div.page-title ul.options li.selected {
    text-shadow: none;
  }

  div.page-title {
    padding-left: 0px;
    background-image: none;
    min-height: 0px;
    border: none;
  }
}

