body {
  --backgroundNavigation: white;
  --textNavigation: gray;
  --button: gray;
  --buttonHover: darkgray;
  --backgroundMain: white;
  --textMain: black;
  --backgroundContent: lightgray;
  --backgroundResults: white;
  --backgroundOverlay: rgba(0,0,0,0.5);
  --darkColor: black;
  --lightColor: lightgray;
}

h1 {
  font-size: 30px;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 20px;
}
h4 {
  font-size: 18px;
}
h5 {
  font-size: 16px;
}

section, section > div {
	margin-bottom: 20px;
}

.container > section {
	background-color: #f4f4f4;
	padding: 10px;
}


.CodeMirror {
	border-style: solid;
	border-width: 1px;
	border-color: darkgray;
	margin-bottom: 20px;
	background-color: white;
}

.readonly .CodeMirror {
	background-color: #f4f4f4;
}

/* Authentication */

body {
  background-color: var(--backgroundMain);
}

nav.navigation {
  background-color: var(--backgroundNavigation);
  height: 60px;
  border: 0;
  display: flex;
  padding: 20px;
  margin: 0 auto;
  width: 90%;
  height: 100%;
  left: 5%;
  align-items: center;
  color: var(--textNavigation);
}

nav.navigation h1 {
  flex: 1;
  font-size: 24px;
  padding: 0;
  margin: 0;
  font-weight: normal;
}

nav.navigation a {
  padding: 0 20px;
  color: var(--textNavigation);
  text-decoration: none;
  padding-top: 5px;
  padding-bottom: 5px;
  display: block;
}

nav.navigation a i {
  padding: 2px 8px 0 0;
}

nav.navigation a:hover, nav.navigation .disabled {
  color: #eaebed;
}

nav.navigation a:hover:not(.disabled) {
  background-color: var(--buttonHover);
}

@media only screen and (max-width: 600px) {
  nav.navigation h1 {
    font-size: 16px;
  }	
  nav.navigation a {
    padding: 0 10px;
    font-size: 12px;
  }	
  nav.navigation a i {
    padding: 1px 4px 0 0;
  }
}

/* Drop down menu */

nav.navigation .dropdown {
  width: auto;
}

nav.navigation .dropdown ul {
  display: none; 
}


nav.navigation .dropdown:hover ul {
  display: block; 
  position: absolute;
  list-style: none; 
  z-index: 100;
  top: 52px;
  background-color: var(--backgroundNavigation);
  border-style: solid;
  border-color: var(--buttonHover);
  border-width: 1px;
}



.container {
  width: 90%;
  max-width: none;
  margin: 0 auto;
}

.container h1 {
  padding: 25px 0;
/*  font-size: 22px;*/
  border-bottom: 1px solid #e0e0e3;
  color: var(--textMain);
}

.container > p, .container > div {
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
  margin: 25px 0;
  padding: 25px;
  background-color: var(--backgroundContent);
}

.container > div p {
  padding: 5px;
  margin: 0 0 10px 0;
}


/* Exercises */

.overlay {
  position: fixed; /* Sit on top of the page content */
  display: none; /* Hidden by default */
  width: 100%; /* Full width (cover the whole page) */
  height: 100%; /* Full height (cover the whole page) */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--backgroundOverlay); /* Black background with opacity */
  z-index: 20; /* Specify a stack order in case you're using a different order for other elements */
}

.loader {
    display: block;
    border: 16px solid var(--lightColor);
    border-top: 16px solid var(--darkColor);
    border-radius: 50%;
    animation: spin 2s linear infinite;
    position: fixed;
    left: 50%;
    top: 50%;
    margin-left: -100px;
    margin-top: -100px;
    width: 100px;
    height: 100px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.content {
	padding-bottom: 20px;
}

/* Tabbed content */

.tabbed > .navigation {
	position:relative;
	box-sizing: border-box;
	display:block;
	float: right;
	margin-bottom: 0px;
}
.tabbed > .navigation > button {
	border-radius: 2px;
	border-width: 1px;
	box-sizing: border-box;
	padding-bottom: 0;
	margin-bottom: -1px;
	font-family: sans-serif;
	text-transform: initial;
	line-height: 30px;
	height: 30px;
	background-color: var(--backgroundContent);
	z-index: 5;
}

.tabbed > .navigation > button.active {
	background-color: var(--backgroundResults);
	border-bottom: 0;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.tabbed > div.navigation {
}

.tabbed > div:not(.navigation) {
	display:none;
}

.tabbed > div.active {
	display:block;
}

.tabbed > div:not(.navigation) > div {
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	background-color: var(--backgroundResults);
	min-height:300px;
	height:300px;
	overflow:scroll;
	border-style: solid;
	border-radius:2px;
	border-width:1px;
	border-color:darkgray;
	white-space: pre;
}

.output {
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	border-style: solid;
	border-radius:2px;
	border-width:1px;
	border-color:darkgray;
	white-space: pre;
	margin-bottom: 20px;
}

.output code {
	background-color: var(--backgroundResults);
	max-height: 300px;
	overflow-y: scroll;
}

/* Editor and preview */

.mardown-editor > div > textarea, .mardown-editor > div > div[data-markdown] {
	min-height: 300px;
	padding-bottom: 10px;
}

/* OTHER */

.hide {
	display: none;
}

section:not(.container) {
	display: none;
}

section.present {
	display: block;
}

.user:not(.authenticated) {
	display: none;
}

[contenteditable="true"] {
	background-color: white!important; 
	border: 1px solid gray!important; 
	border-radius: 2px; 
	min-height: 24px;
	white-space: pre-wrap;
}

input.datetimepicker {
	background-color: white!important; 
	border: 1px solid gray!important; 
	border-radius: 2px; 
	height: 34px;
        margin-top: 25px;
        margin-bottom: 25px;
}

.changed[contenteditable="true"],
.CodeMirror.changed,
input.datetimepicker.changed {
	border-color: red!important; 
}

table.iox {
	width: 100%;
}

table.iox td.icon, table.iox th.icon  {
	width: 30px;
	text-align: center;
	
}

table.iox p {
	padding: 5px 5px;
	margin-bottom: 0;
}

table.iox a.button {
	margin-bottom: 0;
}

.button.button-primary,
button.button-primary,
input[type="submit"].button-primary,
input[type="reset"].button-primary,
input[type="button"].button-primary {
  color: #FFF;
  background-color: var(--button);
  border-color: var(--button); }
.button.button-primary:hover,
button.button-primary:hover,
input[type="submit"].button-primary:hover,
input[type="reset"].button-primary:hover,
input[type="button"].button-primary:hover,
.button.button-primary:focus,
button.button-primary:focus,
input[type="submit"].button-primary:focus,
input[type="reset"].button-primary:focus,
input[type="button"].button-primary:focus {
  color: #FFF;
  background-color: var(--buttonHover);
  border-color: var(--buttonHover); }

button.button-primary[disabled] {
    background:var(--buttonHover);
    border-color: var(--buttonHover);
    color: var(--darkColor);
    text-shadow:none;
}

button.button-secondary[disabled] {
    border-color: var(--lightColor);
    color: var(--lightColor);
    text-shadow:none;
}
button.button-secondary:hover[disabled] {
    border-color: var(--lightColor);
    color: var(--lightColor);
    text-shadow:none;
}

textarea {
	width: 100%;
	min-height: 100px!important;
	overflow-y: auto!important;
	resize: vertical;
}

blockquote {
	background-color: var(--backgroundResults);
	padding: 1em;
	margin-left: 0;
	margin-right: 0;
	font-style: italic;
}

.container > section.footer {
	display: block!important;
	background-color: var(--backgroundMain);
	padding: 10px;
	color: var(--textNavigation);
}

.footer a {
  color: var(--textNavigation);
  font-weight: bold;
}

.footer a:hover {
   color: var(--buttonHover);
}

label {
  display: inline;
  margin-left: .5rem;
  margin-right: 1.5rem;
  font-weight: normal;
}
