: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;
  overscroll-behavior-y: none;
}

/* GENERAL */
a:link,
a:visited {
  color: var(--color-brand--1);
}
.leaflet-left {
  display: none;
}
/* SIDEBAR */
.app {
  display: flex;
  height: 100vh;
}
.sidebar {
  background-color: var(--color-dark--1);
  padding: 3rem 5rem 4rem 5rem;
  display: flex;
  flex-direction: column;
  width: 50rem;
  position: relative;
  transition: 0.34s ease-in-out;
  align-items: center;

  img,
  ul,
  .copyright {
    display: block;
    opacity: 1;
  }
  .options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min-content;
    position: absolute;
    right: -18px;
    z-index: 5;

    .btn-op {
      background: #fff;
      box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.4);
      width: 35px;
      height: 35px;
      font-size: 20px;
      outline: none;
      border: 2px solid #00c46a;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}

.sidebar-hidden {
  width: 0px;
  padding: 20px;
  img,
  ul,
  .copyright {
    display: none;
    opacity: 0;
  }
  .btn-op {
    rotate: 180deg;
  }
}

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

.workouts {
  list-style: none;
  height: 77vh;
  overflow-y: scroll;
  overflow-x: hidden;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.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;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0.75rem 1.5rem;
  width: 100%;
  .deleteWork {
    position: absolute;
    right: 0px;
    top: 0px;
    color: #fff;
    background: transparent;
    outline: none;
    border: none;
    padding: 10px;
    cursor: pointer;
  }
}
.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;
  height: 9.25rem;
  /* width: 100%; */
  width: 38rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  height: fit-content;
  transition: all 0.5s, transform 1ms;
}

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

.form__row {
  display: flex;
  align-items: center;
  width: 100%;

  option {
    background: #fff;
    font-size: 12px;
  }
}

.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 {
  width: 100%;
  padding: 9px;
  border: none;
  border-radius: 50px;
  background-color: #00c46a;
  color: #fff;
  font-weight: 700;
}

.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 {
  width: 100%;
  height: 100%;
  background-color: var(--color-light--1);
  z-index: 3;
}

/* 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);
}

/* modil popup  */
.modilPH {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  .modil {
    width: 400px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    text-align: center;
    z-index: 99999;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.3);
    position: absolute;
    text-align: center;
    top: 8%;
    transition: 0.4s ease-in-out;
    .btns {
      .btnModil {
        width: 100%;
        padding: 9px;
        border: none;
        border-radius: 50px;
        background-color: #00c46a;
        color: #fff;
        font-weight: 700;
        cursor: pointer;
      }
    }
    h2 {
      margin-bottom: 20px;
      font-size: 20px;
      color: #2d3439;
    }
    h3 {
      margin-bottom: 20px;
      font-size: 18px;
      color: #42484d;
    }

    .close-modal {
      position: absolute;
      top: 1.2rem;
      right: 2rem;
      font-size: 30px;
      color: #333;
      cursor: pointer;
      border: none;
      background: none;
      background-color: transparent;
    }
  }
}
.hidden {
  top: -120%;
  opacity: 0;
  z-index: 0;
}
.hidden {
  display: none;
}
.bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  transition: 0.4s ease-in-out;
  z-index: 5;
  cursor: pointer;
}

@media (max-width: 1000px) {
  .app {
    height: 105vh;

    .sidebar {
      width: 100%;
      .options {
        right: 20px;
        top: 20px;
      }
      .form {
      width: 96%;
        scale: 0.9;
        .form__row {
          width: 100%;
        }
      }
    }
    .sidebar-hidden {
      width: 0%;
      .options {
        right: -18px;
      }
    }
    .workouts {
      min-width: 390px;
      .workout {
        width: 96%;
          scale: 0.9;
      }
    }
  }
    .modilPH {
    .modil {
      width: 88%;
    }
  }
}
