/*-- Global Variable Declarations--*/
:root {
/*-- Fonts--*/
    --titlefont: "Whale I Tried", sans-serif;
    --bodyfont: 'Nunito', sans-serif;
/*-- Colour Palette--*/
    --purplelight: #908CD9;
    --purplemed: #9C70BD;
    --purpledark: #A2529A;
    --bluemed: #3E8BC6;
    --bluevlight: #EEFBFF;
    --redlight: #DC7774;
    --medgrey: #a9a9a9;
/*-- Canvas Size--*/
    --canvassize: calc((100vh - 22.6rem) / 4);
    --balloontextsize: calc((100vh - 22.6rem) / 14);
    --balloontextlineheight: calc((100vh - 22.6rem) / 4.4);
}

/*-- Custom Fonts--*/
@font-face {
    font-family: 'Whale I Tried';
    src: url('../fonts/whale-i-tried.eot');
    src: url('../fonts/whale-i-tried.eot?#iefix') format('embedded-opentype'),
         url('../fonts/whale-i-tried.woff2') format('woff2'),
         url('../fonts/whale-i-tried.woff') format('woff'),
         url('../fonts/whale-i-tried.ttf')  format('truetype'),
         url('../fonts/whale-i-tried.svg#Whale I Tried') format('svg');
}

/*-- HTML--*/
html {
    font-size: 62.5%;
}

/*-- Body--*/
body {
    font-family: var(--bodyfont);
    font-size: 1.6rem;
    min-height: 100vh;
    background-image: linear-gradient(to bottom, #7cc0ff, #77c4fe, #72c7fc, #6fcafa, #6ecdf8, #6fd2f7, #71d7f6, #75dcf5, #7de4f5, #86ecf6, #92f4f5, #9efbf5);
}

/*-- Containers --*/
.container-heading-main {
    padding-top: 1.0rem;
    padding-bottom: 0.5rem;
}

.container-heading-main-large {
    padding-top: 3.0rem;
    padding-bottom: 3.0rem;
}

.container-button {
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
}

.container-button-group {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.container-button-game {
    padding-top: 1.5rem;
    padding-bottom: 1.0rem;
}

.container-loader {
    padding-top: 9.8rem;
    padding-bottom: 9.8rem;
}

.container-footer {
    padding-top: 1rem;
    padding-bottom: 1rem;
    text-align: center;
}

.container-text-information {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.container-404 {
    padding-top: 20rem;
}

/*-- Headings --*/
.heading-main {
    font-family: var(--titlefont);
    font-size: 6rem;
    text-align: center;
    color: var(--bluevlight);
}

/*-- Heading Image --*/
.container-heading-main img,
.container-heading-main-large img {
    width: 8rem;
    height: 8rem;
    position: absolute;
    z-index: -1;
    left: 50%;
    margin-left: -40px;
}

/*-- Buttons --*/
.btn-text {
    color: var(--bluevlight);
}

.btn-text-score {
    color: var(--purpledark);
    text-align: center;
    white-space: nowrap;
}

.btn-xl {
    padding: 0.7rem 0.7rem;
    font-size: 1.7rem;
    font-weight: 600;
    border-radius: 0.5rem;
    background-color: var(--purplelight);
    border-color: var(--bluemed);
}

.btn-xl-nofill {
    padding: 0.7rem 0.7rem;
    font-size: 1.7rem;
    font-weight: 600;
    border: 2px solid var(--purplelight);
    border-radius: 0.5rem;
}

.btn-xxl {
    padding: 3.35rem 5rem;
    font-size: 5rem;
    font-weight: 700;
    border-radius: 1.0rem;
    background-color: var(--purplelight);
    border-color: var(--bluemed);
}

/*-- Button Hover Styling --*/
.btn-text-score:hover {
    color: var(--purpledark);
    cursor: auto;
}

/*-- Button Pseudo Class Styling --*/
.btn-xl-focus-none:focus,
.btn-xl-focus-none:visited {
    background-color: var(--purplelight);
    box-shadow: none;
    border-color: var(--bluemed);
}

/*-- Information Text --*/
.text-information {
    font-size: 1.7rem;
    padding: 1.0rem 1.0rem 1.0rem 1.0rem;
    color: var(--purpledark);
    border: 2px solid var(--purplelight);
    border-radius: 0.5rem;
}

/*-- 404 Error Heading Styling --*/
.text-404 h4 {
    font-size: 2.2rem;
    color: var(--purplemed);
    font-weight: 700;
}

/*-- 404 Error Signpost Icon Styling --*/
.container-404 i {
    padding-top: 0.5rem;
    color: var(--purplemed);
}

/*-- Game Elements --*/

/*-- Game Loader --*/
/*-- Many thanks to loading.io https://loading.io/css/ --*/
.lds-grid {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.lds-grid div {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  animation: lds-grid 1.2s linear infinite;
}

.lds-grid div:nth-child(1) {
  top: 8px;
  left: 8px;
  animation-delay: 0s;
}

.lds-grid div:nth-child(2) {
  top: 8px;
  left: 32px;
  animation-delay: -0.4s;
}

.lds-grid div:nth-child(3) {
  top: 8px;
  left: 56px;
  animation-delay: -0.8s;
}

.lds-grid div:nth-child(4) {
  top: 32px;
  left: 8px;
  animation-delay: -0.4s;
}

.lds-grid div:nth-child(5) {
  top: 32px;
  left: 32px;
  animation-delay: -0.8s;
}

.lds-grid div:nth-child(6) {
  top: 32px;
  left: 56px;
  animation-delay: -1.2s;
}

.lds-grid div:nth-child(7) {
  top: 56px;
  left: 8px;
  animation-delay: -0.8s;
}

.lds-grid div:nth-child(8) {
  top: 56px;
  left: 32px;
  animation-delay: -1.2s;
}

.lds-grid div:nth-child(9) {
  top: 56px;
  left: 56px;
  animation-delay: -1.6s;
}

@keyframes lds-grid {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/*-- Set row height for balloon canvas elements --*/
/*-- Row height calculated using viewport height --*/
.canvas-balloon {
    height: var(--canvassize);
}

/*-- Game Canvas --*/
/*-- Width and height calculated using viewport height --*/
.canvas-balloon canvas {
    position: absolute;
    width: var(--canvassize);
    height: var(--canvassize);
    z-index: -1;
}

/*-- Game Answer Balloon Text --*/
/*-- Font size, line height, width and height calculated using viewport height --*/
.balloon-answer-text {
    position: absolute;
    color: var(--bluevlight);
    text-align: center;
    font-size: var(--balloontextsize);
    font-weight: 700;
    line-height: var(--balloontextlineheight);
    width: var(--canvassize);
    height: var(--canvassize);
    z-index: 1;
    text-shadow: 1px 1px 2px var(--medgrey);
}

/*-- Game Answer Balloon Text Hover Styling --*/
.balloon-answer-text:hover {
  cursor: url('../images/pin.svg'), crosshair; 
}

/*-- Game Question --*/
.game-section-controls #question {
    color: var(--bluevlight);
    text-align: center;
    font-size: 5rem;
    font-weight: 700;
    border-radius: 1.0rem;
    background-color: var(--purplelight);
    border: 1px solid var(--bluemed);
}

/*-- Game Audio Controls --*/
#audio-controls i {
    padding: 0.5rem 1.0rem 0.5rem 1.0rem;
    font-size: 2rem;
    text-align: center;
    color: var(--purplemed);
}

#audio-controls i:hover {
    color: var(--purpledark);
}

/*-- Game Health --*/
.game-section-controls #health {
    color: var(--redlight);
    text-align: center;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
}

.game-section-controls #health i {
    font-size: 2rem;
}

/*-- Game Score --*/
.score {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    color: var(--purplemed);
    text-align: right;
}

/*-- Generic Feedback Modal --*/
.modal-dialog h2,
.modal-dialog span {
    font-size: 2rem;
    font-weight: 600;
    color: var(--purpledark);
}

.modal-dialog p,
.modal-dialog input,
.modal-dialog textarea {
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--purpledark);
}

/*--Footer--*/
.container-footer a {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--purplemed);
}

.container-footer i {
    color: var(--purplemed);
}

/*--Navigation Links--*/
.container-heading-main a:active,
.container-heading-main-large a:active {
    color: var(--bluevlight);
    text-decoration: none;
}

.container-heading-main a:hover,
.container-heading-main-large a:hover {
    color: var(--bluevlight);
    text-decoration: none;
}

.container-heading-main a:visited,
.container-heading-main-large a:visited {
    color: var(--bluevlight);
    text-decoration: none;
}

.text-information a:link,
.container-footer a:link,
.container-footer i:link {
    color: var(--purplemed);
    text-decoration: none;
}

.container-404 i:visited,
.text-information a:visited,
.container-footer a:visited,
.container-footer i:visited {
    color: var(--purplemed);
    text-decoration: none;
}

.container-404 i:hover,
.text-information a:hover,
.container-footer a:hover,
.container-footer i:hover {
    color: var(--purpledark);
    text-decoration: none;
}

.container-404 i:active,
.text-information a:active,
.container-footer a:active,
.container-footer i:active {
    color: var(--purpledark);
    text-decoration: none;
}

/*-- Bootstrap Class Overrides --*

/*-- Bootstrap Button Class Overrides --*/
.btn-lg {
    font-size: 1.6rem;
}

/*--Bootstrap Button Pseudo Class Overrides--*/
.btn-info:active {
    background-color: var(--purpledark);
}

.btn-info:not(:disabled):not(.disabled).active, .btn-info:not(:disabled):not(.disabled):active {
    background-color: var(--purpledark);
}

.btn-info:focus {
    background-color: var(--purplemed);
}

.btn-info:hover {
    background-color: var(--purplemed); 
}

/*-- Bootstrap Modal Class Overrides --*/
.modal-content {
    border: 1px solid var(--purplemed);
    border-radius: 1.5rem;
}

.modal-header {
    border-bottom: 1px solid var(--purplemed);
    background-color: var(--bluevlight);
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
}

.modal-body {
    background-color: var(--bluevlight);
    border-radius: 1.5rem;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
}

/*-- Media Queries --*/

/*-- Media query to re-size heading, reposition heading image and re-size Play button for screen sizes under 680px high --*/
@media (max-height: 680px) {
    .heading-main {
        font-size: 5rem;    
    }
    .container-heading-main img, .container-heading-main-large img {
        margin-top: -0.6rem;
    }
    .btn-xxl {
        padding: 0.5rem 0.5rem;
        font-size: 4.0rem;
    }
}

/*-- Media query to fix balloon text height to a maximum of 5rem for devices over 926px high --*/
 @media (min-height: 926px) {
    .balloon-answer-text {
        font-size: 5rem;
    }
 }

/*-- Media query to re-size balloon canvas and text elements for large devices over 992px wide --*/
 @media (min-width: 992px) {
    .canvas-balloon {
        min-height: 22rem;
    }
    .canvas-balloon canvas {
        width: 22rem;
        height: 22rem;
    }
    .balloon-answer-text {
        font-size: 5rem;
        line-height: 20rem;
        width: 22rem;
        height: 22rem;
    }
}
