:root {
  --ab-outline-thickness: 2px;
  --ab-outline-color: #DBD8E5;
  --ab-hover-outline-color: #2B2438;
  --ab-selected-outline-thickness: 3px;
  --ab-selected-background: #D8F0FA;
  --ab-selected-outline-color: #3CB4E5;
  --ab-correct-background: #E5F4DE;
  --ab-correct-outline-color: #7BC65A;
  --ab-incorrect-background: #FFE5EA;
  --ab-incorrect-outline-color: #FF849B;
  --ab-background-color: #EBF7FC;
  --ab-text-color: #2B2438;
}

@media screen {
  .print-only { display:none; }
}

@media print {
  .screen-only {display: none; }
}

/*========================================= 
Animations for selectable elements 
==========================================*/ 	

@keyframes highlightOnHover { 
 /*from { 
   -webkit-box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
   -moz-box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
   box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
 } 
 to { 
   -webkit-box-shadow: 0px 0px 0px 2px #008CC8, 0px 6px 0px -1px rgba(128,128,128,.15);
   -moz-box-shadow: 0px 0px 0px 2px #008CC8, 0px 6px 0px -1px rgba(128,128,128,.15);
   box-shadow: 0px 0px 0px 2px #008CC8, 0px 6px 0px -1px rgba(128,128,128,.15);
 } */
  from {  
   outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
 } 
 to {  
   outline: var(--ab-outline-thickness) solid var(--ab-hover-outline-color);
 } 
} 

@keyframes highlightSelectedOnHover { 
  from {  
    outline: var(--ab-selected-outline-thickness) solid var(--ab-selected-outline-color);
    background: var(--ab-selected-background);
  } 
  to {  
    outline: var(--ab-selected-outline-thickness) solid var(--ab-hover-outline-color);
    background: var(--ab-selected-background);
  }
} 
 
@keyframes fillOnSelect { 
 from { 
   background-color: #ffffff; 
   outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
 } 
 to { 
   background-color: var(--ab-selected-background); 
   outline: 3px solid var(--ab-selected-outline-color);
 } 
} 

/*=========================================
MATCHLIST Module Styles
==========================================*/

@media (max-width: 768px) {
  .answerblock[data-type="matchlist"] {
    width: 100%;
    overflow-x: auto;
  }
}

.ml-list-container {
  margin-top: 20px;
}

.ml-source-list, .ml-target-list {
  border: 2px solid transparent;
  border-radius: 6px;
}

.ml-source-list div, .ml-target-list div {
  margin-top: 15px;
  margin-bottom: 30px;
  max-width:300px;
}

.ml-source-item {
  z-index: 11;
}

.ml-target-item {
  z-index: 11;
}

.ml-source-item:not(.ml-selected):hover, .ml-target-item:not(.ml-selected):hover {
  animation-name: highlightOnHover; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 100ms; 
}

.ml-target-item:not(.ml-selected):hover, .ml-target-item:not(.ml-selected):focus-visible {
  animation-name: highlightOnHover; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 100ms; 
}

.ml-selected {
  animation-name: fillOnSelect; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 300ms;
}

/*.ml-selected:hover, .ml-selected:focus-visible {
  animation-name: highlightSelectedOnHover; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 100ms; 
}*/

.ml-connect-line:hover {
  cursor: pointer;
  background-color: red !important;
}

.ml-left-dot {
  position: absolute;
  left:-5px;
  top:0px;
  font-size: 13px;
  color: #209CD0;
}

.ml-right-dot {
  position: absolute;
  right:-5px;
  top:0px;
  font-size: 13px;
  color: #209CD0;
}

.ml-inst-text {
  font-size: .7em;
  color:#9c9c9c;
  padding:0px;
  padding-left: 13px;
  margin: 0px;
  height: 15px;
}

.ml-select-text {

}

.ml-select-matching-text {
  display: none;
}

.ml-list-title {
  font-weight: bold;
}

/* wrapper for the whole thing */
.matchlists_wrapper {
  min-width:200px;
  border: 0px solid #ff0000;
  overflow: hidden;
  margin: .5rem 0;
  display: flex;
  justify-content: space-between;
}

/* div to hold the draggable components (source) */
.matchlists_source {
  width:45%;
}

/* div to hold the droppable targets (target) */
.matchlists_target {
  width:45%;
}

/* individual draggable items (left) */

.matchlist_drag_item {
  font-family: Arial;
  font-size: 14px;
  font-weight: bold;
  padding: 9px;
  margin: 4px;
  border-radius: .5rem;
  -moz-border-radius: .5rem;
  -webkit-border-radius: .5rem;
  z-index: 300;
  cursor: pointer;
  text-indent:0;
  border: 1px solid #bbb;
  -webkit-box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
  -moz-box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
  box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
}

/* individual droppable items (right) */
.matchlist_drop_item {
  font-family: Arial;
  font-size: 14px;
  font-weight: bold;
  padding: 9px;
  margin: 4px;
  position: relative;
  border-radius: .5rem;
  -moz-border-radius: .5rem;
  -webkit-border-radius: .5rem;
  text-indent:0;
  color: #3B3738;
  border: 1px solid #bbb;
  -webkit-box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
  -moz-box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
  box-shadow: 0px 4px 0px -1px rgba(128,128,128,.15);
}

.matchlist_drop_item_over {
  background-color: #FDF3E7;
}
.matchlist_item_dropped {
  background-color: #FDF3E7;
 }

/* individual droppable field within the droppable item */
.drop_field {
  border-radius: .5rem;
  -moz-border-radius: .5rem;
  -webkit-border-radius: .5rem;
  border: 1px solid #d0d0d0;
  min-height: 40px;
  /*position: absolute;
  right: 3px;
  top:30px;
  left:3px;
  bottom:3px;
  */
  padding: 9px;
  color: #3B3738;
}

.del_image {
  position: absolute;
  right:12px;
  bottom:8px;
  cursor: pointer;
}

.matchlist_drop_titles {
  text-indent:0;
}

/*=========================================
TEXTLINE Module Styles
==========================================*/

.textline {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 8px;
  border-radius: .5rem;
  -moz-border-radius: .5rem;
  -webkit-border-radius: .5rem;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  margin: 6px;
  color: var(--ab-text-color);
  background-color: var(--ab-background-color);
  outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
  border: none;
} 

.textline:hover, .textline:focus {
  animation-name: highlightOnHover; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 300ms;
}


.flat .textline {
  margin: 0;
  border-radius: 0rem;
  -moz-border-radius: 0rem;
  -webkit-border-radius: 0rem;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}

.readonly-textbox {
	outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
	border-radius: 8px;
	padding: 8px;
	display: inline-block;
  width: 100%;
}

.readonly-textbox.annotate-target { /*review mode only*/
	font-weight: bold;
}

.readonly-textbox.correct {
  background: var(--ab-correct-background) !important;
	outline: 3px solid var(--ab-correct-outline-color) !important;
  margin-left: 8px;
}

.readonly-textbox.incorrect {
  background: var(--ab-incorrect-background) !important;
	outline: 3px solid var(--ab-incorrect-outline-color) !important;
  margin-left: 8px;
}

/*=========================================
TEXTBLANK Module Styles
==========================================*/

.textblank {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;

padding: 0 8px;
border: none;
border-bottom: 2px solid #4b4b4b;
font-size: 15px;
font-weight: bold;
text-align: center;
margin: 6px;
color: #3B3738;
background-color: #FDF3E7;
background-color: rgba(0, 140, 200, 0.15);
}

/*=========================================
TEXTBOX Module Styles
==========================================*/

/*.textbox {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
padding: 8px;

border-radius: .5rem;
-moz-border-radius: .5rem;
-webkit-border-radius: .5rem;
border: 1px solid #d0d0d0;
font-size: 15px;
font-weight: bold;
text-align: left;
margin: 0 0 .5rem;
color: #3B3738;
background-color: #FDF3E7;

-webkit-box-shadow: 1px 2px 2px -1px rgba(128,128,128,1);
-moz-box-shadow: 1px 2px 2px -1px rgba(128,128,128,1);
box-shadow: 1px 2px 2px -1px rgba(128,128,128,1);
}*/

.textbox {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  padding: 8px;
  border-radius: .5rem;
  -moz-border-radius: .5rem;
  -webkit-border-radius: .5rem;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
  margin: 0 6px 1rem;
  color: var(--ab-text-color);
  background-color: var(--ab-background-color);
  outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
  border: none;
}

.flat .textbox {
  margin: 0;
  border-radius: 0rem;
  -moz-border-radius: 0rem;
  -webkit-border-radius: 0rem;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}

.q-ol .textbox,
.q-ul .textbox {
  margin: 0 6px 0;
}

/*=========================================
SINGLECHOICE Module Styles
==========================================*/

.singlechoice_wrapper {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
}

.singlechoice_item {
  border-radius: 16px;
  -moz-border-radius: 16px;
  -webkit-border-radius: 16px;
  display: block;
  padding: 9px;
  color: #2B2438;
  margin: .5rem;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  text-indent: 0px;
  outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
}

.singlechoice_item:not(.singlechoice_item_selected,
.ml-selected):hover,
.singlechoice_item:not(.singlechoice_item_selected,
.ml-selected):focus-visible { 
  animation-name: highlightOnHover; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 100ms; 
} 

.singlechoice_item_selected {
  animation-name: fillOnSelect; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 300ms; 
}

/* .singlechoice_item_selected:hover,
.singlechoice_item_selected:focus-visible { 
  animation-name: highlightSelectedOnHover; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 100ms; 
} */

.choice-vert-center .singlechoice_item > .item-content {
  position: relative;
  top: 50%;
  transform: translate(0px, -50%);
}

.singlechoice_item.correct {
  background: var(--ab-correct-background) !important;
  outline: 3px solid var(--ab-correct-outline-color) !important;
}

.singlechoice_item.incorrect {
  background: var(--ab-incorrect-background) !important;
  outline: 3px solid var(--ab-incorrect-outline-color) !important;
}

.answerblock .correct {
  position: relative;
}

.answerblock .correct::before {
  position: absolute;
  left: calc(100% - 20px);
  font-size: 12px !important;
  top: -10px;
  font: var(--fa-font-solid);
  content: "\f00c";
  background: var(--ab-correct-outline-color);
  border-radius: 8px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  text-indent: 0px;
}

.answerblock .incorrect {
  position: relative;
}

.answerblock .incorrect::before {
  position: absolute;
  left: calc(100% - 20px);
  font-size: 12px !important;
  top: -10px;
  content: "\f00d";
  font: var(--fa-font-solid);
  background: var(--ab-incorrect-outline-color);
  border-radius: 8px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  text-indent: 0px;
}

/*=========================================
DROPDOWN Module Styles
==========================================*/

.dropdown_wrapper {
  margin-top: 1px;
  margin-bottom: 0px;
  text-indent:0;
  line-height: 30px;
  border-radius: .5rem;
  padding: .5rem;
}

.dropdown_list {
  border-radius: .5rem;
  -moz-border-radius: .5rem;
  -webkit-border-radius: .5rem;
  display: block;
  padding: 8px;
  margin: 2px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  text-indent: 0px;
  color: var(--ab-text-color);
  background-color: var(--ab-background-color);
  outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
  border: none;
  opacity: 1;
}

.dropdown_list:hover {
  animation-name: highlightOnHover; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 100ms; 
}

.dropdown_list.item_selected {
  animation-name: fillOnSelect; 
  animation-fill-mode: forwards; 
  animation-timing-function: ease-out; 
  animation-duration: 300ms;
}

.dropdown_table  {
  border-collapse: collapse;
  border: 0px solid #d0d0d0;
}

.dropdown_table td {
  text-align: left;
  font-size: 14px;
  padding: 10px;
  border: 0px solid #d0d0d0;
}

.dropdown_wrapper.correct .dropdown_list {
  background: var(--ab-correct-background) !important;
  outline: 3px solid var(--ab-correct-outline-color) !important;
}

.dropdown_wrapper.incorrect .dropdown_list {
  background: var(--ab-incorrect-background) !important;
  outline: 3px solid var(--ab-incorrect-outline-color) !important;
}

.dropdown_wrapper.correct::before, .dropdown_wrapper.incorrect::before {
  top: 0px !important;
}

/*=========================================
MARKIMAGE Module Styles
==========================================*/

.markimage-reset-button {
  border-radius: 8px;
  padding: 3px;
  margin-right: 10px;
}

/*==================================*/

.prompt {
  margin: 20px;
}

.answerblock {
/*		overflow: hidden;
 clear: both;*/
}

.readonly-textbox {
  text-indent: 0px;
  min-height: 40px;
}

.center {
  margin: 0 auto;
  text-align: center;
}

button {
  padding: 4px;
  cursor: pointer;
}

/*=========================================
SELECTWORD Module Styles
==========================================*/

.selectword {
  font-size: 1.125rem;
  line-height: 2.5rem;
  word-spacing: .5rem;
  margin-top: 3rem;
}

.selectword.allwords {
  word-spacing: 0;
}

.selectword span {
  display: inline-block;
  border: 3px solid transparent;
}

.selectword.circle span,
.selectwords.circle span {
  border-radius: 50%;
}

.selectword span.selectable { cursor: pointer; padding: 0 .25rem; margin-bottom: 1rem; }
.selectword span.example { padding: 0 .25rem; }

.selectword.circle span.selectable:hover { border-color: var(--ab-outline-color); }
.selectword.circle span.selectable:active { border-color: var(--ab-hover-outline-color); }
.selectword.circle span.selected { 
  border-color: var(--ab-selected-outline-color);
  background: var(--ab-selected-background); 
}
.selectword.circle span.selected:hover { border-color: var(--ab-selected-outline-color); }
.selectword.circle span.example { border-color: #333; }
.selectword.circle span.correct { 
  border-color: var(--ab-correct-outline-color); 
  background: var(--ab-correct-background)
}
.selectword.circle span.incorrect { 
  border-color: var(--ab-incorrect-outline-color); 
  background: var(--ab-incorrect-background)
}
.selectword.circle span.incorrect::before, .selectword.circle span.correct::before { left: calc(50% - 10px); }

.katex-display { 
  font-size: 1.1em;
  padding: 15px;
  background-color: #e7e7e7;
  border-radius: 8px;
}

/*==============================================
SYMBOLSSINGLE and SYMBOLSWORKING Module Styles
==============================================*/

/* Mathlive adjustments for symbols */
:root {
  --keycap-max-width: 70px;
  --keycap-length: 70px;
  --keycap-height: 50px;
}

.delete-field {
  color: #5e5e5e;
  cursor: pointer;
  position: absolute;
  right: -15px;
  top: 2px;
}

.delete-field:hover {
  color: #ff0000;
}

.maths-add-working {
  border: none;
  width: 91px;
  text-align: center;
  padding: 4px 16px;
  border-radius: 41px;
  cursor: pointer;
  white-space: nowrap;
  background: #D7CAED;
  font-weight: 600;
  font-size: 14px;
}

.maths-add-working:hover {
  background-color:#C5B4E2;
}

/* for the \text command in katex */
.katex .text {
  font-family: arial;
  font-size: .9em;
}

/*
body {
 --keycap-height: 50px;
 --keycap-font-size: 18px;
 --keycap-shift-font-size: 9px;
 --keycap-small-font-size: 9px;
 --keycap-extra-small-font-size: 9px;
 --keyboard-toolbar-font-size: 10px;
 --keycap-gap: 1px;
}
*/

.toolbar_letters .ML__mathit {
  font-family: arial !important;
  font-style: normal !important;
}

.math-read-only {
  border: none;
  font-size: 1.1em;
  color: #004f71;
}

.math-block-separator {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  border-top: 1px solid var(--ab-outline-color) !important;
}

.math-block-separator-blank  {
  margin-top: 30px !important;
  margin-bottom: 0px !important;
  border-bottom: 1px solid var(--ab-outline-color) !important;
}

.math-block-single {
  /* margin-left: 5px;
  /*margin-top: 15px;*/
  /* margin-bottom: 5px;
  padding: 8px;
  padding-left: 15px;
  padding-right: 15px;
  text-align: center;
  border: 1px solid #ddd;
  display: inline-block;*/
  border-radius: 0.5rem;
  outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
  background: none;
  border: none;
  vertical-align: middle;
}

.answerblock math-field {
  border-radius: 0.5rem;
  outline: var(--ab-outline-thickness) solid var(--ab-outline-color);
  background: var(--ab-background-color);
  border: none;
}

.answerblock math-field.math-read-only {
  border-radius: 0.5rem;
  outline: none;
  background: none;
  border: none;
}

.answerblock math-field.math-read-only.math-block-single {
  border-radius: 0.5rem;
  outline: none;
  background: none;
  border: none;
}

.answerblock math-field:active, .answerblock math-field:focus {
  background: #fff;
  outline: 2px solid var(--ab-hover-outline-color);
}

.answerblock math-field::part(virtual-keyboard-toggle) {
  color: #371376 !important;
}

.answerblock math-field::part(virtual-keyboard-toggle):hover {
  color: #fff !important;
  background: #8771AC !important;
}

.math-block-single.correct {
  background: var(--ab-correct-background) !important;
  outline: 3px solid var(--ab-correct-outline-color) !important;
}

.math-block-single.incorrect {  
  background: var(--ab-incorrect-background) !important;
  outline: 3px solid var(--ab-incorrect-outline-color) !important;
}

.math-field-holder {
  position: relative;
  display: inline-block;
}

/* fix toolbars on small screens - full width tab list with copy/paste buttons above */
@media (max-width: 500px) {
  .ML__keyboard .MLK__toolbar {
    flex-wrap: wrap;
    flex-flow: column-reverse;
  }

  .MLK__toolbar .right, .MLK__toolbar .left {
    flex-basis: 100%;
  }

  .MLK__toolbar .right {
    margin: 0;
    justify-content: end;
  }

  .MLK__tex-math {
    flex: auto;
  }
}

/*========================
NUMERIC answerblock 
=========================*/

/* remove the increase / decrease arrows from the numeric box */

.answerblock input::-webkit-outer-spin-button,
.answerblock input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.answerblock input[type=number] {
  -moz-appearance: textfield;
  text-align: center;
}

.prefix-html { 
  display: inline-block !important;
  margin-left: 5px;
  margin-right: 5px;
}

.suffix-html { 
  display: inline-block !important;
  margin-left: 5px;
  margin-right: 5px;
}

math-field::part(menu-toggle) {
  display: none;
}

/*====================================
Extended feedback styles - TEST SHELL
======================================*/

.feedback {
  font-size: 0.9em;
}

.sourceTabContent .markscheme-gen-letter {
	font-weight: bold;
}

.sourceTabContent .correct-icon {
  color: black;
  width: 24px;
  height: 24px;
  background: #D7EECD;
  border-radius: 8px;
  line-height: 24px;
  text-align: center;
  margin-right: 10px;
  text-indent: 0;
}

.sourceTabContent .incorrect-icon {
  color: black;
  width: 24px;
  height: 24px;
  background: #F4D1DB;
  border-radius: 8px;
  line-height: 24px;
  text-align: center;
  margin-right: 10px;
  text-indent: 0;
}

.sourceTabContent .incorrect, .sourceTabContent .correct {
  border: 1px solid var(--ab-outline-color);
  padding: 12px;
  border-radius: 16px;
  text-indent: -64px;
  padding-left: 75px;
}

/*==================================
Extended feedback styles - TBOnline
===================================*/

.ai-feedback {
  max-width: 800px;
  padding: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  font-size: .9em;
}
    
.ai-feedback .incorrect {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 5px;
  border-radius: 5px;
  padding-left: 35px;
  text-indent: -29px;
}

.ai-feedback .correct {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 5px;
  border-radius: 5px;
  padding-left: 35px;
  text-indent: -29px;
}

.ai-feedback .latex {
  font: normal .9em KaTeX_Main, Times New Roman, serif !important;
}

.question-content audio {
  min-width: 300px;
  width: 300px;
  display: block;
}

.question-content audio::-webkit-media-controls {
  width: 300px;
}