@import url('https://fonts.googleapis.com/css?family=Inconsolata');
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono');


/*************************
* PAGE
*************************/

html {
  background-color: #222;
  color: #DDD;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
}

body, html {
  margin: 0;
  width: 100%;
}

@media screen and (min-width: 800px)   {
  html {
    font-size: 24px;
  }
}


/*************************
* RESPONSIVE STYLES
*************************/
@media screen and (max-width: 699px) {
  #logout, #login {
    float: right;
    margin-left: auto;
  }
  .navtext {
    display: none;
  }
  .navbutton {
    width: 24px;
  }
}

@media screen and (min-width: 700px) {
  #logout, #login {
    float: right;
    margin-left: auto;
  }
  .navtext {
    font-size: 0.7rem;
  }
  .navbutton {
    width: 95px;
  }
}

@media screen and (min-width: 800px) {
  #logout, #login {
    float: right;
    margin-left: auto;
  }
  .navtext {
    font-size: 0.75rem;
  }

  .navbutton {
    width: 110px;
  }
}

@media screen and (min-width: 1200px)   {
  .navbutton {
    width: 150px;
  }
  .navtext {
    font-size: 0.9rem;
  }
}


/*************************
* ELEMENTS
*************************/
input,
select,
button {
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 6px;
}

table {
  width: 100%;
  margin-bottom: 6px;
  margin-left: 0;
  margin-right: 0;
  border-spacing: 6px;
}

th {
  background-color: #444;
  text-align: left;
  padding: 8px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

td {
  padding: 8px;
}

h3 {
  margin: 0;
}

a {
  color: #ccc;
  text-decoration: none;
}

a:hover {
  color: #fff;
}

a:visited {
  color: #bbb;
}

/*************************
* GENERAL CLASSES
*************************/

.centered-text {
  text-align: middle;
  margin: auto;
}

/*************************
* HEADER
*************************/

#header {
  display: flex;
  margin: 0;
  padding: 8px;
  background-color: rgb(32, 64, 162);
  margin-bottom: 12px;
  text-shadow: 2px 2px 2px #000;
  box-shadow: 2px 2px 4px rgba(0,0,0, 0.5);  
}


.navbutton {
  display: block;
  background-color: rgb(19, 39, 97);
  color: #ddd;
  text-align: center;
  padding: 6px 12px;
  text-decoration: none;
  margin: 2px 8px;
  box-shadow: 2px 2px 4px rgba(0,0,0, 0.5);
  border-radius: 4px;
}

.navbutton .navtext {
  margin-left: 6px;
}

a.navbutton:hover {
  color: white !important;
  background-color: rgb(61, 92, 187);
}
a.navbutton.disabled:hover {
  background-color: #679 !important;
  color: #ccc !important;
}
a.navbutton:visited {
  color: #ddd;
}

.navbutton.disabled {
  background-color: #679 !important;
  color: #ccc !important;
}

#logout, #login {
  background-color: rgb(97, 19, 19);
  float: right;
  margin-left: auto;
}

.navtext {
  display: none;
  font-size: 0.9rem;

}
.navbutton {
  width: 24px;
}


#logout .navtext, #login .navtext {
  margin-right: 8px;
}

#logout:hover, #login:hover {
  background-color: rgb(128,20,20);
}

@media screen and (min-width: 700px) {
  .navtext {
    font-size: 0.7rem;
    display:inline-block;
  }
  .navbutton {
    width: 95px;
  }
}

@media screen and (min-width: 800px) {
  .navtext {
    display:inline-block;
    font-size: 0.75rem;
  }

  .navbutton {
    width: 110px;
  }
}

@media screen and (min-width: 1200px)   {
  .navbutton {
    width: 150px;
  }
  .navtext {
    display:inline-block;
    font-size: 0.9rem;
  }
}



/*************************
* GENERATE
*************************/

#generate form {
  margin: auto;
  width: 800px;
}

#generate .message {
  color: #666666;
}

#generate #scoreContainer #scoreValue {
  width: calc(100% - 16px);
  padding: 8px;
  text-align: center;
}

#generate #scoreContainer #scoreSlider {
  width: 100%;
}

#generatebtn {
  margin-left: 14px;
  padding: 12px;
}

#valueCell, #assignmentCell {
  width: 150px;
}

#scoreSlider {
  margin-left: -4px;
}

#sliderCell {
  padding: 0;
  padding-left: 0;
  padding-right: 12px;
}

#courses, #assignments, #scoreValue {
  font-size: 1.2rem;
  padding: 0.25rem;
  width: 100%;
}

#assignments {
  text-align: center;
}

.initialSelectorButton {
  display: inline-block;
  font-family:'Roboto Mono';
  font-size: 1.1rem;
  text-align: center;
  vertical-align: middle;
  width: 2.1rem;
  height: 2.1rem;
  margin-right: 8px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.letterSelected {
  background-color: red;
  color: white !important;
}

.letterUnselected {
  color: black;
}

.selectionErrorTitle {
  color: white;
  background-color: rgba(255, 128, 0, 0.75);
  outline: 1px solid rgba(255, 128, 0, 0.5);
}

.selectionErrorContent {
  background-color: rgba(255, 128, 0, 0.25);
  outline: 1px solid rgba(255, 128, 0, 0.5);
}

@media screen and (max-width: 800px) {
  #generate form {
    width: 100%;
  }
}


/*************************
* CODE RESULT
*************************/
#result form {
  max-width: 750px;
  margin: auto;
}

#result table {
  max-width: 750px;
  margin: auto;
  margin-bottom: 6px;
  box-sizing: border-box;
}

#result th {
  font-size: 0.8rem;
  padding: 4px;
  color: #999;
}

#result td {
  font-size: 1rem;
  font-weight: bold;
  color: #CCC;
  background-color: #111;
  padding: 3px;
}

#result #code {
  font-size: 4rem;
  font-family: 'Inconsolata', 'Roboto Mono', 'Consolas', serif;
  text-align: center;
  color: white;
}

#result .dbsuccess {
  color: #339933;
  background-color: #003300;
  font-size: 0.5rem;
  text-align: center;
}

#result .dbfailure {
  color: #CC3333;
  background-color: #660000;
  font-size: 0.7rem;
  text-align: center;
}

#result #debug {
  font-size: 0.8rem;
  color: gray;
}

#result #debug th {
  width: 110px;
}

/*************************
* LOGIN FORM
*************************/

#loginform {
  margin: 20px;
}

#loginform td:has(label) {
  width: 150px;
}

#loginform label {
  font-size: 1.1rem;
  font-weight: bold;
}

#loginform input.logintextbox {
  width: 100%;
  float: right;
}

#loginform #loginmessage {
  font-size: 1.1rem;
  font-weight: bold;
  color: rgb(131, 0, 0);
  background-color: rgba(255, 212, 156, 0.507);
  text-align: center;
  padding: 4px;
}

#loginbtn {
  padding: 12px;
  float: right;
}

@media screen and (max-width: 699px) {
  #loginform {
    width: calc(100% - 24px);
    margin: 12px;
  }
}

@media screen and (min-width: 800px) {
  #loginform {
    width: 800px;
    margin: auto;
  }
  #loginform td:has(label) {
    width: 160px;
  }
}

/*************************
* CODE TABLE
*************************/

table.codetable {
  border-spacing: 4px;
  vertical-align: top;
  font-size: 0.8rem;
  margin: auto;
  table-layout: fixed;
  box-sizing: border-box;
}

.codetable th, .codetable td {
  padding: 4px 8px;
}

.codetable th {
  height: 1.5rem;
  font-size: 0.6rem;
}

.codetable td.highlight {
  background-color: #234;
}

.codetable td.standard {
  background-color: #111;
}

.codetable .sortablelink {
  width: 100%;
  padding-top: 8px;
  padding-bottom: 6px;
}

.codetable td.alternate {
  background-color: #282828 !important;
}

.codetable th a {
  color: white;
}

.ct_first, .ct_last{
  width: 12%;
}

.ct_score {
  width: 15%;
}

.ct_assign {
  width: 15%;
}

.ct_course {
  width: 20%;
}

.ct_code {
  width: 20%;
}

.ct_created {
  width: 22%;
  font-size: 0.7rem;
}

.ct_delete {
  color: white;
  width: 36px;
  max-width: 40px;
}

td.ct_code {
  font-family: 'Inconsolata', 'Roboto Mono', 'Consolas', serif;
  font-size: 1rem;
}


td.ct_last, td.ct_first, td.ct_score {
  font-size: 1.1rem;
}

td.ct_last, td.ct_first, td.ct_score, td.ct_assign {
  text-align: center;
}


button.delete {
  color: #c99 !important;
  background-color: #661111;
}

td.ct_rowdeletebutton {
  text-align: center;
  vertical-align: middle;
}
/*************************
* CODE HISTORY / SEARCH
*************************/

#history button {
  display: inline-block;
  font-size: 1rem;
  color: white;
  padding: 4px;
  margin: 0;
}
#history form {
  display: inline-block;
  margin-bottom: 0;
  width: 100%;
}

#history #filters {
  margin-bottom: 6px;
}

#history span.rowid {
  display: inline-block;
  margin-left: 6px;
  font-size: 6px;
  color: gray;
}

#history button.filter {
  font-size: 0.8rem;
  background-color: #114411;
}

#history button.clearfilters {
  font-size: 0.8rem;
  background-color: #000;
}

#history input[type=text] {
  font-size: 1.1rem;
  width: 150px;
}

#history select {
  font-size: 1.2rem !important;
}

/*************************
* SETTINGS
*************************/

#settings button {
  width: calc(100px + 4rem);
  text-align: center;
  vertical-align: middle;
  font-size: 1rem;
  margin-left: 12px;
  margin-top: 12px;
  border: #fff 2px solid;
}

#settings .container  {
  display: table;
  margin: 12px;
  padding: 12px;
  width: calc(100% - 48px);
}

#settings .container * {
  font-size: 1rem;
}

#settings #purgecontainer {
  border: rgb(162, 32, 32) solid 1px;
  background-color: rgba(162, 32, 32, 0.1);
}

#settings #purgeallbutton {
  margin-left: 0;
}

#settings #purgeallbutton:hover {
  background-color: #900;
  color: white;
  border: white 2px solid;
}



#settings button:hover {
  background-color: rgb(32, 64, 162);
  color: white;
}

#settings #purgeallbutton[disabled] {
  background-color: rgba(16,16,16);
  color: rgb(128,128,128);
  border-color: #666;
}

#purgeverify, #purgeoptions {
  display: table-cell;
  width: 50%;
  background-color: #000;
  padding: 12px;
}

#settings strong#purgekey {
  color: red;
  margin-left: 24px;
}

#settings #purgecontainer .purgedatecontainer input {
  margin-left: 24px;
  margin-bottom: 24px;
}

#settings #filedropcontainer {
  border: rgb(32, 64, 162) solid 1px;
  background-color: rgba(32, 65, 162, 0.1);
}

#filedropcontainer .dropbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.504);
  outline: 2px dashed #666;
  width: 100%;
  height: 200px;
}

#filedropcontainer .dropbox.is-dragover {
  background-color: #332222;
}

#filedropcontainer .dropbox label p:hover {
  color: red;
}

#filedropcontainer .dropbox input {
  display: none;
}


/*************************
* SLIDER INPUT FORMAT
*************************/

input[type=range] {
  height: 41px;
  appearance: none;
  margin: 10px 0;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 24px;
  cursor: pointer;
  animation-duration: 0.2s;
  box-shadow: 0px 0px 0px #000000;
  background: #666;
  border: 1px solid black;
  border-radius: 24px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

input[type=range]::-webkit-slider-thumb {
  border: 1px solid black;
  height: 32px;
  width: 32px;
  border-radius: 10px;
  background: #FFFFFF;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6.5px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

input[type=range]:focus::-webkit-slider-runnable-track {
  background: #B6B6B6;
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 24px;
  cursor: pointer;
  animation-duration: 0.2s;
  box-shadow: 0px 0px 0px #000000;
  background: #B6B6B6;
  border-radius: 24px;
  border: 2px solid #8A8A8A;
}

input[type=range]::-moz-range-thumb {
  box-shadow: 0px 0px 0px #828282;
  border: 3px solid #8A8A8A;
  height: 32px;
  width: 32px;
  border-radius: 10px;
  background: #FFFFFF;
  cursor: pointer;
}

input[type=range]::-ms-track {
  width: 100%;
  height: 24px;
  cursor: pointer;
  animation-duration: 0.2s;
  background: transparent;
  border-color: transparent;
  color: transparent;
  
}

input[type=range]::-ms-fill-lower {
  background: #B6B6B6;
  border: 2px solid #8A8A8A;
  border-radius: 48px;
  box-shadow: 0px 0px 0px #000000;
}

input[type=range]::-ms-fill-upper {
  background: #B6B6B6;
  border: 2px solid #8A8A8A;
  border-radius: 48px;
  box-shadow: 0px 0px 0px #000000;
}

input[type=range]::-ms-thumb {
  margin-top: 1px;
  box-shadow: 0px 0px 0px #828282;
  border: 3px solid #8A8A8A;
  height: 32px;
  width: 32px;
  border-radius: 10px;
  background: #FFFFFF;
  cursor: pointer;
}

input[type=range]:focus::-ms-fill-lower {
  background: #B6B6B6;
}

input[type=range]:focus::-ms-fill-upper {
  background: #B6B6B6;
}

input:not([type=range]), select {
  box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

