
:root {
  --light: #ffffff;
  --lightgray: #919da331;
  --gray: #1b35432a;
  --darkgray: #1b35435f;
  --dark: rgb(71, 64, 64);
  --red: #ef4130;
  --redglow: inset 0 0 8px rgb(255, 118, 118);
  --blueglow: inset 0 0 8px #86bdff;
  --shadow: 0 0 20px rgb(177, 177, 177);
  --modalshadow: 0 0 50px rgba(89, 89, 89, 0.502);
  --vignette: radial-gradient(rgba(255, 255, 255, 0) 50%, rgba(42, 81, 148, 0.269) 100%);
  --redfill: linear-gradient(0deg, rgba(246,88,72,1) 10%, rgba(186,35,21,1) 60%);
  --redborder: linear-gradient(0deg, rgba(208,45,29,1) 10%, rgba(250,77,61,1) 60%);
  --bluefill: linear-gradient(0deg, rgba(0,158,221,1) 10%, rgba(0,113,181,1) 60%);
  --blueborder: linear-gradient(0deg, rgba(0,118,186,1) 10%, rgba(0,164,226,1) 60%);
}

html {
  box-sizing: border-box;
  font-family: 'Avenir', sans-serif;
  color: var(--dark);
}

/* GLOBAL GRID LAYOUT */

#global-layout-grid {
  position: absolute;
  display: grid;
  pointer-events: none;
  height: 100%;
  width: 100vw;
  min-height: 0;
  min-width: 0;
  z-index: 10;
  grid-template-columns: 28% 44% 28%;
  grid-template-rows: 8% 11% 70% 11%;
  grid-template-areas: 
    "nav nav nav"
    "title title title"
    "info-A info-B info-B"
    "ref states tools";
}

/* NAV BAR */

#nav {
  grid-area: nav;
  display: flex;
  justify-items: flex-end;
  padding: 0px 30px;
}

#top-right-nav {
  margin-left: auto;
  display: flex;
}

#top-left-nav {
  margin-right: auto;
}

#cvaButton {
  border-radius: 0 0 20px 20px;
  padding-top: 0.5vh;
  padding-bottom: 0.6vh;
  justify-self: right;
}

#piButton {
  border-radius: 0 0 20px 20px;
  padding-top: 0.5vh;
  padding-bottom: 0.6vh;
  justify-self: right;
}

/* TITLE */

#title {
  grid-area: title;
  display: flex;
  justify-self: center;
  pointer-events: none;
}

#mainHeader {
  overflow: visible;
  text-align: center;
  margin: auto;
}

#mainHeader h1 {
  color: #00a5e3;
  font-size: 1.8rem;
  line-height: 1.9rem;
}

@media screen and (max-width: 1365px) {
  #mainHeader h1 {
    font-size: 1.4rem;
    line-height: 1.5rem;
  }
}

/* INFO A (LEFT) */

#info-A {
  grid-area: info-A;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-left: 20%;
  padding-right: 10%;
  padding-top: 20%;
  padding-bottom: 0;
}

#leftPanel {
  color: var(--light);
  background: var(--red);
  border-radius: 4vh 0 4vh 0;
  padding: 30px;
  font-size: 21px;
  min-height: 260px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
}

#leftInfoHeader {
  font-size: 7rem;
  line-height: 7rem;
  font-weight: 700;
  margin: 0;
}

#leftInfoBody {
  font-size: 1.1rem;
  margin: 0;
}

#leftInfoFooter {
  font-size: 1rem;
  line-height: 1rem;
  margin-top: auto;
}

@media screen and (max-width: 1365px) {
  #leftPanel {
    color: var(--light);
    background: var(--red);
    border-radius: 3vh 0 3vh 0;
    padding: 20px;
    min-height: 190px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
  }
  
  #leftInfoHeader {
    font-size: 5.5rem;
    line-height: 5.5rem;
    font-weight: 700;
    margin: 0;
  }
  
  #leftInfoBody {
    font-size: 0.9rem;
    margin: 0;
  }
  
  #leftInfoFooter {
    font-size: 0.6rem;
    line-height: 0.8rem;
    margin-top: auto;
  }
}

/* INFO-B (RIGHT) */

#info-B {
  display: grid;
  grid-area: info-B;
  margin: 0 0 0 30%;
  align-content: flex-start;
  grid-template-rows: 38% 62%;
  grid-template-columns: repeat(1, 1fr);
}

#rightIndicator {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  justify-self: left;
  height: 60%;
  width: 85%;
  margin: 0 10% 0 0;
  background-image: url("../images/Indicator.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-clip: border-box;
}

#rightIndicatorHeader {
  grid-row: 1;
  grid-column: 1;
  justify-self: left;
  text-align: right;
  align-self: end;
  width: 84%;
  margin: 0 10% 0 0;
  margin-block-end: 0;
  color: var(--red);
  font-weight: 500;
  font-size: 130%;
}

#rightArrow {
  display: flex;
  height: 72%;
  width: 30%;
  grid-row: 2;
  grid-column: 1;
  margin: 5% 0 0 50%;
  justify-self: left;
  justify-content: center;
  background-image: url("../images/rcoArrow.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

#rightArrowText {
  position: relative;
  margin: 15% 0 0 0;
  width: 50%;
  color: var(--light);
  font-weight: 600;
  font-size: 120%;
  text-align: center;
}

@media screen and (max-width: 1365px) {
  #rightIndicator {
    height: 65%;
    margin: 0 8% 0 0;
  }
  
  #rightIndicatorHeader {
    margin: 0 0 0 0;
    font-size: 1rem;
  }
}

/* TUTORIAL */

#tutorial {
  grid-column: 2 / span 1;
  grid-row: 3 / span 1;
  padding-bottom: 4%;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  transition: .35s;
  -webkit-transition: .35s;
}

#tutorial.inactive {
  opacity: 0;
}

.tutorial-message {
  display: flex;
  margin: 0 auto;
  padding: 10px;
  width: 70%;
  height: 3.5%;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  border-radius: 30px;
  background-color: var(--lightgray);
  color: var(--red);
}

@media screen and (max-width: 1365px) {
  .tutorial-message {
    font-size: 13px;
  }
}

.tutorial-message p {
  margin: auto;
}

/* REFERENCE BUTTON */

#ref {
  grid-area: ref;
  display: flex;
  align-items: flex-end;
  padding: 0 20%;
}

#refButton {
  font-size: 1.2rem;
  font-weight: 500;
  width: 60%;
}

@media screen and (max-width: 1365px) {
  #refButton {
    font-size: 1rem;
  }
}

/* STATE BUTTONS */

#states {
  grid-area: states;
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  transform: scale(0.9, 0.9) translateY(6%);
  -webkit-transform: scale(0.9, 0.9) translateY(6%);
  pointer-events: none;
}


.bottom-button {
  display: flex;
  width: 250px;
  height: 95px;
  z-index: 11;
  margin: 10px 5px 0px 5px;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  background: var(--redborder);
  border: solid;
  border-radius: 45px 45px 0 0;
  -webkit-border-radius: 45px 45px 0 0;
  border-width: 0;
  box-shadow: var(--shadow);
  color: var(--light);
  pointer-events: all;
  transform: translateY(12%);
  transition: 0.5s;
  -webkit-transition: 0.5s;
  transition-timing-function: ease-out;
  -webkit-transition-timing-function: ease-out;
}

.bottom-button span {
  display: flex;
  margin: 10px 10px 22px 10px;
  width: 86%;
  padding: 1vh 1vh 1vh 1vh;
  border-radius: 35px 35px 0 0;
  -webkit-border-radius: 35px 35px 0 0;
  background: var(--redfill);
  box-shadow: var(--redglow);
  justify-content: center;
}

@media screen and (max-width: 1365px) {
  #states {
    transform: scale(0.7, 0.7) translateY(22%);
    -webkit-transform: scale(0.7, 0.7) translateY(22%);
  }
  
  .bottom-button {
    border-radius: 40px 40px 0 0;    
    -webkit-border-radius: 40px 40px 0 0;    
    font-size: 1.2rem;
  }

  .bottom-button span {
    border-radius: 30px 30px 0 0;
    -webkit-border-radius: 30px 30px 0 0;
  }
}

.bottom-button#crossSectionButton {
  font-size: 1.2rem;
  transition: width 0.3s;
  -webkit-transition:width 0.3s;
}

.bottom-button#crossSectionButton.open {
  width: 120px;
}

#crossSectionArrow {
  padding-top: 15%;
  padding-bottom: 15%;
}

@media screen and (max-width: 1365px) {
  #crossSectionArrow {
    padding-top: 20%;
    padding-bottom: 20%;
  }
}

.child-group-parent.collapsed {
  display: flex;
  justify-content: center;
  width: 0;
}

.child-group-parent {
  width: 420px;
  transition: width 0.3s;
}

.child-group {
  display: grid;
  grid-gap: 10px;
  height: auto;
  width: 420px;
  z-index: 9;
  font-size: 1rem;
  text-align: center;
  justify-self: center;
  pointer-events: all;
  transition: transform 0.3s, opacity 0.45s;
  -webkit-transition: -webkit-transform 0.3s, opacity 0.45s;
}

.child-group.collapsed {
  z-index: 9;
  opacity: 0;
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  pointer-events: none;
}

.child-group .bottom-button.child {
  width: 100%;
  transition: transform 0.3s;
  -webkit-transition: -webkit-transform 0.3s;
}

.child-group .bottom-button.child span {
  font-size: 1.1rem;
  width: auto;
  background: var(--redfill);
  box-shadow: var(--redglow);
}

.child-group .bottom-button.child.selected {
  background: var(--blueborder);
  box-shadow: var(--shadow);
  transform: translateY(0);
  -webkit-transform: translateY(0);
}

.child-group .bottom-button.child.selected span {
  background: var(--bluefill);
  box-shadow: var(--blueglow);
}

#childButton1 {
  grid-column: 1;
}

#childButton2 {
  grid-column: 2;
}

/* TOOLS (BOTTOM RIGHT) */

#tools {
  grid-area: tools;
  padding: 0px 30px;
  display: flex;
  margin-left: auto;
  justify-content: flex-end;
  align-items: flex-end;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(1, 1fr);
}

#resetButton {
  justify-self: right;
}

#muteButton {
  justify-self: right;
}

#muteButton.disabled {
  opacity: .5;
  pointer-events: none;
}

#resetButton:active {
  background-color: var(--darkgray);
}

#muteButton:active {
  background-color: var(--darkgray);
}

/* REFERENCE MODAL */

.modal-container {
  position: absolute;
  margin: auto;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  z-index: 10;
  justify-content: center;
  pointer-events: none;
}

.modal {
  position: absolute;
  top: 20%;
  height: 58%;
  width: 68%;
  overflow: hidden;
  margin-top: auto;
  margin-bottom: auto;
  border-radius: 4vh 0 4vh 0;
  border: solid;
  border-width: 15px;
  text-align: left;
  background-color: var(--light);
  border-image: var(--dark);
  color: var(--dark);
  box-shadow: var(--modalshadow);
  transition: 0.5s;
  -webkit-transition: 0.5s;
  transition-timing-function: 'ease-out';
  -webkit-transition-timing-function: 'ease-out';
}

.modal.collapsed {
  z-index: 10;
  opacity: 0;
  transform: translateY(-20%);
  -webkit-transform: translateY(-20%);
}

.modal.revealed {
  z-index: 11;
  opacity: 1;
  transform: translateY(0%);
  -webkit-transform: translateY(0%);
}

.modal-header {
  font-weight: 600; 
  font-size: 1.8rem
}

.modal-content {
  height: auto;
  max-height: 63%;
  width: auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin: 4vh;
  padding: 1px 60px 40px 40px;
  font-size: 1.1rem;
  text-align: left;
  flex-grow: 1;
}

.modal-content::-webkit-scrollbar {
  -webkit-appearance: slider-vertical;
}

.modal-footer {
  position: absolute;
  bottom: 0;
  left: 24px;
  color: rgb(150, 150, 150);
  font-size: .95rem;
  text-align: left;
  line-height: 24px;
  flex-grow: 1;
}

@media screen and (max-width: 1365px) {
  .modal-header {
    font-size: 1.5rem
  }
  
  .modal-content {
    font-size: 0.9rem
  }
  
  .modal-footer {
    font-size: 0.85rem
  }
}

.shadow-overlay {
  position: absolute;
  z-index: 10;
  opacity: 0;
  top:0;
  bottom:0;
  left:0;
  right:0;
  background-color: var(--darkgray);
  pointer-events: none;
  transition: opacity 0.4s;
  -webkit-transition: opacity 0.4s;
}

.shadow-overlay.active
{
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.4s;
  -webkit-transition: opacity 0.4s;
}

.vignette-overlay {
  position: absolute;
  z-index: 8;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-image: var(--vignette);
  pointer-events: none;
}

#refCloseButton {
  position: absolute;
  display: flex;
  right: 10px;
  bottom: 10px;
  width: 155px;
  height: 65px;
  z-index: 11;
  margin: 10px;
  padding-bottom: 0;
  justify-content: center;
  font-weight: 700;
  background: var(--redborder);
  border: solid;
  border-radius: 2.2vh 0 2.2vh 0;
  border-width: 0;
  box-shadow: var(--shadow);
  color: var(--light);
}

#refCloseButton span {
  pointer-events: none;  
  border-radius: 1.5vh 0 1.5vh 0;
  margin: 8px;
  padding-top: 8%;
  font-size: 1.4rem;
}

#refCloseButton .button-overlay {
  position: absolute;
  pointer-events: none;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0;
  background: #33333368;
  border-width: 0;
  border-radius: 2.2vh 0 2.2vh 0;
  opacity: 0;
}

#refCloseButton:active .button-overlay {
  opacity: 1;
}

/* Generics */

.p {
  display: block;
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
}

.setting-button {
  display: flex;
  height: 38px;
  width: 48px;
  border-radius: 20px 20px 0 0;
  padding: 0.7vh 1vh 0.5vh 1vh;
  margin: 0 8px;
  z-index: 8;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  background-color: var(--gray);
  color: var(--light);
}

.setting-button:active {
  background-color: var(--darkgray);
}

.button-text {
  margin: auto;
  text-align: center;
  text-justify: center;
  color: var(--light);
  pointer-events: none;
}

.HFpEF-data-view {
  transition: 0.4s;
  -webkit-transition: 0.4s;
}

.HFrEF-data-view {
  transition: 0.4s;
  -webkit-transition: 0.4s;
}

.button-icon {
  display: block;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
  max-width: 50%;
  max-height: 50%;
}

.no-pointer-events {
  pointer-events: none;
}

.pointer-events {
  pointer-events: all;
}

.hidden {
  display: none !important; 
}

.inactive {
  opacity: 0;
  transform: translateY(-20px);
  -webkit-transform: translateY(-20px);
  transition-timing-function: ease-out;
  -webkit-transition-timing-function: ease-out;
}

/* Interaction Controlls */

.no-select {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none;
}

.no-select-img {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
}

.no-select:active {
  color: var(--darkgray);
}

/* Avenir regular */

@font-face {
  font-family: "Avenir";
  src: url("../fonts/Avenir/WOFF/Avenir-Roman-12.woff2") format('woff2'),
        url("../fonts/Avenir/WOFF/Avenir-Roman-12.woff") format('woff');
  font-style: normal;
  font-weight: 400;
}


/* Avenir italic */

@font-face {
  font-family: "Avenir";
  src: url("../fonts/Avenir/WOFF/Avenir-Oblique-11.woff2") format('woff2'),
  url("../fonts/Avenir/WOFF/Avenir-Oblique-11.woff") format('woff');
  font-style: italic;
  font-weight: 400;
}

/* Avenir Medium */

@font-face {
  font-family: "Avenir";
  src: url("../fonts/Avenir/WOFF/Avenir-Medium-09.woff2") format('woff2'),
        url("../fonts/Avenir/WOFF/Avenir-Medium-09.woff") format('woff');
  font-style: normal;
  font-weight: 500;
}

/* Avenir semi-bold */

@font-face {
  font-family: "Avenir";
  src: url("../fonts/Avenir/WOFF/Avenir-Heavy-05.woff2") format('woff2'),
        url("../fonts/Avenir/WOFF/Avenir-Heavy-05.woff") format('woff');
  font-style: normal;
  font-weight: 600;
}

/* Avenir bold */

@font-face {
  font-family: "Avenir";
  src: url("../fonts/Avenir/WOFF/Avenir-Black-03.woff2") format('woff2'),
        url("../fonts/Avenir/WOFF/Avenir-Black-03.woff") format('woff');
  font-style: normal;
  font-weight: 700;
}
