:root {
  --color-primary: #dc6900;
  --color-hiker: #eb8d22;
  --color-mountaineer: #e23226;
  --color-task-force: #db536b;
}

body {
  display: grid;
  justify-items: center;
  height: 100%;
  background: lightgray;
  grid-template-rows: 1fr;
  padding: 0;
  background-image: url('/media/7876302b-e7d8-4852-aafb-8b43c6da9fef/MOUNTAINEER MODE BACKGROUND.png');
  background-size: cover;
  font-family: Arial;
}

#app {
  display: grid;
  height: max-content;
  min-height: 60vh;
  width: 80vw;
  max-width: 80vw;
  grid-template-rows: auto 1fr;
  --px: 5rem;
  --py: 2rem;
  padding: 0;
  margin-top: 2rem;
  justify-items: center;
  align-items: start;
  background: white;
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 10px 0px rgba(0,0,0,0.5);
  gap: 1rem;
}

#app > * {
  width: 100%;
  z-index: 1;
  padding: 0.5rem var(--px) 1rem;
}

#title {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  font-size: 2.5rem;
  font-weight: bold;
  position: relative;
  background: #aaaaaa;
}

#title h1 {
  font-weight: bold;
  grid-column: 1 / -1;
}

#title h3 {
  width: max-content;
  margin: 0;
  background: black;
  color: white;
  padding: 0.3rem 1rem;
  border: solid black 3px;
  border-radius: 1rem;
  font-weight: bold;
  text-transform: uppercase;
}

#title h3.hiker { border-color: var(--color-hiker); }
#title h3.mountaineer { border-color: var(--color-mountaineer); }
#title h3.task-force { border-color: var(--color-task-force); }

h1 {
  font-family: Georgia;
  font-style: italic;
}

.qsAnswered {
  justify-self: end;
  font-size: 1rem;
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
}

.qsAnswered .label {
  padding-bottom: 0.1rem;
}

#questionBubbles {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: inherit;
}

.bubble {
  --size: 1em;
  width: var(--size);
  height: var(--size);
  
  border: solid white 2px;
  border-radius: 100vw;
  
  transition: background 250ms ease;
}

.bubble.correct {
  background: var(--color-primary);
}

#gameSetup {
  display: grid;
  align-content: start;
  gap: 2.5rem;
}

#gamemodeHolder .fieldset  {
  font-size: 2rem;
}

#gamemode {
  cursor: pointer;
}

#gamemodeDescription {
  grid-column: 1 / -1;
}

#loading {
  position: relative;
}
#loading img {
  margin-left: 5px;
  height: 1em;
  position: absolute;
  top: 50%;
  transform: translate(0, -50%);
}

#QnAHolder {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-rows: 1fr;
}

#question {
  font-size: 1.7rem;
  align-self: start;
}

#answers {
  display: grid;
  align-content: start;
  grid-row-gap: 5px;
  height: 7rem;
}

#a1Holder,
#a2Holder {
  display: grid;
  column-gap: 0.5rem;
  align-items: center;
  grid-template-columns: auto 1fr;
  width: max-content;
  
  font-size: 1.2rem;
  position: relative;
}

:is(#a1Holder, #a2Holder) input {
  background-color: hsl(0 0% 0% / 0%);
  border: solid 1px #aaaaaa;
  border-radius: 0.2rem;
  padding: 0.1rem 0.3rem;
}

:is(#a1Holder, #a2Holder) .error {
  font-size: 0.8rem;
  grid-column: -2 / span 1;
  justify-self: end;
  margin-right: 0.3rem;
  z-index: -1;
  position: absolute;
  
  display: none;
}

:is(#a1Holder, #a2Holder) input.incorrect + .error {
  display: unset;
}

#answerButtons {
  display: flex;
  gap: 1rem;
}

#answerButtons button {
  font-size: large;
}

#countdown {
  grid-column: 2;
  grid-row: 1 / span 3;
  justify-self: end;
  align-self: start;
  
  width: 300px;
  display: grid;
  align-items: end;
  
  --time-remaining: 1000;
  --total-time: 1000;
  --countdown-mode: 0;
}

#countdown.countdownMode {
  --countdown-mode: 1;
}
  
#countdown > * {
  max-width: 100%;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}

#countdown path {
  --progress-remaining: clamp(0, calc(var(--time-remaining) / var(--total-time, 1000)), 1);
  --progress: calc(1 - var(--progress-remaining));
  --dash-offset: calc(250px * var(--progress));
  --multiplier: calc(var(--countdown-mode, 0) * 120 + (1 - var(--countdown-mode, 1)) * 400);
  --hue: clamp(0, calc(120 - (var(--multiplier) * var(--progress))), 120);
  stroke: hsl(var(--hue), 75%, 50%);
  stroke-dasharray: 250px;
  stroke-dashoffset: var(--dash-offset);
}

.countdownLabel {
  display: grid;
  align-content: center;
  justify-items: center;
  height: 100%;
}

#timeRemaining {
  font-size: 4rem;
  line-height: 0.7em;
  font-weight: bold;
}

@media screen and (max-width: 1200px) {
  
  #title h1{
    font-size: 1.5rem;
  }
  
  #title h3 {
    font-size: 1.3rem;
  }
  
  .qsAnswered .label {
    display: none;
  }
  
  #countdown {
    width: 200px;
  }
  
  #timeRemaining {
    font-size: 3rem;
  }
}

#result {
  grid-column: 1 / -1;
  text-align: center;
  position: relative;
}

#result > div {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

footer {
  background-image: url('/media/7876302b-e7d8-4852-aafb-8b43c6da9fef/FOOTER.png');
  background-size: cover;
  padding: 1rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: end;
  height: 8rem;
  position: fixed;
  inset: auto 0 0 0;
}

#infoButtonHolder {
  display: flex;
  justify-content: right;
  gap: 2rem;
  width: max-content;
}

#infoButtonHolder > * {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

#infoButtonHolder img {
  height: 3rem;
}


#correct {
  color: green;
}

#incorrect {
  color: red;
}

#gameInfoHolder {
  margin: 0 auto 30px;
  align-self: end;
  width: auto;
}

#gameInfo {
  padding-top: 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-column-gap: 5px;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:visited,
.btn-primary:focus {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary);
}

.modal-xlg {
  max-width: 1000px;
}

.modal-content {
  box-shadow: 0 4px 10px 0px rgba(0,0,0,0.5);
  border-radius: 1rem;
}

.modal-body hr {
  margin: 1rem -1rem;
}

.modal-overlay {
  position: absolute;
  display: grid;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-items: center;
  background: rgba(0, 0, 0, 0.2);
  transition: opacity 0.2s ease;
  opacity: 1;
}
.modal-overlay.not-visible {
  opacity: 0;
}

.modal-overlay-loading-icon {
  max-height: 20%;
}

.modal-title {
  line-height: 1;
  padding: 0.5rem 0;
}


#startModalImages {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

#startModal .modal-dialog {
  max-width: 70vw;
  min-width: 1200px;
}

#startModalLabel img {
  max-height: 8rem;
  margin: -1rem 0 -1rem 1rem;
}

.modal-header {
  border-radius: 1rem 1rem 0 0;
  background: #aaaaaa
}

.modal-header .modal-title {
  width: 100%;
  font-weight: bold;
}

#startModal .modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  padding: 1rem 2rem;
}

#startModal .modal-body h2 {
  text-align: center;
}

#startModal .modal-body img {
  width: 100%;
  box-shadow: 0px 2px 10px 0px hsl(0 0% 0% / 50%);
}

@media screen and (max-width: 1300px){
  #startModal .modal-dialog {
    min-width: 90vw;
  }
  
  #startModal .modal-body {
    grid-template-columns: 1fr;
    padding: 1rem 1rem;
  }
  
  #startModalLabel {
    font-size: 1.8rem;
  }
  
  #startModal .images {
    text-align: center;
  }
  
  #startModal .modal-body img {
    width: 70%;
  }
}

#submitModalLabel {
  width: 100%;
  margin-right: -3rem;
  font-weight: bold;
}

#submitModalLabel img {
  max-height: 9rem;
  margin: -4rem 0 -1rem 0;
}

#modalScore {
  font-family: Arial;
  font-style: normal;
  font-size: 5rem;
}

.not-visible {
  visibility: hidden !important;
}

.hidden {
  display: none !important;
}

.error {
  color: red;
}

.incorrect {
  box-shadow: 0 0 4px 4px hsl(0 100% 50% / 50%);
}