:root {
  --bs-primary: #262469;
  --bs-secondary: #1172ba;
  --bs-success: #9bcb3c;
  --bs-info: #70cddd;
  --bs-warning: #faa31b;
}

body {
  background-color: #fdfbf5;
  line-height: 1.1;
}

@media (min-width: 1280px) {
  body {
    line-height: 1.3;
  }
}

@media (min-width: 1440px) {
  body {
    line-height: 1.5;
  }
}

.form-signin,
.form-disclaimer {
  background-color: white;
  padding: clamp(0.25rem, -0.607rem + 1.786vw, 1rem)
    clamp(0.5rem, -1.214rem + 3.571vw, 2rem);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 1, 16, 0.05);
}

.container,
.container-fluid {
  margin: clamp(0.5rem, -0.7308rem + 1.9231vw, 1rem);
  margin-inline: auto;
  padding: clamp(0.25rem, -0.607rem + 1.786vw, 1rem)
    clamp(0.5rem, -1.214rem + 3.571vw, 2rem);
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 1, 16, 0.05);
}

/* Headings and Nav Links */

h1,
h2,
h3,
h4,
h5,
h6,
.dropdown-item {
  font-family: var(--bs-font-sans-serif);
  color: var(--bs-primary);
}

a,
p,
ul,
li {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
}

h1,
h2 {
  font-size: clamp(1.5rem, 0.2692rem + 1.9231vw, 2rem);
}

.navbar-brand.smaat-navbar {
  color: var(--bs-primary);
  font-size: clamp(0.875rem, 0.5673rem + 0.4808vw, 1rem);
}
.navbar-brand.smaat-navbar:hover {
  color: var(--bs-primary);
  cursor: default;
}

/* Navbar (Recorder) */

#navbarNav {
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
  letter-spacing: 1.5%;
  transition: color 300ms ease-in-out;
}

.nav-item.active {
  font-weight: bold;
}

li.nav-item.active a {
  color: var(--bs-primary) !important;
  letter-spacing: 0%;
}

#navbarNav > ul a.nav-link,
#navbarNav a.disabled {
  color: var(--bs-primary);
  transition: color 300ms ease-in-out;
}
#navbarNav > ul a.nav-link:hover {
  color: var(--bs-secondary);
}
#navbarNav > div > a.nav-link {
  background-color: white;
  color: var(--bs-primary);
  border: solid 1px var(--bs-primary);
  border-radius: 0.25rem;
  transition: all 300ms ease-in-out;
}
#navbarNav > div > a.nav-link::before {
  content: "←";
  padding-right: 0.25rem;
}
#navbarNav > div > a.nav-link:hover {
  background-color: var(--bs-primary);
  color: white;
}

.nav-item:has(+ .nav-item.dropdown) > .nav-link {
  padding-right: 0;
}
ul.navbar-nav > li.nav-item > .dropdown-menu {
  right: 0;
  left: auto;
}
#navbarNav a.disabled {
  border: solid 1px var(--bs-secondary);
  border-radius: 5rem;
  background-color: color-mix(in srgb, var(--bs-secondary) 6%, transparent);
  padding: 0.25rem 0.5rem;
  text-align: center;
  margin-right: 0.25rem;
}

.navbar.navbar-expand-lg.navbar-light.bg-light {
  background-color: white !important;
  background: none;
  padding: 0.5rem 1rem 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
}

.navbar.navbar-expand-lg.navbar-light.bg-light::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background-image: url("../images/SMAAT_30x30_no_text.jpg");
  background-size: contain;
  background-repeat: no-repeat;
  margin-left: 0.5rem;
}

a .navbar.navbar-expand-lg.navbar-light.bg-light {
  background-color: white !important;
  background: none;
  padding: 1.5rem 0.5rem 0.5rem;
}

.input-group-text,
.form-control:disabled,
.form-control[readonly] {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
  background-color: #26246907;
}

input,
input.form-control,
select,
select.form-select {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
}

/* Buttons */

.btn {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
}

.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled {
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}
.btn-primary:hover {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-check:active + .btn-primary,
.btn-check:checked + .btn-primary,
.btn-primary.active,
.btn-primary:active,
.show > .btn-primary.dropdown-toggle,
.btn-check:focus + .btn-primary,
.btn-primary:focus {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}
.btn-outline-primary {
  color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

.btn-check:active + .btn-outline-primary,
.btn-check:checked + .btn-outline-primary,
.btn-outline-primary.active,
.btn-outline-primary.dropdown-toggle.show,
.btn-outline-primary:active,
.btn-outline-primary:hover {
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

/* Preview */
/* Canvas colour changes in main_images.js */
#previewAudioCanvas {
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  border: solid 1px var(--bs-secondary);
}

#previewAudioReplayIndicator {
  top: 30%;
}

#previewVideoReplayIndicator {
  left: -120px;
}

#previewVideoReplayIndicator span,
#previewAudioReplayIndicator span {
  font-family: var(--bs-font-sans-serif);
  background-color: color-mix(in srgb, var(--bs-warning) 70%, transparent);
  border: solid 1px var(--bs-warning);
  color: var(--bs-primary);
  padding: 0.5rem 1rem;
  margin-right: 2.5rem;
  border-radius: 8px;
  font-size: 1.125rem;
}

#previewVideoContainer {
  max-height: 60vh;
  width: calc(16 / 9 * 60vh);
  margin-inline: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

#previewVideoContainer video {
  border-radius: 12px;
}

#previewVideoContainer,
#playVideoModalVideo {
  border-radius: 12px;
}

#calibrationVideoInformation {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
}

.col:has(#calibrationVideoInformation) {
  margin-top: 0.375rem;
}

.progress-bar {
  background-color: var(--bs-primary);
}

/* Wordset */

.container-fluid,
:is(
    #AboutTab,
    #MandibularTab,
    #LabialFacialTab,
    #LingualTab,
    #SequencedMovementTab,
    #PhrasesTab,
    #SummaryTab,
    #SetupTab
  )
  .container {
  width: calc(100% - clamp(1rem, -2.429rem + 7.143vw, 4rem));
}

.image-row {
  height: calc(100vh - 230px - 6rem);
}

#questionText {
  font-family: var(--bs-font-sans-serif);
}

#questionAudioAmplitude {
  border-radius: 0.25rem;
}

.btn.prevQuestion,
.btn.repeatQuestion,
.btn.replayQuestion,
.btn.nextQuestion {
  height: clamp(1.75rem, 0.2115rem + 2.4038vw, 2.375rem);
}

/* Radio Button change */
.form-check-input[type="radio"]:is(
    [name^="summary"],
    [name^="responses"],
    [name^="phonetic"],

  ) {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-check {
  padding-left: 0;
  margin-bottom: 0.25rem;
}

.form-check.form-check-inline {
  margin-right: 0 !important;
}

.form-check-input[type="radio"]:is(
    [name^="summary"],
    [name^="responses"],
    [name^="phonetic"]
  )
  + .form-check-label {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  min-height: 24px;
  min-width: 42px;
  text-align: center;
  background-color: color-mix(in srgb, var(--bs-info) 0%, transparent);
  border: 1px solid var(--bs-info);
  border-radius: 0.25rem;
  cursor: pointer;
  font-family: var(--bs-font-sans-serif);
  font-size: 0.65rem;
  text-transform: uppercase;
  user-select: none;
  transition:
    background-color 0.15s ease-in-out,
    color 0.15s ease-in-out;
}

.form-check-input[type="radio"]:is(
    [name^="summary"],
    [name^="responses"],
    [name^="phonetic"]
  )
  + .form-check-label:hover {
  background-color: color-mix(in srgb, var(--bs-info) 25%, transparent);
}

.form-check-input[type="radio"]:is(
    [name^="summary"],
    [name^="responses"],
    [name^="phonetic"]
  ):checked
  + .form-check-label {
  background-color: color-mix(in srgb, var(--bs-info) 70%, transparent);
  color: var(--bs-primary);
  font-weight: bold;
  border-color: var(--bs-info);
}

.form-check-input[type="radio"]:is(
    [name^="summary"],
    [name^="responses"],
    [name^="phonetic"]
  ):focus
  + .form-check-label {
  box-shadow: 0 0 0 0.1rem rgba(13, 110, 253, 0.1);
}

.form-check-inline + span,
#singleVideoDetails span,
.form-check-label span,
.speechVideoControls div span,
#score div label {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
}

/* Tables */
.table {
  --bs-table-striped-bg: color-mix(
    in srgb,
    var(--bs-secondary) 4%,
    transparent
  );
}

tbody,
td,
tfoot,
th,
thead,
tr {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
}

#SummaryTab td > button.btn-primary {
  background-color: color-mix(in srgb, var(--bs-primary) 0%, transparent);
  color: var(--bs-primary);
  transition: background-color 300ms ease-in-out;
}
#SummaryTab td > button.btn-primary::before {
  content: "▶︎";
  padding-right: 0.25rem;
}
#SummaryTab td > button.btn-primary:hover {
  background-color: color-mix(in srgb, var(--bs-primary) 7%, transparent);
}

/* Scorer */
/* .container:has(.prev-next-question-row) {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 6rem);
}
.container:has(.prev-next-question-row) .row:nth-child(2) {
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

.prev-next-question-row {
  flex-shrink: 0;
  padding: 0.5rem 0 0;
  background-color: #ffffff;
  border-top: 1px solid #e9ecef;
  box-shadow: 0 -4px 12px rgba(0, 1, 16, 0.05);
}

.row.prev-next-question-row {
  margin-top: 0;
  margin-bottom: 0;
} */

/* :is(
  #MandibularTab,
  #LabialFacialTab,
  #LingualTab,
  #SequencedMovementTab,
  #PhrasesTab
) {
  position: relative;
  height: calc(100vh - 3.3rem);
  overflow: hidden;
}

:is(
    #MandibularTab,
    #LabialFacialTab,
    #LingualTab,
    #SequencedMovementTab,
    #PhrasesTab
  )
  .container {
  height: calc(100vh - 9rem);
  overflow-y: auto;
  position: static;
}

.prev-next-question-row {
  position: absolute;
  bottom: 0;
  left: clamp(0.5rem, -0.7308rem + 1.9231vw, 1rem);
  right: clamp(0.5rem, -0.7308rem + 1.9231vw, 1rem);
  background-color: white;
  border-radius: 16px;
  padding: 1rem clamp(0.5rem, -1.214rem + 3.571vw, 2rem);
  z-index: 10;
}

.row.prev-next-question-row {
  margin-top: 0;
  margin-bottom: 0;
} */

.row.prev-next-question-row {
  align-items: center;
  margin-bottom: 0.5rem;
}

.speechVideo {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-top: solid 1px #e9ecef;
}

.progress:has(.speechVideoProgressBar) {
  border-radius: 0;
}

.speechVideoControls {
  align-items: center;
  margin-left: 0;
  margin-right: 0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom: solid 1px #e9ecef;
  background-color: color-mix(in srgb, var(--bs-secondary) 4%, transparent);
  box-shadow: 0 12px 32px rgba(0, 1, 16, 0.05);
}

.speechVideoControls div:nth-child(5) {
  flex: 0 0 auto;
  width: 19%;
}

.speechVideoControls div:nth-child(7) {
  flex: 0 0 auto;
  width: 23%;
}

.speechVideo,
.speechVideoControls,
.progress:has(.speechVideoProgressBar) {
  border-inline: solid 1px #e9ecef;
}

:is(
    #MandibularTab,
    #LabialFacialTab,
    #LingualTab,
    #SequencedMovementTab,
    #PhrasesTab
  )
  .container
  span,
.comments > textarea {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
}

.phoneticTranscription > textarea {
  font-size: clamp(0.625rem, 0.0096rem + 0.9615vw, 0.875rem);
}

:is(
    #MandibularTab,
    #LabialFacialTab,
    #LingualTab,
    #SequencedMovementTab,
    #PhrasesTab
  )
  .container
  h1 {
  padding-bottom: clamp(0.25rem, -1.442rem + 2.644vw, 0.938rem);
}

:is(
    #MandibularTab,
    #LabialFacialTab,
    #LingualTab,
    #SequencedMovementTab,
    #PhrasesTab
  )
  .container
  h3 {
  font-family: var(--bs-font-sans-serif);
  font-size: clamp(1.25rem, 0.6346rem + 0.9615vw, 1.5rem);
}

span:has(+ div.input-group.phoneticTranscription) {
  letter-spacing: -1%;
}

div.input-group.phoneticTranscription {
  margin-top: 0.25rem;
}

.speechVideoControls div:nth-child(1) a img,
.speechVideoControls div:nth-child(2) a img,
.speechVideoControls div:nth-child(3) a img {
  display: none;
}
.speechVideoControls div:nth-child(1) a,
.speechVideoControls div:nth-child(2) a,
.speechVideoControls div:nth-child(3) a {
  text-decoration: none;
}
.speechVideoControls div:nth-child(1) a::after {
  content: "⏯\FE0E";
  color: black;
  font-size: 2rem;
}
.speechVideoControls div:nth-child(2) a::after {
  content: "\⏮\FE0E";
  color: black;
  font-size: 2rem;
}
.speechVideoControls div:nth-child(3) .loopIcon::after {
  content: "🔁︎\FE0E";
  color: black;
  font-size: 1.1rem;
}

.speechVideoControls.row {
  align-items: center;
  flex-wrap: nowrap;
}

.speechVideoControls > div[class*="col"] {
  flex: 0 0 auto;
  width: auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.speechVideoControls > div:nth-child(1) {
  margin-left: 0.5rem;
}

.speechVideoControls > div:nth-child(-n + 3) {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.speechVideoControls > div:nth-child(4) {
  margin-left: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.speechVideoControls > div:nth-child(5) {
  margin-left: 1rem;
  padding-right: 0.25rem;
}
.speechVideoControls > div:nth-child(6) {
  padding-left: 0;
}

.speechVideoControls > div:nth-child(7) {
  margin-left: auto;
}

.kinematicPlots div h3.mb-0 + div.d-flex.gap-3 {
  gap: 2rem !important;
}

.kinematicPlots div div {
  margin-bottom: 0.25rem !important;
}

.form-check-input {
  margin-top: 0.4em;
}

.form-check-input:checked,
input#accept_disclaimer:checked {
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}
.kinematicPlots .carousel-inner > .carousel-item > img {
  height: clamp(290px, 4.279rem + 21.635vw, 380px);
}
#legendImageMandibular {
  width: clamp(100px, -1.442rem + 12.019vw, 150px) !important;
}
