/* Style Sheet for index.html
 */

/* ! Chrome will mess up printing tables printing at 50% works best of ugh
 * Safari will not print headers and almost works
 *
 * Firefox seems to work!!!
 *
 * A suggest by some is to (ugh) use <div>'s instead of a <table>
 *
 * The next section does not seem to help or hurt.  Removing it does not
 * stop Firefox from working.  Left for footprint purposes at present.
 */
@media print {
  tr,
  td {
    -webkit-break-after: auto;
    -webkit-break-inside: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
    page-break-after: auto;
    height: 15px;
    font-size: 12px;
  }
  #hr-school-select,
  #hr-school-select option {
    width: 400px;
  }

  table {
    page-break-inside: auto;
    -webkit-break-inside: ;
  }

  thead {
    display: table-header-group;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  /* height: 100%; */
}

header {
  display: flex;
  flex-direction: row;
  background-image: url('/images/math.jpeg');
}

header > * {
  /* border: 2px solid gray;  /* For testing. */
  padding: 8px;
  font-weight: bold;
}

body {
  margin-right: auto;
}

#page-main {
  flex-grow: 1;
  /* min-height: 85%;
  margin-bottom: -20px; */
}

#page-main > #section1 {
  margin-right: 0px;
}

/* was form */
#section1 {
  border: 2px solid black;
  padding: 8px;
  margin-right: 8px;
}

pre {
  line-height: 1.5;
  letter-spacing: 0.05rem;
  padding: 1rem;
  background-color: white;
}

#code-field {
  width: 300px;
  display: inline-block;
  text-align: right;
  padding-right: 8px;
  padding-bottom: 16px;
}

.school-select,
.tourn-select {
  padding: 5px;
}

.footer {
  color: gray;
  height: 30px;
}

h1 > a {
  color: black;
  text-decoration: none;
}

/* TODO FUTURE: fix names to convention */
#newtournamentrequest tr > td,
#newtournamentrequest tr > th {
  text-align: right;
  padding-right: 20px;
  vertical-align: top;
}

#newtournamentrequest tr > td:nth-child(2),
#newtournamentrequest tr > th:nth-child(2) {
  text-align: left;
}

#new-tournament > label {
  width: 250px;
  text-align: right;
  vertical-align: top;
  display: inline-block;
  padding-right: 8px;
  padding-bottom: 16px;
}

.errorAfterLabel {
  color: red;
  padding-left: 320px;
  font-size: smaller;
}

.btn-host-1,
.btn-schl-1 {
  border: none;
  padding: 8px 16px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 2px 1px;
  transition-duration: 0.4s;
  cursor: pointer;
  background-color: white;
  color: black;
  border: 2px solid #4caf50;
}

.btn-schl-1:hover,
.btn-host-1:hover {
  background-color: #4caf50;
  color: white;
}

#tourn-schools-list {
  width: 50em;
}

.flex-container {
  display: flex;
  background-color: black; /*  DodgerBlue; */
}

.flex-container > div {
  background-color: #f1f1f1;
  margin: 2px;
  padding: 20px;
}

/* TODO FUTURE: are next 3 in use? */
#flex-left {
  flex-grow: 4;
}

#flex-center {
  flex-grow: 1;
}

#flex-right {
  flex-grow: 4;
}

/* TODO FUTURE: make a class and deploy */
.sstu-button,
.hs-button,
.he-button,
.hstu-button,
.hr-button {
  margin: 4px;
  width: 10em;
}

#add-to-tournament-actions,
#selected-school-actions {
  border-radius: 15%;
  border-width: 2px;
  border-style: solid;
  border-color: black;
  padding: 2px 0px 5px 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
}

/* TODO FUTURE: make a class and deploy */
#tourn-schools-select,
#schools-select,
#exams-select,
#students-select {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  /*  width: 400px; */
}

#student-select {
  min-width: 400px;
}

/* #tourn-schools-select-container,
#school-select-container {
  width: 100%;
} */

.section-heading {
  font-weight: bold;
}

/* presently used for buttons but left broad at present */
.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.input-edit-school {
  width: 300px;
}

#edit-school-form > label {
  width: 79px;
  display: inline-block;
  text-align: right;
  padding-right: 8px;
  padding-bottom: 16px;
}

#edit-school-form-ciphers > label,
#edit-school-buttons > label {
  width: 150px;
  display: inline-block;
  text-align: right;
  padding-right: 8px;
  padding-bottom: 16px;
}

#hr-division-select {
  display: inherit;
}

.disappear {
  display: none;
}

.hidden {
  visibility: hidden;
}

.fake-data {
  visibility: hidden;
}

/* host - exams - inset */

#he-flex-left {
  flex-grow: 1;
}

#he-flex-right {
  flex-grow: 100;
}

/* host - schools - inset */

#hstu-flex-left {
  flex-grow: 1;
}

.flex-right,
#flex-right1,
#flex-right2,
#hstu-flex-right1,
#hstu-flex-right2 {
  flex-grow: 100;
}

#hstu-name-label {
  padding-left: 51px;
}

#hstu-name,
#hstu-school,
#hstu-exam,
#hstu-partial-name {
  width: 190px;
  margin-right: 5px;
  margin-bottom: 5px;
}

/* host - results */

.flex-vcontainer {
  display: flex;
  flex-direction: column;
}

#hr-division-container, #str-division-container {
  display: inline;
}

#hr-selection {
  margin: 8px;
}

.hr-table, .ha-table {
  margin: 10px;
  border-collapse: collapse;
}

#results-score {
  width: 10%;
  text-align: right;
}

#results-name {
  width: 90%;
}

.hrscore {
  font-weight: normal;
}

.hr-table tr:nth-child(even) td {
  background-color: #e0e0e0;
}

.ha-table tr:nth-child(even) td {
  background-color: #e0e0e0;
}

#results-table tr td:nth-child(1),
#results-table tr td:nth-child(2) {
  text-align: right;
}

#results-table tr td:nth-child(4) {
  text-align: center;
}

#hr-selection select {
  margin-right: 10px;
}

.hr-table td,
.hr-table th {
  border-width: 1px;
  padding: 8px;
  border-style: solid;
  border-color: black;
}

.ha-table td,
.ha-table th {
  border-width: 1px;
  padding: 8px;
  border-style: solid;
  border-color: black;
  text-align: right;
}



#hr-student-scoring-table td:nth-child(1),
#hr-student-scoring-table td:nth-child(2) {
  text-align: right;
}

#str-team-scoring-table td {
  text-align: right;
}

#hr-team-scoring-table td:nth-child(1),
#hr-team-scoring-table td:nth-child(2),
#hr-team-scoring-table td:nth-child(3),
#hr-team-scoring-table td:nth-child(4),
#hr-team-scoring-table td:nth-child(5) {
  text-align: right;
}

#hr-indiv-scoring-table td:nth-child(1),
#hr-indiv-scoring-table td:nth-child(2),
#hr-indiv-scoring-table td:nth-child(3) {
  text-align: right;
}

#request-block {
  display: none;
}

/** Support for dealing with scans and view of exams **/

/** School View (schl) **/

#schl-student-exam {
  min-width: 200px;
}

#schl-students-print-exam {
  margin-bottom: 10px;
}

#schl-student-exam caption {
  /* font-weight: bold; */
  padding: 4px 0px;
}

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

.wrong-answer {
  color: red;
  font-style: italic;
}

.scanned-exam-error {
  color: red;
}

.error {
  color:red;
}

#schl-student-exam td,
#schl-student-exam thead th {
  padding: 2px;
  text-align: left;
}

#schl-student-exam thead th:nth-child(2) {
  width: 80px;
}

#schl-student-exam thead th:nth-child(1) {
  text-align: center;
  width: 20px;
}

canvas {
  position: absolute;
}
#userInterface {
  z-index: 3;
}
#machineMarks {
  z-index: 2;
}
#backgroundForm {
  z-index: 1;
}

/*
 * Support exam key and exams scanning/editing
 * From GLV scoreAnswers.css
 */

#hei-image-form {
  width: 1320px;
  background: #ccc;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid black;
}

#hei-preview > p,
#hei-image-upload-lbl {
  /* display: flex;  */
  /*justify-content: space-between; */
  list-style-type: none;
}
#hei-image-upload-lbl {
  border: 1px solid black;
  margin-bottom: 6px;
  background: #f6f8f9;
  border-radius: 8px;
  padding: 2px;
}

#hei-img {
  margin-top: 10px;
}

#hei-form p {
  line-height: 20px;
  padding-left: 10px;
}

#hei-form label,
#hei-form button {
  background-color: #7f9ccb;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px ridge black;
  font-size: 0.8rem;
  height: auto;
}

#hei-form label:hover,
#hei-form button:hover {
  background-color: #2d5ba3;
  color: white;
}

#hei-form label:active,
#hei-form button:active {
  background-color: #0d3f8f;
  color: white;
}

/* could have leading #hei-form */
canvas {
  position: absolute;
}
#userInterface {
  z-index: 3;
}
#machineMarks {
  z-index: 2;
}
#backgroundForm {
  z-index: 1;
}

/* End Support exam key and exams scanning/editing */

.correct-answer {
  background-color: #4caf50;
}

#heir-tb1, #heir-tb2, #heir-tb3, #heir-tb4 {
  width: 4em;
}

.heir-buttons {
  float: right;
}

#test-display {
  width: 400px;
}

.our-school {
  background-color: lightyellow !important;

}

.an-answer {
  background-color: #4caf50 !important;
}