body {
  font-size: 20px;
  min-height: 100vh;
}

#question-sidebar {
  position: fixed;
  top: 65px;
  font-size: 0.9rem;
  bottom: 54px;
  left: 0;
  padding-top: 20px;
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
  overflow-y: auto;
  width: 140px;
}

.question-list .list-group-item {
  cursor: pointer;
  border-radius: 0;
  position: relative;
}

.question-list li:nth-child(odd) {
  background: #e8e8e8;
}

.dark-mode #question-text table tr:nth-child(odd) {
  background-color: #101010;
}

.question-list .list-group-item.active {
  background-color: #403f3f;
  border-color: unset;
}

/* Question status indicators */
.question-list .list-group-item.question-unanswered::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #dc3545;
  font-weight: bold;
  font-size: 1.2em;
}

.question-list .list-group-item.question-answered::before {
  content: "✓";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #198754;
  font-weight: bold;
  font-size: 0.9em;
}

/* Dark mode adjustments for question indicators */
.dark-mode .question-list .list-group-item.question-unanswered::before {
  color: #ff6b6b;
}

.dark-mode .question-list .list-group-item.question-answered::before {
  color: #51cf66;
}

/* Adjust padding to make room for the indicator */
.question-list .list-group-item {
  padding-left: 20px !important;
}

.question-container {
  margin-left: 16.66666667%;
  /* Width of the sidebar */
  padding-top: 20px;
  padding-bottom: 80px;
  /* To avoid overlap with footer */
}

.footer {
  z-index: 1030;
  /* To be above other elements */
}

.dark-mode {
  background-color: #222;
  color: #f8f9fa;
}

.dark-mode .navbar {
  background-color: #000 !important;
}

.dark-mode #question-sidebar {
  background-color: #333;
  border-right: 1px solid #444;
}

.dark-mode .list-group-item {
  background-color: #333;
  color: #f8f9fa;
  border-color: #444;
}

.dark-mode .list-group-item.active {
  /* color: white; */
  background-color: #173777 !important;
}

.dark-mode .question-list li:nth-child(odd) {
  background: #191818;
}

.dark-mode .footer {
  background-color: #000 !important;
}

.timer {
  font-size: 2rem;
  font-weight: bold;
}

#question-content {
  margin-top: 20px;
  margin-bottom: 0px;
  /* font-size: 1.2rem; */
  line-height: 1.75;
}

#question-window {
  padding-bottom: 5rem;
}

#answer-options {
  margin-top: 20px;
  margin-bottom: 20px;
  /* font-size: 1.2rem; */
}

#answer-options div {
  margin-bottom: 0.8rem;
}

.answer-button {
  margin-top: 10px;
  margin-bottom: 10px;
}

.font-size-buttons {
  position: absolute;
  right: 15px;
  top: 15px;
}

.font-size-buttons button {
  margin-left: 5px;
}

.modal-dialog.modal-bottom-right {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
}

.modal.fade .modal-dialog.modal-bottom-right {
  transform: translate(100%, 100%);
}

.modal.show .modal-dialog.modal-bottom-right {
  transform: translate(0, 0);
}

.modal-header {
  cursor: move;
}

.tool-card {
  z-index: 1056;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.tool-card .card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
}

.tool-card .card-body textarea.form-control {
  flex-grow: 1;
  resize: none;
}

.tool-card .card-header {
  cursor: move;
}

#question-number {
  display: inline-block;
  min-width: 2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#total-questions,
#time-left {
  font-variant-numeric: tabular-nums;
}

#pause-btn {
  min-width: 90px;
  text-align: center;
}

#zoomed-image-target[style*="scale(1)"] {
  cursor: default;
}

#zoomed-image-target:not([style*="scale(1)"]) {
  cursor: grab;
}

#lab-values-content .tab-content {
  overflow-y: auto;
  font-size: 1rem;
  flex-grow: 1;
}

#lab-tabs {
  font-size: 1rem;
}

#lab-values-card .card-body {
  overflow-y: scroll;
}

#lab-values-card table .SI {
  display: none;
}

#lab-values-card.show-si table .refRange {
  display: none;
}

#lab-values-card.show-si table .SI {
  display: table-cell;
}

.bg-corporate {
  background-color: #004976;
}

.corporate-gradient {
  background: linear-gradient(#fcfcfc 30%, rgba(255, 255, 255, 0)),
    linear-gradient(rgba(255, 255, 255, 0), #d7dced 70%) 0 100%,
    linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)),
    linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2)) 0 100%;
}

.exam-locked {
  filter: blur(5px);
  pointer-events: none;
}

.exam-locked .modal {
  filter: none;
  pointer-events: auto;
}

.exam-timeout {
  filter: blur(5px);
  pointer-events: none;
}

.exam-timeout .modal {
  filter: none;
  pointer-events: auto;
}

#exam-locked-modal {
  z-index: 1070;
}

#exam-locked-modal .modal-dialog {
  z-index: 1071;
}

.lock-icon {
  padding-right: 5px;
  height: 12px;
  width: 18px;
  vertical-align: baseline;
}

/* Calculator fixes */
#calculator-card {
  position: absolute;
  top: 100px;
  height: 408px;
  width: 297px;
}

/* #calculator-card #calculator table {
    margin: 0;
    padding: 0;
    border-spacing: 0;
    border-collapse: collapse;
}

#calculator-card #calculator p {
    margin: 0;
    padding: 0;
}

#calculator-card #calculator .box {
    margin: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem !important;
    height: auto !important;
    line-height: 1.5 !important;
}

#calculator-card #calculator #last_operation_history {
    margin: 0;
    margin-bottom: 0.5rem;
    font-size: 0.9rem !important;
    height: auto !important;
    line-height: 1.2 !important;
}

#calculator-card #calculator button {
    width: 3rem !important;
    height: 3rem !important;
    font-size: 1rem !important;
    margin: 0.1rem;
}

#calculator-card #calculator #equal_sign {
    width: calc(100% - 0.2rem) !important;
}

#calculator-card #calculator td {
    padding: 0;
    margin: 0;
    vertical-align: top;
} */

.answer-crossed-out {
  text-decoration: line-through;
  color: #999;
  border-radius: 4px;
}

.answer-crossed-out .form-check-label {
  text-decoration: line-through;
  color: #999;
}

/* Text highlighting styles */
.highlight-yellow {
  background-color: rgba(255, 255, 0, 0.4);
  border-radius: 2px;
}

.highlight-green {
  background-color: rgba(0, 255, 0, 0.3);
  border-radius: 2px;
}

.highlight-pink {
  background-color: rgba(255, 192, 203, 0.5);
  border-radius: 2px;
}

/* Dark mode adjustments for highlights */
.dark-mode .highlight-yellow {
  background-color: rgba(255, 255, 0, 0.6);
}

.dark-mode .highlight-green {
  background-color: rgba(0, 255, 0, 0.5);
}

.dark-mode .highlight-pink {
  background-color: rgba(255, 192, 203, 0.7);
}

/* Handle existing highlighting classes from imported HTML */
/* .itdhilite {
  background-color: rgba(255, 255, 0, 0.4);
  border-radius: 2px;
} */

/* Dark mode adjustments for existing highlighting */
/* .dark-mode .itdhilite {
  background-color: rgba(255, 255, 0, 0.6);
} */



#username-display {
  font-size: 0.9rem;
  opacity: 0.9;
  font-style: italic;
}

#username-text {
  font-weight: bold;
}

/* Review mode styles */
.correct-answer {
  background-color: #d4edda !important;
  border-color: #c3e6cb !important;
  border-radius: 5px;
  padding-left: 2rem;
}

.correct-answer .form-check-label {
  color: #155724 !important;
  font-weight: bold;
}

.incorrect-answer {
  background-color: #f8d7da !important;
  border-color: #f5c6cb !important;
  border-radius: 5px;
  padding-left: 2rem;
}

.incorrect-answer .form-check-label {
  color: #721c24 !important;
  font-weight: bold;
}

/* Dark mode review styles */
.dark-mode .correct-answer {
  background-color: #1e4d2b !important;
  border-color: #2d5a3d !important;
}

.dark-mode .correct-answer .form-check-label {
  color: #51cf66 !important;
}

.dark-mode .incorrect-answer {
  background-color: #4d1e1e !important;
  border-color: #5a2d2d !important;
}

.dark-mode .incorrect-answer .form-check-label {
  color: #ff6b6b !important;
}

/* Review controls styling */
#review-controls {
  margin-bottom: 1rem;
}

#review-controls .btn {
  font-size: 0.9rem;
  padding: 0.375rem 0.75rem;
}

/* Review controls in footer */
.footer #review-controls {
  margin-bottom: 0;
}

.footer #review-controls .btn {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
}

/* Answer explanation card styling */
#answer-explanation-card {
  position: fixed;
  top: 80vh;
  left: 40px;
  min-height: 50px;
  z-index: 1056;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#answer-explanation-card .card-body {
  overflow-y: auto;
}

#answer-explanation-content {
  line-height: 1.6;
}

#answer-explanation-content strong {
  color: #495057;
}

/* Dark mode adjustments for answer explanation */
.dark-mode #answer-explanation-content strong {
  color: #495057;
}

/* Review mode sidebar indicators */
.question-list .list-group-item.question-correct::before {
  content: "✓";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #198754;
  font-weight: bold;
  font-size: 0.9em;
}

.question-list .list-group-item.question-incorrect::before {
  content: "✗";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #dc3545;
  font-weight: bold;
  font-size: 0.9em;
}

/* Dark mode adjustments for review indicators */
.dark-mode .question-list .list-group-item.question-correct::before {
  color: #51cf66;
}

.dark-mode .question-list .list-group-item.question-incorrect::before {
  color: #ff6b6b;
}

.form-check-input:disabled ~ .form-check-label,
.form-check-input[disabled] ~ .form-check-label {
  opacity: 0.8;
}

.user-selected::after {
  content: "💖(´▽｀)";
  opacity: 0.7;
}

.user-ignored::after {
  content: "(´。＿。｀)";
  opacity: 0.7;
}

.user-incorrect::after {
  content: '(¬_¬")';
  opacity: 0.7;
}
