/* FONT STYLES FOR ELEMENTS */
/* Override Bootstrap */
code, pre, tt, kbd, samp {
  font-family: 'Source Code Pro', 'Andale Mono', 'Menlo', 'Monaco', Courier, monospace;
}

h1, h4, h5, h6, .header-sans {
  font-family: 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 200;
}

h2, h3, blockquote,
.serif, .dropdown-header,
.title-small-screen, .header-serif, .title, .navbar-title {
  font-family: Georgia, Times, serif;
  font-weight: bold;
}

html, body { /* default Sans Serif Stack */
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
}

/* END FONT SETTINGS */

a:visited {
  color: #36BBCE;
}

html {
  font-size: 1em; /* Fix for weird bootstrap */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-size: 1em;
  line-height: 1.5;
  color: #000; /* Why Bootstrap, why?! */
  text-align: left;
  margin: 1em auto;
  padding: 45px 0 0 0; /* padding top is reset by JS on load. */
  width: 90%;
  max-width: 1600px;
  background-color: WhiteSmoke;
}

.llab-full {
  border: 1px solid #003A70;
  border-radius: 6px;
  background-color: white;
  padding: 1em;
  width: 95%;
  margin: 1em auto 1em;
}

img {
  /* Better resizing of images for mobile devices */
  max-width: 100%;
  padding: 6px;
  /* drop shadows because we be fancy people */
  -webkit-filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
  -ms-filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=2, OffY=2, Color='#444')";
  filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=2, OffY=2, Color='#444')";
}

.noblur { /* No blur for images */
  -webkit-filter: none;
  -ms-filter: none;
  filter: none;
}

nav {
  padding: 1% 5% 1% 5%;
}

.right {
  text-align: right;
}

/* FIXME --- poorly performant. */
.llab-full ul, .llab-full ol {
  font-size: 1em;
  font-weight: inherit;
  display:inline-block;
  color: #004;
  margin: 18px;
  border: 2px solid #39F;
  border-radius: 6px;
}

/* Handle Nested Lists
.llab-full is needed because the class reference is more specific and the
above rules override these without it.
*/
.llab-full ul  ul, .llab-full ol  ol,
.llab-full ul  ol, .llab-full ol  ul {
  border: none;
  display: block;
  margin: none;
  border-radius: 0;
}

li {
  padding: 5px;
}

th {
  font-weight: normal;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 3px; /* Override Bootstrap */
  padding: 8px 0;
  color: #000;
}

blockquote {
  font-weight: normal;
  font-style: italic;
  padding: 10px;
}

/* Physically disables clicking on a link which LOOKS disabled. */
a[disabled] {
  pointer-events: none;
}

.inline {
  display: inline;
}

code { /* Override bootstrap. */
  background: none;
  border-radius: 0; /* reset to not do calculations */
  font-size: 1em;
}

/** PAGE NAV (TOP AND BOTTOM) ************************************************/
.llab-nav {
  line-height: 1.38; /* Keep slightly smaller than normal to control centering the nav buttons */
  background: #FFF;
  margin: 0 0 .5em 0;
  box-shadow: 0 5px 10px #CCC;
  width: 100%;
  padding: .5em 1em;
  vertical-align: middle;
}

/* Show a special div on small screens that isn't in the nav bar */
.title-small-screen {
  margin: 1% 3%;
  display: none;
}

.navbar-title, .title-small-screen {
  font-size: 1.5em;
  font-weight: bold;
  font-variant: small-caps;
  color: #003A70;
  text-align: left;
}

/* Contains the page title text, truncates text with '…' */
/* First line is stupid bootstrap stuff....*/
.navbar-default .navbar-title:hover, .navbar-default .navbar-title:focus,
.navbar-default .navbar-title,
.navbar-title, a..navbar-title {
  vertical-align: middle;
  max-width: 80%;
  min-width: 50%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.llab-full-bottom-bar {
  background: #003A70;
  opacity: 0.85;
  filter: alpha(opacity=85); /* For IE8 and earlier */
  background-image: url(../img/progress.gif);
  background-repeat: no-repeat;
  background-size: 26px;
  height: 32px;
  background-position: 2% 3px; /* (32px - 26px) / 2 */
  border-radius: 20px;
  width: 92%;
  box-shadow: 2px 2px 3px #888;
  /* 3em is extra padding for the feedback button */
  margin: 1em auto 3em;
  padding: 1em;
}

/* WIDTH OF THESE TWO MUST NOT BE > 100%!! */
.navbar-left {
  width: 80%; /* For setting title width */
}

.navbar-right { /* Contains Nav Buttons and Dropdown Menu */
  width: 20%;  /* For setting title width */
}

.navbar-toggle {
  border-radius: 4px;
  display: inline;
  position: inherit;
  float: none;
  margin: 0;
  border-color: #888;
}

.navbar-default .navbar-toggle,
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
  border: 1px solid #888 !important; /* FIXME */
}

.nav-btns {
  float: right;
  z-index: 9999;
  max-width: 18em;
  min-width: 15em;
  margin-bottom: 0; /* Bootstrap override for ul, defaults 10 otherwise */
  line-height: 1em;
  font-weight: 900;
  position: relative;
  vertical-align: middle;
}

/* BUTTON CLASSES */
/* Overrides default bootstrap which conflicts with right float dropdown. */
.btn-group > .btn {
  float: none;
  width: 75px;
}

/* Bottom nav buttons are slightly different */
.bottom-nav {
  float: right;
  height: 26px;
  width: 135px;
  margin-top: -13px; /* Height / 2 */
  vertical-align: middle;
}

.bottom-nav > .btn {
  height: 26px; /* Same height as above */
  width: 65px;
  padding: 2px; /* FIXME -- value is weird */
  font-size: .76em;
}
/* END NAV SECTION ***********************************************************/

/* PAGE DROPDOWN SECTION ******************************************************/
/* Give space to caret in dropdown menus */
/* FIXME -- standardize class names! */
.dropdown-menu {
  margin-top: 6px; /* should be equal to padding on list_header */
  overflow-y: scroll; /* scroll menu on small screens */
  width: auto;
  white-space: nowrap;
  overflow-x: hidden;  /* Text truncation */
  text-overflow: ellipsis;
  /* max- height + width set using JS on page load. */
}
.list_item {
  font-size: 10pt;
  padding: 0;
  margin: 0;
  text-align: left;
}

/* nested class necessary to override padding */
.list_item.dropdown-header {
  color: #222;
  text-transform: capitalize;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 600;
}

/* Button to toggle the menu */
.list_header, .arrow {
  height: 2em;
  margin: 0;
  text-align: center;
  font-size: 12pt;
  font-weight: 900;
  border-color: #888;
  border-radius: 0; /* No round coners on dropdowns between buttons */
}

.list_header {
  border-radius: 0; /* No round coners on dropdowns between buttons */
}

.arrow {/* For Buttons with arrows instead of words. */
  border-radius: 8px;
  font-variant: small-caps;
  width: 3em;
  padding: 3px; /* center text in buttons */
}

/* Dropdown menu items with icons */
.course-link-list, .main-topic-link, .current-page-arrow {
  font-weight: bold;
  background-size: contain;
  background-repeat: no-repeat;
  padding-left: 20px;
  font-size: 100%;
}

.course-link-list {
  background-image: url(../img/globe.png);
  padding-right: 5px;
}

.main-topic-link {
  text-decoration: underline; /* only topic page link is underlined */
  background-image: url(../img/toolbar_home.png);
}

.current-page-arrow {
  background-image: url(../img/forward.png);
}
/* END PAGE DROPDWON SECTION *************************************************/

/* Syntax highlighting elements, override Bootstrap PRE stuff */
pre > code {
  margin: 0;
  font-size: 125%;
}

pre {
  margin: 10px;
  width: calc(100% - 20px); /* sum the left/right margins */
  padding: 0; /* useful for code elements */
}

pre > code.hljs {
  padding: 0.5em;
  border-radius: 4px; /* match bootstrap */
}

.table-middle {
  vertical-align: middle;
}

.resultMessageDiv {
  font-size: 1.2em;
}
/* FEEDBACK BUTTON ON BOTTOM RIGHT
 * TODO: This section doesn't belong in llab. Bad Michael.
 */
.page-feedback {
  padding: 4px;
  float: right;
  right: 1%;
  bottom: 0;
  z-index: 100;
  text-align: right;
  position: fixed;
}

.feedback-button {
  margin: .5em 1em;
}

/* These control the look of the embedded suvery.
* ALL override the bootstrap .panel class
* box-shadow: default panel shadow is too light
* No border-radius because the embed is rectangular,
* and border-radius doesn't work in an iframe
* Margin 0 moves the whole thing closer to the bottom of the page
*/
#fdbk {
  border-radius: 0px;
  margin: 0px;
  box-shadow: 2px 2px 4px #888;
}

/* For whatever reason the iframe has some whitespace around it
* and this fixes the whitespace  */
#feedback-frame {
  margin-bottom: -5px;
  margin-right: -1px;
}
/*********************************/

.course_link {
  display: block;
  margin-bottom: 10px;
  font-size: 120%;
  background-image: url(../img/globe.png);
  background-size: contain;
  background-repeat: no-repeat;
  padding-left: 25px;
}

/* arg. not image please... */
.center {
  text-align: center;
  margin: 0 auto;
}

.strike {
  text-decoration: line-through;
}

/* TODO: Document THis.... */
table .pre {
  line-height: 1em;
}

.imageRight {
  float: right;
  margin: 0 20px 15px 15px;
}

.imageLeft {
  float: left;
  margin: 0 15px 15px 20px;
}

img.center {
  margin-left: auto;
  margin-right: auto;
}

img.inline {
  /* this works if the text isn't also vertical-align'ed!  */
  vertical-align: middle;
  display: inline;
}

img.indent, div.indent {
  margin-left: 10%;
}

.step {
  margin-left: 35px;
  padding: 0 50px 5px 30px;
  background-image: url(../img/lightning.png);
  background-repeat: no-repeat;
  background-position: 0 0;
}

/** Common Styling to highlighted sections */
.alert, /* Bootstrap: which we make more like our .quote sections */
.quoteOrange, .quoteRed, .quoteGreen, .quoteBlue, .quoteYellow {
  padding: 10px 15px;
  margin: 10px 2%;
  width: 96%;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
}

.quoteRed { /* FIXME, name needed */
  border-left: 12px solid #C11;
  background-image: none; /* override bootsrap, for now */
  background-color: #e7c3c3;
}

.quoteOrange { /* FIXME, name needed */
  border-left: 12px solid #FF9D1E;
  background-color: #FFCE8E;
}

.quoteBlue { /* FIXME, name needed */
  border: 1px solid #164CBA;
  border-left-width: 12px;
  background-color: #99F;
  color: #000000;
}

.quoteBlue code { /* FIXME, name needed */
  color: #003A70;
}


.quoteGreen { /* FIXME, name needed */
  border-left: 12px solid #693;
  background-color: #9C6;
}

.quoteYellow { /* FIXME, name needed */
  border-left: 12px solid #e4e47d;
  background-color: #F1F1BC;
}

/** ICON CLASSES **/
/*  These are resource icons for each item.
    Really, these should all apply on when contained in .topics...*/
.topic .group, .topic .reading, .extresource, .topic .video, .topic .forum,
.resource, .topic .assignment, .topic .homework, .topic .quiz, .codeit,
.simulation, .topic .matchsequence, .fillblank, .topic .summary,
.topic .brainstorm, .display {
  background-repeat: no-repeat;
  background-position: left;
  background-size: 1em;
  padding-left: 35px;
  margin: 5px 0;
}

.topic .quiz {
  background-image: url(../img/multiplechoice28.png);
}

.topic .assignment, .topic .homework {
  background-image: url(../img/note28.png);
}

.topic .codeit {
  background-image: url(../img/special-codeshield-32.png);
}
.topic .matchsequence {
  background-image: url(../img/matchsequence28.png);
}
.topic .simulation {
  background-image: url(../img/Icon-Simulation-28.png);
}
.topic .resource {
  background-image: url(../img/course-resources-32.png);
}

.topic .fillblank {
  background-image: url(../img/fillblank28.png);
}
.topic .forum {
  background-image: url(../img/pageLink.png);
}

/* http://findicons.com/icon/58541/movies */
.topic .video {
  background-image: url(../img/movies.png);
}

.topic .summary {
  background-image: url(../img/Icon-Reading-28.png);
}

.topic .brainstorm {
  background-image: url(../img/brainstorm28.png);
}

.topic .extresource, .topic .display {
  background-image: url(../img/display28.png);
}

/* http://findicons.com/icon/93370/emblem_library?id=274277 */
.topic .reading {
  background-image: url(../img/emblem_library.png);
}

/* http://findicons.com/icon/66444/user_group?id=66460 */
.topic .group {
  background-image: url(../img/user_group.png);
}
/* End items controlled by .topic div */

/* Other items, which partially override .topic div */

/* Headings */
.topic_header {
  font-size: large;
  text-decoration: underline;
  padding-left: 0;
}

.topic .label {
  margin-top: 20px;
  margin-bottom: 12px;
  padding-left: 0;
  padding-left: 0;
}

/* List-related items
 * bigIdeas and learninggoals are being treated identically at the moment.
 */
.bigideas,
.learninggoals {
  font-weight: 400;
}

/* Formatting stuff */
.indent0 {
  margin-left: 0
}
.indent1 {
  margin-left: 20px
}
.indent2 {
  margin-left: 40px
}
.indent3 {
  margin-left: 60px
}


/* This is for the curriculum page with links to other topic pages.
* Do not place inside a topic div. */
.topic_link {
  font-weight: bold;
  font-size: large;
  text-decoration: underline;
  padding-left: 0;
  padding-top: 10px;
}

/* iframe at the beginning of labs, for embedded content. */
.content-embed {
  border: 0;
  width: 100%;
  min-height: 500px;
  height: 100%;
  display: block;
}

/* Image added to all clickable program file links
* Indicates a new window will open */
.run {
  background: url(../img/external-link.png) center right no-repeat;
  padding-right: 13px;
  font-weight: bold;
}

/**** SPECIAL CONTENT CLASSES ***/
/* .snap inserts the logo using the proper formatting.
* Insert using "Snap<em>!</em>"
*/
.snap:first-letter {
  font-variant: normal;
}

.snap {
  text-transform: capitalize;
  font-variant: small-caps;
  font-style: normal;
}

.snap:after {
  content: "!";
  font-style: italic;
}
/* END .snap */

.truthtable {
  display: inline-block;
  padding: 10px;
}

.truthtable td {
  font-size: 14px;
  padding: 10px 8px;
  border-style: solid;
  border-width: 1px;
}

.truthtable th {
  font-size: 14px;
  font-weight: normal;
  padding: 10px 5px;
  border-style: solid;
  border-width: 1px;
}

.code-vid {
  max-width: 100%;
  text-align: center;
  font-size: .8em;
  font-style: italic;
  color: #808080;
}

/***************************************/
/** LLAB QUIZ STYLING */
.feedbackDiv {
  width: 85%;
  margin: 10px auto 0px auto;
  text-align: center;
  color: #19253D;
}

.buttonDiv {
  text-align: center;
}

.buttonTable {
  border-collapse: collapse;
  margin: 8px auto 5px auto;
  padding: 1em .5em;
}

.checkAnswerButton,
.tryAgainButton {
  vertical-align: middle;
  margin: 10px;
}

/* multiple choice question specific styling */
/* FIXME, these need descendant ( > ) selectors! */
.MultipleChoice .currentQuestionBox {
  margin: 0px auto;
  padding: 10px 0px;
  text-align: left;
}

.MultipleChoice .currentQuestionBox .leftColumn {
  float: left;
  width: 85%;
  padding: 10px 0px 10px 15px;
  min-height: 300px;
}

.MultipleChoice .currentQuestionBox .rightColumn {
  float: right;
  width: 12%;
  padding: 10px 0px;
  text-align: center;
  color: white;
  min-height: 300px;
}

.MultipleChoice .itemLabel {
  font-size: .7em;
  text-transform: uppercase;
  margin: 5px 0px 0px 15px;
}

.MultipleChoice .promptdiv {
  font-size: .9em;
  color: #000;
  margin: 3px 10px 15px 15px;
  font-weight: bold;
  line-height: 150%;
}

.MultipleChoice .radiobuttondiv {
  margin: 10px;
}

.MultipleChoice .radiobuttondiv table td {
  padding: 3px 3px 8px 3px;
}

.MultipleChoice .radiobuttondiv input {
  margin-top: 2px;
}

.MultipleChoice .radiobuttondiv table p {
  font-size: inherit;
}

.MultipleChoice .radiobuttondiv .correct {
  color: green;
  font-weight: bold;
}

.MultipleChoice .radiobuttondiv .incorrect {
  color: red;
  font-weight: bold;
}

.MultipleChoice .radiobuttondiv table td:first-child {
  width: 25px;
}

.MultipleChoice .radiobuttondiv table td + td + td div[name="feedbacks"] {
  font-style: italic;
  font-size: .9em;
  border-left: 4px solid #999;
  padding-left: 6px;
  margin-left: 30px;
}

.MultipleChoice .statusMessages {
  text-align: center;
  margin: 5px auto;
  padding: 5px;
}

.MultipleChoice .numberAttemptsDiv, .lastAttemptDiv {
  display: inline;
  font-size: .8em;
  margin: 0px;
  padding: 0px;
}

/** QUIZ CLASSES OF QUESTIONABLE USE */

.MultipleChoice .promptdiv p {
  font-size: inherit;
  font-weight: normal;
}

.MultipleChoice .promptdiv a:link, .promptdiv a:visited {
  color: #000;
}

.MultipleChoice .promptdiv a:hover {
  background-color: #FF0;
}

.MultipleChoice .promptdiv ol {
  font-size: .8em;
  text-transform: uppercase;
  margin-left: 25px;
}

.feedbackdiv.correct {
  color: green;
}

.feedbackdiv.incorrect {
  color: red;
}

/** END QUESTIONABLE STUFF */
/********************************/
/*** END QUIZ CSS               */
/********************************/

/******* SMALL DEVICE STUFF *****/
@media (max-width: 768px) {
  body {
    width: 100%;
  }
  .llab-full {
    width: 98%;
  }
  .navbar-right > .btn-group > .arrow {
    display: none;
  }
  .navbar-toggle {
    border: 6px;
  }
  .navbar-right > .btn-group {
    float: left;
    padding: 0;
    width: 100%;
  }
  .navbar-right {
    float: left;
    margin: 0;
    padding: 0;
    width: 100%;
  }
  .dropdown-menu-right {
    width: 100%;
  }
  .navbar-left {
    display: none;
    width: 0;
  }
  /* FIXME -- this shouldn't be this way, but it works. */
  .list_item {
    color: #000;
  }
  /** Rounded corners for hamburger when it's the only button */
  .list_header {
    border-radius: 6px;
  }
  /* Override display only, all other properties are set above */
  .title-small-screen {
    display: block;
  }
  .llab-nav {
    position: fixed;
  }
  .page-feedback {
    display: none;
  }
  .nav-btns.btn-group {
    /* Buttons can take the whole top bar on small screens
     * Main difference is for the dropdown menus to look nice when
     * expanded */
    width: 100%;
    /* Override this setting so that width takes effect. */
    max-width: 100%;
  }
}
/****************************************/

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  h2, h3, blockquote,
  .serif, .dropdown-header,
  .title-small-screen, .header-serif, .title, .navbar-title {
    font-weight: normal;
  }
}


/* * * * * FONTS * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* DO NOT LOAD EXTRA FONTS WE WONT USE */
@font-face { /* Used for all code elements */
  font-family: 'Source Code Pro';
  src: url('../fonts/SourceCodePro/EOT/SourceCodePro-Regular.eot');
  src: url('../fonts/SourceCodePro/EOT/SourceCodePro-Regular.eot?#iefix') format('embedded-opentype'),
       url('../fonts/SourceCodePro/WOFF/OTF/SourceCodePro-Regular.otf.woff') format('woff'),
       url('../fonts/SourceCodePro/WOFF/TTF/SourceCodePro-Regular.ttf.woff') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face { /* Default Sans Font */
  font-family: 'Open Sans';
  src: url('../fonts/opensans/OpenSans-Regular-webfont.eot');
  src: url('../fonts/opensans/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
       url('../fonts/opensans/OpenSans-Regular-webfont.woff') format('woff'),
       url('../fonts/opensans/OpenSans-Regular-webfont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
/* * * * END FONTS * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


/**************** *************************** ************/
/**************** TO BE REMOVED OR REFACTORED ************/
/* THESE ARE USED IN TWO FILES
* We should move these to those two locations, or try to fix them
*/
#tableBlue {
  border-collapse: collapse;
  margin: 10px 15px;
  background-color: #CCF;
}

#tableBlue th {
  border: 1px solid #66F;
  vertical-align: top;
  text-align: left;
  font-size: .8em;
  padding: 2px 10px;
  font-weight: 600;
}

#tableBlue td {
  border: 1px solid #66F;
  vertical-align: top;
  padding: 5px 10px;
  vertical-align: top;
}

#tableBlue ul {
  border: none;
  margin: 0;
}

form li div {
  font: 500 15px/1.7 "Times New Roman", Times, serif;
}

form > h2, form > ol > li {
  color: #999;
  font: 500 30px;
}

form label {
  font-family: sans-serif;
}
