.crc-matching-quiz {
  max-width: 1010px;
  margin-left: auto;
  margin-right: auto;
}

.crc-matching-quiz #topCardsContainer {
}

.crc-matching-quiz #bottomCardsContainer {
}

.crc-matching-quiz .cards-container {
  display: flex;
}

.crc-matching-quiz .card {
  background-color: #EFE7E1;
  border: 2px solid #EFE7E1;
  cursor: pointer;
  position: relative;
  width: 25%;
  margin-right: 8px;
  border-radius: 10px;
  padding: 5px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crc-matching-quiz .card.text-card {
  padding: 20px 10px;
}

.crc-matching-quiz .card p {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  text-align: center;
}

.crc-matching-quiz .card.selected {
  border: 2px solid #333;
}

 .crc-matching-quiz .card.incorrect:after {
   content: '';
   display: block;
   background-image: url(https://philanthropy.cdn.redcross.ca/teachable/img/general/error.png);
   position: absolute;
   width: 15px;
   height: 15px;
   bottom: 5px;
   right: 5px;
   background-size: contain;
   background-repeat: no-repeat;
 }

.crc-matching-quiz .card.completed {
  cursor: default;
}

 .crc-matching-quiz .card.completed:after {
   content: '';
   display: block;
   background-image: url(https://philanthropy.cdn.redcross.ca/teachable/img/general/checkmark.png);
   position: absolute;
   width: 20px;
   height: 20px;
   bottom: 5px;
   right: 5px;
   background-size: contain;
   background-repeat: no-repeat;
 }

.crc-matching-quiz .card img {
  width: 100%;
  height: auto;
}

.crc-matching-quiz #linesContainer {
  min-height: 100px;
  position: relative;
}

.crc-matching-quiz .line {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  display: none;
}

.crc-matching-quiz #messageContainer {
  margin-top: 20px;
  padding: 20px;
  border-top: 1px solid #aaa;
}

.crc-matching-quiz #messageContainer .message-success-title {
  font-weight: bold;
  padding-left: 30px;
  position: relative;
}

.crc-matching-quiz #messageContainer .message-success-body {
  padding-left: 30px;
}

 .crc-matching-quiz #messageContainer .message-success-title:before {
   content: '';
   display: block;
   background-image: url(https://philanthropy.cdn.redcross.ca/teachable/img/general/checkmark.png);
   position: absolute;
   width: 20px;
   height: 20px;
   left: 0px;
   top: 0px;
   background-size: contain;
   background-repeat: no-repeat;
 }

@media only screen and (max-width: 420px) {
  .crc-matching-quiz .card p {
    font-size: 12px;
  }
}

@media only screen and (max-width: 598px) {
  .crc-matching-quiz .desktop-only {
    display: none !important;
  }

  .crc-matching-quiz #cardsContainer {
    display: flex;
    min-height: 400px;
  }

  .crc-matching-quiz .cards-container {
    display: flex;
    flex-direction: column;
    width: 33.33%;
  }

  .crc-matching-quiz .card {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
  }

  .crc-matching-quiz #linesContainer {
    flex: 1 1 auto;
  }

  .crc-matching-quiz {
    margin-bottom: 110px;
  }
  
  .crc-matching-quiz #messageContainer {
    width: 100%;
    position: fixed;
    bottom: 0px;
    left: 0px;
    background: #fff;
    border-top: 1px solid #ddd;
  }
}

@media only screen and (min-width: 768px) and (max-width: 935px) {
  .crc-matching-quiz .desktop-only {
    display: none !important;
  }

  .crc-matching-quiz #cardsContainer {
    display: flex;
    min-height: 400px;
  }

  .crc-matching-quiz .cards-container {
    display: flex;
    flex-direction: column;
    width: 33.33%;
  }

  .crc-matching-quiz .card {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
  }

  .crc-matching-quiz #linesContainer {
    flex: 1 1 auto;
  }

  .crc-matching-quiz {
    margin-bottom: 110px;
  }
  
  .crc-matching-quiz #messageContainer {
    position: fixed;
    bottom: 0px;
    left: 300px;
    width: calc(100% - 300px);
    background: #fff;
    border-top: 1px solid #ddd;
  }
}

@media only screen and (min-width: 599px) and (max-width: 767px) {
  .crc-matching-quiz .mobile-only {
    display: none !important;
  }
}

@media only screen and (min-width: 935px) {
  .crc-matching-quiz .mobile-only {
    display: none !important;
  }

  .crc-card-flip .card-content.text-content p {
    font-size: 16px;
  }
}