@import url("https://fonts.googleapis.com/css?family=Space+Mono:400,700&display=swap");
* {
  box-sizing: border-box;
  margin: 0px;
  padding: 0px;
  font-family: "Space Mono", monospace;
  font-weight: bold;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html,
body {
  width: 100%;
}

body {
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  position: relative;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0px 0px 50px rgba(71, 71, 71, 0.25);
  max-width: 720px;
}

.creation_page {
  width: 100%;
  background: #fff;
}
.creation_page.closed {
  display: none;
}
.creation_page .top_bar {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  box-shadow: 0px 0px 10px rgba(71, 71, 71, 0.5);
}
.creation_page .top_bar .controls {
  width: 100%;
  display: flex;
  justify-content: space-between;
  background: #f65751;
  padding: 10px;
}
.creation_page .top_bar .controls button {
  position: relative;
  overflow: hidden;
}
.creation_page .top_bar .controls button input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  overflow: hiddden;
}
.creation_page .top_bar .input_holder {
  width: 100%;
  display: flex;
  padding: 20px 35px;
  justify-content: space-evenly;
  flex-wrap: wrap;
  align-items: center;
}
.creation_page .top_bar .input_holder input {
  width: 50%;
  min-width: 250px;
  text-align: center;
}
.creation_page .top_bar h2 {
  width: 50%;
  min-width: 250px;
  margin: 5px 0px 10px 0px;
}
.creation_page .add_section {
  margin-top: 40px;
  position: relative;
}
.creation_page .add_section:before, .creation_page .add_section:after {
  content: "";
  position: absolute;
  width: calc(50% - 60px);
  height: 2px;
  background: #f2f2f2;
}
.creation_page .add_section:before {
  left: 0;
}
.creation_page .add_section:after {
  right: 0;
}

.session_sections {
  width: 100%;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.session_sections .session_section {
  display: grid;
  width: 100%;
  position: relative;
  background: #f2f2f2;
  border-radius: 5px;
  padding: 15px 5px 5px 5px;
  margin: 20px 0px;
  grid-template-rows: repeat(3, auto);
  grid-template-columns: repeat(2, minMax(0px, auto));
  grid-template-areas: "info action" "segment segment";
}
.session_sections .session_section:first-child {
  margin-top: 10px;
}
.session_sections .session_section .action_row {
  grid-area: action;
}
.session_sections .session_section .info_row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}
.session_sections .session_section .info_row input,
.session_sections .session_section .info_row h3 {
  margin: 5px 10px;
  width: auto;
  text-align: center;
  max-width: 1000px;
  white-space: nowrap;
}
.session_sections .session_section .info_row input {
  min-width: 100px;
}
.session_sections .session_section .segments_holder {
  grid-area: segment;
  margin-bottom: 25px;
  position: relative;
}
.session_sections .session_section .add_segment {
  position: absolute;
  bottom: -18px;
  left: calc(50% - 18px);
}

.segment {
  margin: 10px;
  background: rgba(179, 179, 179, 0.4);
  border-radius: 5px;
  display: grid;
  grid-template-columns: repeat(2, minMax(10px, 50%));
  grid-template-rows: repeat(4, auto);
  grid-template-areas: "action action" "duration position" "intensity intensity" "cadence cadence";
}
.segment .action-bar {
  grid-area: action;
  padding: 5px;
}
.segment .duration {
  padding: 5px 10px;
  grid-area: duration;
  justify-content: space-between;
}
.segment .duration input {
  width: 30%;
  text-align: center;
}
.segment .position {
  padding: 5px 10px;
  grid-area: position;
}
.segment .intensity {
  padding: 5px 10px;
  grid-area: intensity;
  align-items: center;
}
.segment .intensity input {
  width: calc(100% - 110px);
}
.segment .intensity h4 {
  margin-top: -7px;
  width: 110px;
  height: 70px;
  overflow: visible;
}
.segment .cadence {
  padding: 5px 10px;
  grid-area: cadence;
  align-items: center;
}
.segment .cadence input {
  width: calc(100% - 110px);
}
.segment .cadence h4 {
  margin-top: -7px;
  width: 110px;
  height: 70px;
  overflow: visible;
}
.segment .input-holder {
  display: flex;
  flex-wrap: wrap;
}
.segment .input-holder label {
  width: 100%;
}

.action_bar {
  display: flex;
  padding: 10px 10px;
  cursor: pointer;
  justify-content: flex-end;
}
.action_bar span {
  margin: 0px 0px 0px 15px;
  width: 35px;
  height: 35px;
  font-size: 12pt;
  border-radius: 100%;
  background: #f65751;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}
.action_bar span:active {
  opacity: 0.7;
}

input,
select {
  width: 100%;
  max-width: 320px;
  font-size: 15pt;
  box-shadow: 0px 0px 10px rgba(71, 71, 71, 0.5);
  padding: 15px 5px;
  border-radius: 5px;
  outline: none !important;
  border: 0px;
  color: #474747;
  margin: 10px 0px;
}
input:focus,
select:focus {
  box-shadow: 0px 0px 10px #f65751;
}

.class_page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f65751;
  grid-template-rows: 60px 100px auto 100px 140px;
  grid-template-columns: 100%;
  display: grid;
  z-index: 1000;
  grid-template-areas: "topBar" "classTotal" "mainDisplay" "sectionTotal" "controls";
}
.class_page.open {
  display: grid;
}
.class_page .top_bar {
  grid-area: topBar;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 20px;
  border-bottom: 2px solid #fff;
}
.class_page .top_bar span {
  color: #fff;
  cursor: pointer;
  font-size: 21pt;
}
.class_page .top_bar span:active {
  opacity: 0.7;
}
.class_page .class_total {
  grid-area: classTotal;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  flex-direction: column;
}
.class_page .class_total h2,
.class_page .class_total label {
  color: #fff;
  text-align: center;
  width: 100%;
}
.class_page .class_total label {
  color: #474747;
}
.class_page .section_total {
  grid-area: sectionTotal;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  flex-direction: column;
}
.class_page .section_total h3 {
  color: #fff;
  text-align: center;
  width: 100%;
}
.class_page .section_total h3:first-child {
  color: #474747;
}
.class_page .controls {
  grid-area: controls;
}
.class_page .controls button {
  box-shadow: 0px 0px 10px #474747;
  width: 100px;
  height: 100px;
  font-size: 25pt;
}
.class_page .controls button:active {
  opacity: 0.7;
}
.class_page .main_info {
  grid-area: mainDisplay;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.class_page .main_info h5 {
  height: 25px;
  overflow: hidden;
  width: 150px;
}
.class_page .main_info .circle_holder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.class_page .main_info .circle_holder svg {
  width: 370px;
  margin: 0px;
}
.class_page .main_info .circle_holder svg path {
  opacity: 0.5;
  fill: #474747;
}
.class_page .main_info .circle_holder svg path.on {
  fill: #fff;
  opacity: 1;
}
.class_page .main_info svg {
  z-index: 1000;
  margin: 15px 0px;
}

h2 {
  text-align: center;
  font-size: 30pt;
  color: #b3b3b3;
}

h3 {
  text-align: center;
  font-size: 21pt;
  color: #f65751;
}

h4 {
  text-align: center;
  font-size: 35pt;
  color: #474747;
}

h5 {
  text-align: center;
  font-size: 15pt;
  color: #fff;
}

.button_row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0px;
  margin: 10px 0px;
}

button {
  background: #fff;
  border: 3px solid #f65751;
  border-radius: 10px;
  padding: 10px;
  font-size: 14pt;
  color: #f65751;
  cursor: pointer;
  outline: none !important;
  box-shadow: 0px 0px 10px #f65751;
}
button.circle {
  border-radius: 100%;
}
button.big {
  width: 70px;
  height: 70px;
  padding: 0px;
  font-size: 30pt;
}
button.small {
  width: 36px;
  height: 36px;
  padding: 0px;
  font-size: 15pt;
}
button:active {
  box-shadow: 0px 0px 5px #f65751;
}

input[type="range"] {
  outline: 0;
  border: 0;
  margin: 5px 0px;
  border-radius: 500px;
  width: 100%;
  max-width: 100%;
  padding: 0px;
  height: 25px !important;
  -webkit-appearance: none;
  overflow: hidden;
  background-color: #fff;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 25px;
  -webkit-appearance: none;
  color: #f65751;
}
input[type="range"]::-webkit-slider-thumb {
  width: 25px;
  -webkit-appearance: none;
  height: 25px;
  cursor: ew-resize;
  background: #f65751;
  border: 3px solid #f65751;
  box-shadow: -335px 0 0 321px #f65751, inset 0 0 0 25px #fff;
  border-radius: 50%;
  transition: box-shadow 0.2s ease-in-out;
  position: relative;
}
input[type="range"]::-moz-range-progress {
  background-color: #43e5f7;
}
input[type="range"]::-moz-range-track {
  background-color: #9a905d;
}
input[type="range"]::-ms-fill-lower {
  background-color: #43e5f7;
}
input[type="range"]::-ms-fill-upper {
  background-color: #9a905d;
}

svg .bar_pos {
  fill: #474747;
  transition: all 1s ease;
}
svg .bar_pos.active {
  fill: #fff;
}
svg .bar_pos.arrow {
  opacity: 0;
}
svg .bar_pos.arrow.active {
  opacity: 1;
  animation: bounce 1s linear infinite;
}

@media (min-width: 720px) {
  #app {
    margin: 30px 0px;
    min-height: calc(100vh - 60px);
  }

  .section_total {
    justify-content: center !important;
  }
}
@keyframes bounce {
  0% {
    transform: translate(0, 0px);
  }
  50% {
    transform: translate(0, -50px);
  }
  100% {
    transform: translate(0, 0px);
  }
}