:root {
  --color-brand--1: #ffb545;
  --color-brand--2: #00c46a;

  --color-dark--1: #2d3439;
  --color-dark--2: #42484d;
  --color-light--1: #aaa;
  --color-light--2: #ececec;
  --color-light--3: rgb(214, 222, 224);
}

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

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

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

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

  display: flex;
  overflow: hidden;
}

/* GENERAL */
a:link,
a:visited {
  color: var(--color-brand--1);
}

/* SIDEBAR */
.sidebar {
  position: relative;
  flex-basis: 50rem;
  background-color: var(--color-dark--1);
  padding: 3rem 5rem 4rem 5rem;
  display: flex;
  flex-direction: column;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.head .reset {
  padding: 10px;
  background-color: rgb(0, 197, 106);
  color: #000;
  margin-bottom: 4rem;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  border-radius: 3px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  -ms-border-radius: 3px;
  -o-border-radius: 3px;
  transition: 0.5s;
  -webkit-transition: 0.5s;
  -moz-transition: 0.5s;
  -ms-transition: 0.5s;
  -o-transition: 0.5s;
}

.head .reset:hover {
  background-color: var(--color-dark--2);
  color: var(--color-light--2);
}

.logo {
  height: 5.2rem;
  align-self: center;
  margin-bottom: 4rem;
}

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

.workouts::-webkit-scrollbar {
  width: 0;
}

.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: 0.75rem 1.5rem;
}
.workout--running {
  border-left: 5px solid var(--color-brand--2);
}
.workout--cycling {
  border-left: 5px solid var(--color-brand--1);
}

.workout__title {
  font-size: 1.7rem;
  font-weight: 600;
  grid-column: 1 / -1;
}

.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;
}

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

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

.twitter-link:hover,
.twitter-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);
}

/*Errors*/

.enableLocation {
  z-index: 9999;
  /* width: 100%; */
  /*height: 200px;
  */
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  top: 6%;
  transform: translate(-50%, 0);
  -webkit-transform: translate(-50%, 0);
  -moz-transform: translate(-50%, 0);
  -ms-transform: translate(-50%, 0);
  -o-transform: translate(-50%, 0);
  transition: 0.5s;
  -webkit-transition: 0.5s;
  -moz-transition: 0.5s;
  -ms-transition: 0.5s;
  -o-transition: 0.5s;
}

.enableLocation .content {
  font-size: 1.8rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  padding: 15px 25px;
  width: fit-content;
  border: 2px solid #e74c3c;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-transform: none;
}
/***************/
.enableLocation .buttonConainer {
  display: flex;
  margin-top: 20px;
  justify-content: space-evenly;
  align-items: center;
}

.enableLocation .ok-hide-Errer,
.deleteAll,
.inputOk {
  display: inline-block;
  margin: 10px 5px 0;
  background-color: #e74c3c;
  color: #fff;
  padding: 8px 16px;
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s;
}

.enableLocation .ok-hide-Errer:hover {
  background-color: #c0392b;
}
/************************/

.enableLocation .Canncel {
  display: inline-block;
  margin: 10px 5px 0;
  background-color: #dddfe0;
  color: #333;
  padding: 8px 16px;
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;

  text-align: center;
  transition: background-color 0.3s;
}

.enableLocation .Canncel:hover {
  background-color: #95a5a6;
}
/***********************/
.hide-error {
  opacity: 0;
  transform: translate(-50%, -20px);
  pointer-events: none;
}

.was-added {
  position: absolute;
  opacity: 0;
  bottom: -10%;
  left: 50%;
  width: fit-content;
  height: fit-content;
  text-align: center;
  background-color: #fafafa;
  color: #000;
  border: #00c46a 1px solid;
  transform: translate(-5%, 50%);
  -webkit-transform: translate(-5%, 50%);
  -moz-transform: translate(-5%, 50%);
  -ms-transform: translate(-5%, 50%);
  -o-transform: translate(-5%, 50%);
  z-index: 99999;

  transition: 0.3s;
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -ms-transition: 0.3s;
  -o-transition: 0.3s;
}

.was-added p {
  font-size: 1.5rem;
  font-weight: 800;
  padding: 10px 15px;
  text-align: center;
}

.show-added {
  bottom: 10%;
  opacity: 1;
}

.hide {
  display: none !important;
}
