* {
  box-sizing: border-box;
}

html,
body,
.wrapper,
#root,
#root > .app,
#root > .app > .iframe_container,
#root > .app > .iframe_container > iframe,
#root > .app > .header,
#root > .app > .summary_container,
#root > .app > .summary_container > .summary,
#root > .app > .summary_container > .summary > .github_ribbon,
#root > .app > .summary_container > .summary > .README,
#root > .app > .summary_container > .summary > .policies {
  margin: 0;
  padding: 0;

  -webkit-margin-before: 0px;
  -webkit-margin-after:  0px;
  -webkit-margin-start:  0px;
  -webkit-margin-end:    0px;
}

/* ------------------------------------------------------------------ */

#root > .app > .iframe_container > iframe {
  min-height: 500px;
}

/* *******************************
 * When the user (re)loads the page, React state is lost.
 * However, within the iframe, the Google Apps Script can determine the user account (#0),
 * and communicate its email address to the parent window.
 * In order for this communication to occur, the iframe needs to be rendered alongside the login screen.
 *
 * When the user is already logged into one (or more) Google account(s),
 * React receives the user's email address from the iframe and adds it to its state.
 * This triggers a fresh render, which removes the login screen.
 *
 * When the user is not logged into any Google account, the login screen is rendered.
 * For the reasons just explained, the iframe must also be added to the DOM.
 * Currently:
 *  - Google redirects the page inside the iframe to a login page
 *  - the server response for this login page prevents its rendering within an iframe
 *  - the iframe appears empty
 * However:
 *  - should Google ever fix this error and the iframe properly display a login prompt:
 *     - on the one hand, this page could be dramatically simplified since Google website sign-in would no-longer be necessary
 *     - on the other hand, this page would look horrible until I got around to making changes
 *  - to prevent the latter,
 *    the following CSS rule is intended to hide the iframe in the DOM when the login screen is visible
 *     - a communication channel will still exist
 *     - any content within the iframe is hidden
 * *******************************
 */
#root > .app > .iframe_container.hidden {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ */

#root > .app > .header {
  text-align: right;
}

#root > .app > .header > button.google {
  display: inline-block;
  margin: 0.5em;
}

/* ------------------------------------------------------------------ */

@import url('https://fonts.googleapis.com/css?family=Roboto');

#root > .app > .header > button.google {
  display: inline-block;
  padding: 1px 6px;
  background-color: #fff;
  transition: background-color .5s ease-in-out;
  color: #444;
  border-radius: 5px;
  border: thin solid #888;
  box-shadow: 1px 1px 1px grey;
  white-space: nowrap;
  cursor: pointer;
}
#root > .app > .header > button.google:hover {
  background-color: #eee;
}

#root > .app > .header > button.google > span.icon {
  background: url('../img/icons/google-login.png') transparent center/100% no-repeat;
  display: inline-block;
  vertical-align: middle;
  width:  42px;
  height: 42px;
}

#root > .app > .header > button.google > span.buttonText {
  display: inline-block;
  font-size: 18px;
  letter-spacing: 0.015em;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
  vertical-align: middle;
  padding: 0 1em;
}

/* ------------------------------------------------------------------ */


#root > .app > .summary_container > .summary {
  width: 90%;
  margin: 1em auto;
}

#root > .app > .summary_container > .summary {
  font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
  font-size: 16px;
  line-height: 1.5;
  word-wrap: break-word;
}

#root > .app > .summary_container > .summary h3 {
  font-size: 1.3em;
  font-weight: bold;
}
#root > .app > .summary_container > .summary h4 {
  font-size: 1.15em;
  font-weight: bold;
}
#root > .app > .summary_container > .summary h5 {
  font-size: 1.0em;
  font-weight: bold;
}
#root > .app > .summary_container > .summary a {
  color: #0366d6;
  text-decoration: none;
}
#root > .app > .summary_container > .summary a:hover {
  text-decoration: underline;
}
#root > .app > .summary_container > .summary code {
  background-color: rgba(27,31,35,.05);
  border-radius: 3px;
  font-size: 85%;
  margin: 0;
  padding: .2em .4em;
  font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;
}
#root > .app > .summary_container > .summary img {
  max-width: 100%;
}
#root > .app > .summary_container > .summary hr {
  margin: 0.5em 0;
}
#root > .app > .summary_container > .summary li {
  line-height: 1.75em;
}

/* ------------------------------------------------------------------ */

#root > .app > .summary_container > .summary > .github_ribbon {
  position: absolute;
  top: 0;
  left: 0;
}

#root > .app > .summary_container > .summary > .github_ribbon,
#root > .app > .summary_container > .summary > .github_ribbon > a > img {
  width: 149px;
  height: 149px;
}

/* ------------------------------------------------------------------ */

#root > .app > .summary_container > .summary,
#root > .app > .summary_container > .summary > .README > h3:first-child {
  margin-top: 0;
  padding-top: 0;
}

/* ------------------------------------------------------------------ */
