/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

html {
  line-height: 1.15;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
}

/* Sections
   ========================================================================== */

/**
 * Remove the margin in all browsers.
 */

body {
  margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 */

main {
  display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Grouping content
   ========================================================================== */

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */

hr {
  box-sizing: content-box;
  /* 1 */
  height: 0;
  /* 1 */
  overflow: visible;
  /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

pre {
  font-family: monospace, monospace;
  /* 1 */
  font-size: 1em;
  /* 2 */
}

/* Text-level semantics
   ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */

a {
  background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */

abbr[title] {
  border-bottom: none;
  /* 1 */
  text-decoration: underline;
  /* 2 */
  text-decoration: underline dotted;
  /* 2 */
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */

b,
strong {
  font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
samp {
  font-family: monospace, monospace;
  /* 1 */
  font-size: 1em;
  /* 2 */
}

/**
 * Add the correct font size in all browsers.
 */

small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Embedded content
   ========================================================================== */

/**
 * Remove the border on images inside links in IE 10.
 */

img {
  border-style: none;
}

/* Forms
   ========================================================================== */

/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  line-height: 1.15;
  /* 1 */
  margin: 0;
  /* 2 */
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */

button,
input {
  /* 1 */
  overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */

button,
select {
  /* 1 */
  text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

/**
 * Remove the inner border and padding in Firefox.
 */

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */

fieldset {
  padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */

legend {
  box-sizing: border-box;
  /* 1 */
  color: inherit;
  /* 2 */
  display: table;
  /* 1 */
  max-width: 100%;
  /* 1 */
  padding: 0;
  /* 3 */
  white-space: normal;
  /* 1 */
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */

progress {
  vertical-align: baseline;
}

/**
 * Remove the default vertical scrollbar in IE 10+.
 */

textarea {
  overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box;
  /* 1 */
  padding: 0;
  /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */

[type="search"] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/* Interactive
   ========================================================================== */

/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */

details {
  display: block;
}

/*
 * Add the correct display in all browsers.
 */

summary {
  display: list-item;
}

/* Misc
   ========================================================================== */

/**
 * Add the correct display in IE 10+.
 */

template {
  display: none;
}

/**
 * Add the correct display in IE 10.
 */

[hidden] {
  display: none;
}

button,
label {
  cursor: inherit;
}

*,
*::before,
*::after {
  box-sizing: border-box
}

body {
  display: flex;
  font-family: Roboto, Arial, Helvetica, sans-serif;
  height: 100vh;
}

.field-num {
  display: block;
  margin: 0 7px;
}

.field-num--horizontal {
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-num--horizontal .field-num__title {
  margin: 10px;  
}

.field-num__title {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  min-width: 70px;
  margin-right: 10px;
  color: #2461a0;
}

.field-num__input {
  width: 50px;
  border: none;
  text-align: center;
  color: #2196F3;
}

.field-num__btn {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border: none;
  outline: none;
  background: #dddddd;
  color: #3a5b9b;
  font-size: 20px;
  transition: all ease .4s;
}

.field-num__btn:active {
  background: #ccc;
}

.field-num__input-and-btns {
  display: flex;
  flex-wrap: nowrap;
}

.custom-checkbox {
  display: none;
}

.custom-checkbox-label {
  position: relative;
  display: inline-block;
  outline: none;
  word-break: break-all;
  padding-left: 45px;
}

.custom-checkbox-label[contenteditable="true"] {
  pointer-events: none;
}

.custom-checkbox-label::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 15px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid #fff
}

.custom-checkbox:checked+label::before {
  transition: background .4s;
}

@keyframes swipeToLeft {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes swipeToRight {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.app-content {
  overflow: hidden;
}

.app-content__tab  {
  animation-duration: .5s;
  /* Animation duration нужно для того чтобы установить длительность анимации (её также использует JS) */
  animation-fill-mode: both;
  animation-timing-function: ease-in;
}

.app-content__tab.animation-in.next {
  animation-name: swipeToRight;
  animation-direction: reverse;
}

.app-content__tab.animation-in.prev {
  animation-name: swipeToLeft;
  animation-direction: reverse;
}

.app-content__tab.animation-out.next {
  animation-name: swipeToLeft;
}

.app-content__tab.animation-out.prev {
  animation-name: swipeToRight;

}
.app {
  position: relative;
  background: #fafafa;
  width: 100%;
  min-height: 100%;
  max-width: 640px;
  margin: auto;
}

.app-header {
  display: flex;
  justify-content: space-between;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  transform: translate(-50%, -50%);
  background: #fff;
  z-index: 10;
  padding: 30px 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  display: none;
}

.modal__content {
  max-height: 90vh;
  overflow: auto;
  padding: 15px;
}

.modal.active {
  display: block;
}

.modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
}

.modal__close svg {
  width: 20px;
  height: 20px;
  fill: #333;
  pointer-events: none;
}

.app-title {
  color: #333;
  background: none;
}
.app-nav {
  display: flex;
  justify-content: space-between;
  background: #cccccc;
  border-radius: 8px;
  box-shadow: 0 5px 10px 0 #fafafa;
  margin: 0 15px;
  overflow: hidden;
}

.app-nav__btn {
  flex: 1 0;
  background: #ccc;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: #fafafa;
  outline: none;
  padding: 10px 0;
  transition: all .2s ease;
}

.app-nav__btn.active {
  color: #2196f3;
  background: #fafafa;
}

.app-nav__btn.active:first-child {
  border-radius: 0 8px 0 0;
}
.app-nav__btn.active:last-child {
  border-radius: 8px 0 0 0;
}

.app-content__tab {
  display: none;
  overflow: hidden;
}
.app-content__tab.active {
  display: block;
}


#history {
  padding: 0 15px;
}

.workout-type__week-type {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  color: #fff;
  background: #2461a0;
  padding: 5px;
  border-radius: 4px;
}

.workout-type__week-type.is-lite-week {
  background: #2196f3;
}

.workout-type__list {
  padding: 0;
  margin: 0 15px;
  list-style: none;
}

.free-day-text {
  display: block;
  font-size: 20px;
  text-align: center;
  margin-top: 35px;
}

.workout-type__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin: 10px 15px;
  padding: 12px 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.workout-type__nav-btn {
  border: none;
  background: #eee;
  min-height: 36px;
  border-radius: 4px;
  outline: none;
  transition: all ease .4s;
}

.workout-type__nav-btn:disabled .icon {
  border-color: #ccc
}

.workout-type__nav-btn .icon {
  width: 20px;
  height: 20px;
  display: block;
  border-top: 2px solid #0060ad;
  border-left: 2px solid #0060ad;
  pointer-events: none;
}

.workout-type__nav-btn[data-nav="prev"] .icon {
  transform: rotate(-45deg) translate(3px, 3px);
}

.workout-type__nav-btn[data-nav="next"] .icon {
  transform: rotate(135deg) translate(3px, 3px);
}

.workout-type__nav-btn[data-nav="prev"]:active {
  transform: translateX(-6px);
}
.workout-type__nav-btn[data-nav="next"]:active {
  transform: translateX(6px);
}

.workout-type__title,
.workout-type__info {
  flex: 1 0;
  margin: 0 10px;
  color: #2196F3;
}

.workout-type__info {
  text-align: right;
}

.workout-type__date {
  display: block;
}

.workout-item {
  box-shadow: 0px 2px 10px 2px rgba(34, 60, 80, 0.1);
  border-radius: 8px;
}

.set-timer-duration {
  margin: 20px 0;
}

.set-timer-duration .field-num__input-and-btns {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2461a0;
}

.workout-item__set-fields,
.workout-item__set-form-fields {
  display: flex;
  justify-content: space-around;
  flex: 1 0 0;
}

.workout-item__set-form-fields {
  justify-content: flex-start;
}


.workout-item__set-fields .field-num {
  display: flex;
  align-items: center;
  width: calc(50% - 14px);
}

.workout-item__set-fields .field-num__input {
  background: none;
}

.workout-item__set-fields .field-num__input, 
.workout-item__set-form-fields .field-num__input {
  width: 100%;
  min-width: 35px;
  font-size: 15px;
  transition: all .4s;
}

.workout-item__content {
  position: relative;
  margin-top: 10px;
  font-size: 16px;
  border-radius: 8px;
  color: #ffffff;
  background: #ffffff;
  overflow: hidden;
  transition: background .4s;
  user-select: none;
  z-index: 1;
  box-shadow: 0px 2px 10px 2px rgba(34, 60, 80, 0.2);
  padding: 10px 15px 0px 15px;
  -webkit-tap-highlight-color: transparent
}

.workout-item__sets {
  padding: 0;
  margin-top: -5px;
  padding-top: 5px;
}

.workout-item__set-form {
  position: relative;
  display: flex;
  width: calc(100% + 14px);
  align-items: flex-end;
  /* border-bottom: 1px solid #ccc;
  opacity: 0.8; */
  margin: 10px -7px;
  border-radius: 8px;
  transition: all .8s;
}

.workout-item__set-form.hidden {
  display: none;
}

.workout-item__set-form.visible {
  display: flex;
}

.workout-item__set-form .field-num__title {
  color: #ddd;
  font-size: 12px;
  margin-left: 2px;
  text-transform: uppercase;
}

.workout-item__set-form .field-num__input-and-btns {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2461a0;
}

.workout-item__set-form .field-num {
  flex-direction: column;
}

.workout-item__set.completed {
  background: none;
  pointer-events: none;
}

.workout-item__set.completed:not(:first-child) {
  border-top: 1px solid #ddd;
}

.workout-type--today .workout-item__set.completed {
  border-top: 1px solid #ddd;
}
.workout-type--today .workout-item__set.completed:last-child {
  border-top: none;
}

.workout-item__set {
  display: flex;

}

.workout-item__set:last-child {
  border-bottom: none;
}

.workout-item__title {
  width: 90%;
  margin-bottom: 5px;
  font-size: 16px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.workout-item__sets-number {
  display: block;
  width: 10%;
  font-size: 20px;
  color: #ddd;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  text-align: right;
}

.workout-item__set-number {
  padding: 10px;
  margin-right: 10px;
  color: #2196F3;
  border-right: 1px solid #ddd;
}

.workout-item__set-timer {
  position: absolute;
  font-size: 12px;
  top: -14px;
  color: #ddd;
}

.workout-item__set-form-confirm {
  position: relative;
  box-sizing: content-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-height: 35px;
  margin: 0 5px;
  padding: 0 3px;
  border-radius: 8px;
  background: #ddd;
  border: 1px solid #2461a0;
  outline: none
}

.workout-item__set-form-confirm-title {
  color: #3a5b9b;
  text-transform: uppercase;
  pointer-events: none;
}

.workout-item__set.completed .workout-item__set-form-confirm-title {
  display: none;
}

.workout-item__set.completed .icon {
  display: block;
}

.workout-item__set-form-confirm .icon {
  display: none;
  width: 15px;
  height: 15px;
  fill: #2196F3;
  pointer-events: none;
}

.workout-item__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.workout-type--today .workout-item__sets {
  flex-direction: column-reverse;
}

.workout-item__comment {
  width: 100%;
  margin: 5px 0;
  box-shadow: none;
  font-size: 12px;
  border: none;
  background: none;
  color: #fff;
  border-top: 1px solid #fff
}

.workout-item__comment::placeholder {
  color: rgba(255, 255, 255, .6)
}

.workout-item__content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: all .4s;
  z-index: -1;
  background-image: linear-gradient(0deg, #2196f3 0%, rgba(59, 89, 152, 1) 100%);
}

.workout-item__sets {
  display: flex;
  flex-direction: column;
  list-style: none;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: repeating-linear-gradient(-45deg,
    #ffffff,
    #ffffff 5px,
    rgba(204, 204, 204, 0.05) 5px,
    rgba(204, 204, 204, 0.05) 10px);
}

.workout-item__content-tools {
  margin-left: auto;
  flex-shrink: 0;
  z-index: 1;
}

.history-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #9ec6ff;
  padding: 10px;
  border-radius: 8px;
  color: #fff;
  margin-top: 10px;
}

.history-stat__item-text {
  color: rgb(63, 81, 181);
  margin: 5px;
}

.history-controls {
  margin-top: 50px;
}

.download-results-btn,
.remove-results-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 20px 0;
  border-radius: 8px;
  border: none;
}

/* .workout-item__content-tool {
  padding: 15px 10px;
  background: none;
  border: none;
  outline: none;
} */
/* .workout-item__content-tool--remove {
  padding-right: 15px;
}

.workout-item__content-tool--rename .icon-done {
  display: none;
}

.editing .workout-item__content-tool--rename .icon-rename {
  display: none;
}

.editing .workout-item__content-tool--rename .icon-done {
  display: block;
}

.workout-item__content-tool svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  transition: all .4s;
  pointer-events: none;
}

.workout-item__content--done::before {
  opacity: 0;
}

.workout-item__content--done .workout-item__content-tool svg {
  fill: #d7dde8;
}

.workout-item__content--done .workout-item__content-text::before {
  border-color: #d7dde8;
  background: #d7dde8;
}

.workout-item__content--done .workout-item__content-text  {
  text-decoration: line-through;
  color: #d7dde8;
} */

.history__title {
  display: block;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #2196F3;
}

.history__item-title {
  display: block;
  width: 90%;
  font-size: 18px;
  margin-bottom: 10px;
}

.history__item {
  display: flex;
  flex-direction: column;
  margin-right: 10px;
  padding: 10px;
  border-radius: 8px;
}

.history__item:nth-child(even) {
  background: rgb(224, 237, 255)
}

.history__item:nth-child(odd) {
  background: rgba(158, 158, 158, .15)
}

.history__item[data-week-number]::before {
  content: 'Неделя №' attr(data-week-number);
  display: block;
  margin-bottom: 15px;
  padding: 5px;
  background: #9ec6ff;
  color: #fff;
  border-bottom: 3px solid #fff;
  text-align: right;
}

.history__item-table {
  border-collapse: collapse;
  margin-bottom: 20px;
}

.history__item-table .good {
  background: rgba(76, 175, 80, 0.2);
}

.history__item-table .bad {
  background: rgba(255, 165, 0, 0.2);
}

.history__item-date {
  display: block;
  text-align: right;
  color: #9ec6ff;
  font-weight: bold;
  margin-top: auto;
}

.history__item-table td {
  padding: 5px 0;
  border: 1px solid #2196f3;
  text-align: center;
  min-width: 45px;
}

.history__item-table .table-cell-number {
  min-width: 30px;
}


.history__item-table th {
  text-align: left;
  color: #2196F3;
}

.history__group {
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.history__group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 15px;
}

.history__group-content {
  display: flex;
  overflow: auto;
  padding: 10px;
}

.history__group-title {
  display: inline-block;
  width: 90%;
  color: #2461a0;
}

.history__group-weight {
  font-size: 18px;
  font-weight: 600;
  color: #2196f3;
  line-height: 1.5;
}

