/* Override ../../../2016/09/TPAC/tpac.css with local rules for the
   2017 logo and banner */

/* Use a color from the logo for the page background */
html {background: #002c4c; /* fallback */
  background: fixed linear-gradient(to bottom, #000, #005A9C)}

/* Cut off a bit from the top and the right of the banner image */
#logo img {width: 20em; margin: -2em -6em 0 -105em;
  border-width: 0 0 0 100em; box-shadow: 0 0em 0.3em #333;
  background: 0 0 / auto 100% repeat-x url(TPAC-2017_web-header-bg.png)}

/* H1 aligns with H2 rather than with body text. Use color from logo */
h1, h1 + p {color: #164D80; margin-left: -2rem}

/* Push the #insidenav a bit away from the banner */
#insidenav {margin-top: 0.7em}

/* Make the H2 in rightbar a bit smaller */
/* .rightbar h2 {font-size: 1.2em} */

/* Sponsor logo size limits in the rightbar boxes */
.rightbar img {vertical-align: middle; margin: 1em 0; max-height: 7em}
.rightbar small img {max-height: 4em; max-width: 45%}
.rightbar .small-logos img {margin: 0.5em 0.5em}

/* When the screen is narrower than 40em, make the logo small */
@media screen and (max-width: 40em) {
  #logo img {width: 9em; margin: 0 -1em 0 -104em}
  h1, h1 + p {margin-left: 0}	/* Same as H2 at this size*/
}

@media print {
  /* Remove the background we just set */
  html {background: none}
  /* Logo a little smaller */
  #logo img {width: 17em; margin-right: -4em}
  /* Align title with body text (plus some padding set in tpac.css) */
  h1, h1 + p {margin-left: 0}
  /* Larger H1 than in tpac.css */
  h1 {font-size: 3em; padding-top: 0}
  h1 + p {margin-top: 0}
  /* If there is room, we can display the sponsors */
  x .rightbar {display: block}
  x .rightbar h2 {margin-top: 0.2em; text-align: center}
  /* Slightly smaller, because half letter paper is slightly smaller than A5 */
  h1 + p {font-size: 1.15em}
  /* Vary this depending on how big room numbers are */
  .rooms th:nth-child(1) {width: 40%} /* WG name */
  .rooms th:nth-child(2) {width: 41%} /* Room location */
  .rooms th:nth-child(3) {width: 19%} /* Confidentiality */
  .rooms thead {font-size: 0.8em}
  /* If there is enough space, we don't mind some empty lines at the bottom */
  table:not(.rooms) {page-break-inside: avoid}
}

/* For table in rightbar */
table.compact {background: none; border: none}
table.compact td, table.compact th {border: none; border-bottom: thin dotted;
  text-align: left; white-space: nowrap; padding: 0 0.3em; font-weight: normal}
sup {line-height: 0}
sup a {color: inherit; text-decoration: none}

/* For a wider rightbar */
.rightbar {width:18em}
@media all and (min-width: 88em) {
  /* Enough space to fit the at-a-glance table next to the rightbars */
  #at-a-glance {width: calc(100% + 4rem - 18rem - 2rem - 2rem - 2px);
    float: left}
}

/* See if using the start h2 instead of first h2 is more useful */
@page :left {
 @top-left {content: none; x-font-style: italic}
}
@page :right {
 @top-right {content: none; x-font-style: italic}
}
