/**
Place all your Mathtutor specific CSS in this file
All global CTAT tutor CSS definitions can be found in CTAT.css
**/

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

/*--------------------------------------------------*\
  #General
\*--------------------------------------------------*/

* {
  box-sizing: inherit;
}

html, body {
  box-sizing: border-box;
  margin: 0px;
  height: 100%;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  hyphens: auto;
}

h1, h2, h3 {
  position: absolute;
  margin: -1px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
h4 {
  margin: 0;
  font-size: 14px;
}
h5 {
  margin: 0;
  font-size: 13px;
}

/*--------------------------------------------------*\
  #Tables
\*--------------------------------------------------*/

table {
  width: 100%;
  border-collapse: collapse;
  font-size: inherit;
}
caption {
  margin: 10px;
  text-align: center;
  font-weight: bold;
}
thead td {
  border: none;
}
thead tr:first-child {
  background: #99CCFF;
}
thead tr:nth-child(2) {
  background: #88CC44;
}
thead tr:nth-child(3) {
  background: gold;
}
thead tr:first-child th {
  height: 32px;
  font-weight: bold;
}
td, th {
  border: 2px inset;
  box-sizing: border-box;
  height: 25px;
  padding: 0;
  text-align: center;
  font-weight: normal;
}
@media (max-width: 460px) {
  td, th {
    word-break: break-word;
  }
}
th[scope="row"] {
  border: none;
  padding: 0 5px;
  background: white;
  text-align: right;
  font-weight: bold;
}
th > .CTATTextInput, td > .CTATTextInput {
  width: 100%;
  height: 100%;
}
th > .CTATTextInput input, td > .CTATTextInput input {
  border: none;
  background-color: white;
}
.CTATTextInput.CTATCalculatorInput {
  width: calc(100% - 20px);
}
.CTATCalculator {
  position: relative;
  border: none;
  padding: 0px;
  vertical-align: text-bottom;
  display: inline-block;
  cursor: pointer;
  background: transparent;
}
.CTATCalculator::before {
  content: "";
  display: none;
  position: absolute;
  right: 0px;
  bottom: 20px;
  width: 178px;
  height: 87px;
  background: url('calc_msg.png') left center;
}
.CTATCalculator:hover::before, .CTATCalculator:focus::before, .CTATCalculator:active::before {
  display: block;
}
.CTATCalculator {
  margin-right: 3px;
  width: 12px;
  height: 16px;
  background: center / contain no-repeat url('calc.png');
}

/*--------------------------------------------------*\
  #CTAT Tutor Panels
\*--------------------------------------------------*/

.CTATTutor {
  margin: 0 auto;
  width: 100%;
  min-width: 320px;
  max-width: 1000px;
  height: 100%;
  min-height: 600px;
  display: flex;
  flex-flow: column;
  overflow-x: auto;
}
@media (max-width: 900px) and (max-height: 460px), (max-width: 460px) and (max-height: 900px) {
  .CTATTutor {
    min-height: auto;
  }
}
aside.CTATTutor {
  position: fixed;
}
.CTATProblemSolving {
  margin: 0 auto;
  padding: 5px;
  flex: none;
  min-height: 454px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
@media (max-width: 900px) and (max-height: 460px), (max-width: 460px) and (max-height: 900px) {
  .CTATProblemSolving {
    min-height: auto;
    padding: 3px;
    gap: 6px;
  }
}
.CTATProblem, .CTATSolution {
  border: none;
  border-radius: 5px;
  min-width: 390px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 900px) and (max-height: 460px), (max-width: 460px) and (max-height: 900px) {
  .CTATProblem, .CTATSolution {
    min-width: 300px;
  }
}
.third, .third .CTATProblem, .third .CTATSolution {
  flex: 1;
  min-width: 260px;
}
.twothirds, .twothirds .CTATProblem, .twothirds .CTATSolution {
  flex: 2;
  min-width: 520px;
}
.twofifths, .twofifths .CTATProblem, .twofifths .CTATSolution {
  flex: 2;
  min-width: 312px;
}
.threefifths, .threefifths .CTATProblem, .threefifths .CTATSolution {
  flex: 3;
  min-width: 468px;
}
@media (max-width: 800px) {
  .third, .twothirds, .twofifths, .threefifths {
    flex: 1;
    min-width: 390px;
  }
}
@media (max-width: 460px) {
  .third, .twothirds, .twofifths, .threefifths {
    flex: 1;
    min-width: 300px;
  }
}
.CTATProblem > * + div, .CTATSolution > * + div, .CTATSolution > * + table, li + li {
  margin-top: 8px;
}

/*--------------------------------------------------*\
  #CTAT Tools
\*--------------------------------------------------*/

.CTATTools {
  height: auto;
  padding: 1px;
  flex: none;
  display: flex;
  flex-wrap: wrap;
}
.CTATTools section {
  border: none;
  flex: 1;
  display: flex;
}
.CTATButtons {
  margin: 2px;
  height: 140px;
  display: flex;
  flex-flow: column;
  justify-content: space-between;
}
@media (max-width: 460px) and (max-height: 900px), (max-width: 900px) and (max-height: 460px) {
  .CTATButtons {
    height: 104px;
  }
}
@media (max-width: 900px) and (max-height: 460px) {
  .CTATHintWindow,
  .CTATSkillWindow {
    height: 104px;
  }
}
@media (max-width: 561px) {
  .CTATHintWindow,
  .CTATSkillWindow {
    height: auto;
  }
}
.CTATDoneButton {
  order: 2;
}
/*--------------------------------------------------*\
  #CTAT Components
\*--------------------------------------------------*/

.CTATTextInput, .CTATNumericStepper {
  text-align: center;
}
.CTATImageButton img {
  max-height: 400px;
  object-fit: contain;
}
input:disabled {
  color: black;
}

/*--------------------------------------------------*\
  #CTAT button icon font
\*--------------------------------------------------*/

.CTAT-hint-button--icon, .CTAT-instructions-button--icon, .CTAT-done-button--icon, .CTAT-start-button--icon, .CTAT-back-button--icon {
  font-family: 'Varela Round', sans-serif;
}
@media (max-width: 460px) and (max-height: 900px), (max-width: 900px) and (max-height: 460px) {
  .CTAT-hint-button--icon, .CTAT-done-button--icon {
    top: -2px;
    font-size: 32px;
  }
}

/*--------------------------------------------------*\
  #CTAT button size
\*--------------------------------------------------*/

.CTATBackButton, .CTATStartButton, .CTATInstructionsButton {
  width: 68px;
  height: 68px;
}
@media (max-width: 460px) and (max-height: 900px), (max-width: 900px) and (max-height: 460px) {
  .CTATHintButton, .CTATDoneButton, .CTATBackButton, .CTATStartButton, .CTATInstructionsButton {
    width: 50px;
    height: 50px;
  }
}

/*--------------------------------------------------*\
  #CTAT Instructions Button
\*--------------------------------------------------*/

.CTATInstructionsButton {
  font: 15px Helvetica Neue, Helvetica, Arial, sans-serif;
}
.CTAT-instructions-button {
  border: 1px solid;
  border-radius: 5px;
  border-color: steelblue;
  overflow: hidden;
  width: inherit;
  height: inherit;
  padding: 0;
  background-color: #99CCFF;
  font: inherit;
  cursor: pointer;
}
.CTAT-instructions-button:disabled {
  border: 1px solid darkgrey;
  background-color: #EDEDED;
  color: #9A9A9A;
  cursor: default;
}
.CTAT-instructions-button--icon {
  position: relative;
  top: -5px;
  height: 60%;
  font-size: 44px;
  font-weight: bold;
  pointer-events: none;
}
.CTAT-instructions-button--text {
  font-size: 12px;
}

/*--------------------------------------------------*\
  #CTAT Start Button
\*--------------------------------------------------*/

.CTATStartButton {
  font: 15px Helvetica Neue, Helvetica, Arial, sans-serif;
}
.CTAT-start-button {
  border: 1px solid;
  border-radius: 5px;
  border-color: green;
  width: inherit;
  height: inherit;
  padding: 0;
  overflow: hidden;
  background-color: #88CC44;
  font: inherit;
  cursor: pointer;
}
.CTAT-start-button--icon {
  position: relative;
  top: -5px;
  height: 60%;
  font-size: 44px;
  font-weight: bold;
  pointer-events: none;
}

/*--------------------------------------------------*\
  #CTAT Back Button
\*--------------------------------------------------*/

.CTATBackButton {
  display: none;
  font: 15px Helvetica Neue, Helvetica, Arial, sans-serif;
}
.CTAT-back-button {
  border: 1px solid;
  border-radius: 5px;
  border-color: steelblue;
  width: inherit;
  height: inherit;
  padding: 0;
  overflow: hidden;
  background-color: #99CCFF;
  font: inherit;
  cursor: pointer;
}
.CTAT-back-button--icon {
  position: relative;
  top: -5px;
  height: 60%;
  font-size: 44px;
  font-weight: bold;
  pointer-events: none;
  transform: rotate(180deg) translateY(-13px);
}

/*-----------------------------------------------------*\
  #CTAT Instructions Window
\*-----------------------------------------------------*/

.CTATInstructionsWindow {
  margin: 2px;
  border: 1px solid mediumblue;
  border-radius: 5px;
  padding: 5px;
  flex: auto;
  background-color: #99CCFF;
}
.CTATInstructionsItem {
  margin: 5px;
  display: flex;
}
.CTATInstructionsBullet {
  border: 1px solid;
  border-radius: 11px;
  width: 22px;
  height: 22px;
  flex: none;
  background-color: #99CCFF;
  text-align: center;
  font-size: 16px;
  line-height: 22px;
}
.CTATInstructionsText {
  margin-left: 5px;
  flex: auto;
}
