:root {
  --color-brand--1: #fcff45;
  --color-brand--2: #00bec4;

  --color-dark--1: #0a151d;
  --color-dark--2: #3f464d;
  --color-light--1: rgb(170, 170, 170);
  --color-light--2: #e8e8e8;
  --color-light--3: rgb(220, 220, 220);

  --color-red: rgb(228, 27, 36);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  font-size: 62.5%;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--color-light--2);
  font-weight: 400;
  line-height: 1.6;
  height: 100vh;
  overscroll-behavior-y: none;

  background-color: #fff;
  padding: 2rem;

  display: flex;
}

/* Основное */
a:link,
a:visited {
  color: var(--color-brand--1);
}

/* Боковая панель */
.sidebar {
  flex-basis: 70rem;
  background-color: var(--color-dark--1);
  padding: 5rem 3rem 3rem 3rem;
  display: flex;
  flex-direction: column;
}

.icon {
  height: 7.5rem;
  align-self: center;
  margin-bottom: 4rem;
}

.workouts {
  list-style: none;
  height: 77vh;
  overflow-y: scroll;
  overflow-x: hidden;
}

.workouts::-webkit-scrollbar {
  width: 0;
}
.remove__btn {
  background: none;
  border: none;
  cursor: pointer;
}
.remove__btn:hover {
  transform: rotate(30deg);
}

.workout {
  background-color: var(--color-dark--2);
  border-radius: 5px;
  padding: 1.5rem 2.25rem;
  margin-bottom: 1.75rem;
  cursor: pointer;

  display: grid;
  /* grid-template-columns: 1fr 1fr 1fr 1fr; */
  gap: 2.75rem;
}
.workout--running {
  border-left: 5px solid var(--color-brand--2);
}
.workout--cycling {
  border-left: 5px solid var(--color-brand--1);
}
.workout__header {
  display: flex;
  justify-content: space-between;
}

.workout__title {
  font-size: 1.7rem;
  font-weight: 600;
  grid-column: 1 / -1;
}
.all__details {
  display: flex;
  justify-content: space-between;
}
.workout__details {
  display: flex;
  align-items: baseline;
}

.workout__icon {
  font-size: 1.8rem;
  margin-right: 0.2rem;
  height: 0.28rem;
}

.workout__value {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.workout__unit {
  font-size: 1.1rem;
  color: var(--color-light--1);
  text-transform: uppercase;
  font-weight: 800;
}

.form {
  background-color: var(--color-dark--2);
  border-radius: 5px;
  padding: 1.5rem 2.75rem;
  margin-bottom: 1.75rem;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2.5rem;

  /* Match height and activity boxes */
  height: 9.25rem;
  transition: all 0.5s, transform 1ms;
}

.form.hidden {
  transform: translateY(-30rem);
  height: 0;
  padding: 0 2.25rem;
  margin-bottom: 0;
  opacity: 0;
}

.form__row {
  display: flex;
  align-items: center;
}

.form__row--hidden {
  display: none;
}

.form__label {
  flex: 0 0 50%;
  font-size: 1.5rem;
  font-weight: 600;
}

.form__input {
  width: 100%;
  padding: 0.3rem 1.1rem;
  font-family: inherit;
  font-size: 1.4rem;
  border: none;
  border-radius: 3px;
  background-color: var(--color-light--3);
  transition: all 0.2s;
}

.form__input:focus {
  outline: none;
  background-color: #fff;
}

.form__btn {
  display: none;
}

.footer__copyright {
  margin-top: auto;
  font-size: 1.3rem;
  text-align: center;
  color: var(--color-light--1);
}

.footer__button {
  display: flex;
  justify-content: center;
}

.reset__btn {
  background-color: var(--color-red);
  color: white;
  padding: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.4rem;
  width: 20rem;
  border-style: none;
  transition: all 0.2s linear;
}
.reset__btn:hover {
  color: var(--color-red);
  background-color: var(--color-light--2);
}

.reset__btn.hidden {
  display: none;
}

.footer__link:link,
.footer__link:visited {
  color: var(--color-light--1);
  transition: all 0.2s;
}

.footer__link:hover,
.footer__link:active {
  color: var(--color-light--2);
}

/* MAP */
#map {
  flex: 1;
  height: 100%;
  background-color: var(--color-light--1);
}

/* Popup width is defined in JS using options */
.leaflet-popup .leaflet-popup-content-wrapper {
  background-color: var(--color-dark--1);
  color: var(--color-light--2);
  border-radius: 5px;
  padding-right: 0.6rem;
}

.leaflet-popup .leaflet-popup-content {
  font-size: 1.5rem;
}

.leaflet-popup .leaflet-popup-tip {
  background-color: var(--color-dark--1);
}

.running-popup .leaflet-popup-content-wrapper {
  border-left: 5px solid var(--color-brand--2);
}
.cycling-popup .leaflet-popup-content-wrapper {
  border-left: 5px solid var(--color-brand--1);
}
