@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@200;400&family=Orbitron&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poiret+One&display=swap');

:root {
  --color-brand--1: #45ffd7;
  --color-brand--2: #00c46a;
  --color-brand--3: #ff5c33;
  --color-brand--4: #5c5cd6;
  --color-dark--1: #2d3439;
  --color-dark--2: #42484d;
  --color-light--1: #aaa;
  --color-light--2: #ececec;
  --color-light--3: rgb(214, 222, 224);
  --color-light: #ffffff;
  --btn-conversion: #ff9900;
}

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

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

body {
  /*  font-family: 'Manrope', sans-serif;*/
  font-family: 'Orbitron', sans-serif;
  color: var(--color-light--2);
  font-weight: 400;
  line-height: 1.6;
  height: 100vh;
  overscroll-behavior-y: scroll;
  scroll-behavior: smooth;
  overflow-x: hidden;
  border: 2px solid var(--color-dark--1);
  background: linear-gradient(90deg, rgba(34, 136, 6, 0) 0%, rgba(0, 212, 255, 1) 100%);
  box-shadow: 2px 2px 7px black;
  padding: 2.5rem;
  display: flex;
}

/*----------------------------- Start of: Dark Light mode Toggle --------------------------------*/
.darkMode {
  position: absolute;
  top: 3%;
  right: 6%;
  z-index: 1400;
}

.dark-mode {
  background-color: black;
  color: white;
}

#darkMode {
  display: block;
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  width: 116px;
  height: 56px;
  margin: 0 auto;
  background-color: #77b5fe;
  border-radius: 56px;
  transform: translateY(-50%);
  cursor: pointer;
  transition: 0.3s ease background-color;
  overflow: hidden;
}

#star {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 30px;
  height: 30px;
  background-color: #fafd0f;
  transform: scale(1);
  border-radius: 50%;
  transition: 0.3s ease top, 0.3s ease left, 0.3s ease transform, 0.3s ease background-color;
  z-index: 1;
}

#star-1 {
  position: relative;
}

#star-2 {
  position: absolute;
  transform: rotateZ(36deg);
}

.star {
  top: 0;
  left: -7px;
  font-size: 54px;
  line-height: 28px;
  color: #fafd0f;
  transition: 0.3s ease color;
}

#moon {
  position: absolute;
  bottom: -52px;
  right: 8px;
  width: 40px;
  height: 40px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.3s ease bottom;
}

#moon:before {
  content: "";
  position: absolute;
  top: -12px;
  left: -17px;
  width: 40px;
  height: 40px;
  background-color: #03a9f4;
  border-radius: 50%;
  transition: 0.3s ease background-color;
}

#toggle_checkbox:checked+label {
  background-color: #000;
}

#toggle_checkbox:checked+label #star {
  top: 3px;
  left: 64px;
  transform: scale(0.3);
  background-color: yellow;
}

#toggle_checkbox:checked+label .star {
  color: yellow;
}

#toggle_checkbox:checked+label #moon {
  bottom: 8px;
}

#toggle_checkbox:checked+label #moon:before {
  background-color: #000;
}

/* ---------------------------End of: Dark Light Mode Toggle --------------------------------------*/

.custom-swal-popup {
  font-family: 'Kanit', Helvetica, Arial, sans-serif;
  border: 1px solid rgb(79, 79, 79);
  border-radius: 12px;
  box-shadow: 1px 1px 2px 2px rgba(5, 5, 5, 0.8);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.custom-swal-text {
  font-size: 2rem !important;
}

.custom-confirm-button {
  font-family: 'Kanit',
    Helvetica,
    Arial,
    sans-serif;
  font-size: 2rem;
  width: 120px;
  border: none;
  transition: all 0.3s ease;
}

.custom-confirm-button:hover {
  border: 1px solid black;
  font-size: 1.5rem;
  background-color: rebeccapurple;
}

/* .custom-confirm-button {
  font-size: 2rem;
  width: 140px;
  border: none;
}

.custom-confirm-button:hover {
  font-size: 2rem;
  border: 1px solid black;
  background-color: rebeccapurple;

} */


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

/* SIDEBAR */
.sidebar {
  flex-basis: 50rem;
  background-color: var(--color-dark--1);
  box-shadow: 2px 2px 5px black inset;
  padding: 3rem 5rem 4rem 5rem;
  display: flex;
  flex-direction: column;
}

/* Start of: Graph Plots and Water Waves, have removed it for now, but may incorporate it again*/

canvas[resize] {
  width: 100%;
  height: 100%;
}

#water_wave {
  cursor: pointer;
  position: absolute;
  width: 100%;
  height: 200px;
  left: 24%;
  bottom: 0%;
  z-index: 10;
  /* z-index: 2000;*/
}

svg {
  background-color: transparent;
}

/*.piechart {
  background-color: transparent;
}
*/
#myChart {
  cursor: pointer;
  position: absolute;
  bottom: 40px;
  right: 5%;
}

#myPlot {
  position: absolute;
  top: 100;
  left: 50%;
  background: none;
  background: transparent;
  background-color: transparent;
}

/* End of: Graph Plots and Waterwaves */

.logo {
  z-index: 7;
  align-self: center;
  position: relative;
  top: -23px;
  left: 176px;
}

.road-map {
  align-self: center;
  position: relative;
  top: 0px;
  margin-bottom: 2.5rem;
}

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

.workout--running {
  border-left: 5px solid var(--color-brand--2);
}

.workout--skating {
  border-left: 5px solid var(--color-brand--3);
}

.workout--walking {
  border-left: 5px solid var(--color-brand--4);
}

.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;
  margin-right: 4px;
  padding-right: 4px;
}

.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;
  cursor: pointer;
}


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

.form__btn {
  display: none;
  cursor: pointer;
  border-radius: 4px;
  text-align: center;
  color: white;
  background-color: var(--color-brand--1);
  margin-bottom: 7px;
}


.form__btn:hover {
  background-color: var(--color-brand--2);
}

/*Start of: Convert KM to Miles*/

.km2miles {
  border: 1px solid black;
  border-right: none;
  margin-top: 0px;
  padding-top: -10px;
  padding: 4px;
  padding-left: 14px;
  font-size: 1.3em;
  font-family: 'Kanit', Helvetica, Arial, sans-serif;
  width: auto;
}

.km2mile {
  position: absolute;
  left: 4px;
  border: 2px solid black;
  background-color: #ccc;
  width: 24px;
  padding-left: 7px;
  outline: none;
}

.labelKM {
  padding-left: 7px;
  padding-top: -10px;
  margin-top: -10px;
  font-size: 1.3em;
  font-family: 'Kanit', Helvetica, Arial, sans-serif;
  width: auto;

}

.inputkm2miles {
  width: 80px;
  padding-left: 7px;
}


.btn_km {
  cursor: pointer;
  position: relative;
  top: 26px;
  font-size: 1.3em;
  font-family: Helvetica, Arial;
  border: 1px solid black;
  border-radius: 2px;
  padding: 7px;
  margin-left: 4px;
  text-align: right;
}

#btn_km {
  width: 58px;
  height: 58px;
}

.btn_km:hover {
  background-color: var(--btn-conversion);
  border: 2px solid #fff;
}

#btn_eraser {
  width: 50px;
  height: 50px;
}

.btn_eraser:hover {
  -webkit-animation: alert 2s ease-in-out 0s 1 normal;
  -moz-animation: alert 2s ease-in-out 0s 1 normal;
  -ms-animation: alert 2s ease-in-out 0s 1 normal;
  animation: alert 2s ease-in-out 0s 1 normal;
}

/*End of: KM to Miles*/

/*Music*/
.music_note {
  position: absolute;
  left: 25%;
  bottom: 24px;
}

#music_note {
  z-index: 1000;
  width: 58px;
  height: 58px;
}

.music_note:hover {
  transform: scale(1.2);
  opacity: 0.5;

}

.copyright {
  position: absolute;
  bottom: 0px;
  margin-top: auto;
  font-size: 1.3rem;
  text-align: center;
  color: var(--color-light--1);
  background: rgb(40, 163, 5);
  background: linear-gradient(90deg, rgba(34, 136, 6, 0) 0%, rgba(0, 212, 255, 1) 100%);
}

.foot-print {
  z-index: 1000;
  position: absolute;
  bottom: 24px;
  left: 28%;
  width: 90px;
  height: auto;
  rotate: 35deg
}

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

.weather_widget {
  position: absolute;
  z-index: 2000;
  top: 27%;
  right: 2%;
}

.delete_workout {
  display: none;
}

.delete_workout_show {
  display: block;
}

.editdelete_workout {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  position: absolute;
  bottom: 12%;

}

.fade_in {
  -webkit-animation: bounce-in 1s ease-in-out 0s 1 normal;
  -moz-animation: bounce-in 1s ease-in-out 0s 1 normal;
  -ms-animation: bounce-in 1s ease-in-out 0s 1 normal;
  animation: bounce-in 1s ease-in-out 0s 1 normal;
}


/* 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;
  font-family: 'Kanit', sans-serif;
}

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

.leaflet-popup .leaflet-popup-tip {
  background-color: var(--color-dark--1);
  font-family: 'Kanit', Helvetica, Arial, sans-serif;
  width: auto;
}

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

.skating-popup .leaflet-popup-content-wrapper {
  border-left: 5px solid var(--color-brand--3);
}

.walking-popup .leaflet-popup-content-wrapper {
  border-left: 5px solid var(--color-brand--4);
}


/* Zoom Controls: not working */

/*
.leaflet-control-zoom:hover {
  background-color: orange;
  color: green;
}

.leaflet-control-zoom-in:hover {
  background-color: orange;
}

.leaflet-control-zoom-out:hover {
  background-color: orangered;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  font: bold 18px 'Lucida Console', Monaco, monospace;
  text-indent: 1px;
  background-color: orange;
}

.leaflet-control-zoom-out {
  font-size: 20px;
}

.leaflet-touch .leaflet-control-zoom-in {
  font-size: 22px;
}

.leaflet-touch .leaflet-control-zoom-out {
  font-size: 24px;
}

*/

/*Start of: Bargraph Toggle switch*/

#toggleSwitch {
  position: absolute;
  bottom: 7%;
  right: 1.3%;
  z-index: 1200;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked+.slider {
  background-color: #2196F3;
}

input:focus+.slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/*End of: Bargraph Toggle switch*/

/*Start of: Animations*/

@-webkit-keyframes alert {
  0% {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }

  5% {
    -webkit-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  10% {
    -webkit-transform: translateX(10px);
    transform: translateX(10px);
  }

  15% {
    -webkit-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  20% {
    -webkit-transform: translateX(10px);
    transform: translateX(10px);
  }

  25% {
    -webkit-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  30% {
    -webkit-transform: translateX(10px);
    transform: translateX(10px);
  }

  35% {
    -webkit-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  40% {
    -webkit-transform: translateX(10px);
    transform: translateX(10px);
  }

  45% {
    -webkit-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  50% {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
}

@keyframes alert {
  0% {
    -ms-transform: translateX(0);
    transform: translateX(0);
  }

  5% {
    -ms-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  10% {
    -ms-transform: translateX(10px);
    transform: translateX(10px);
  }

  15% {
    -ms-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  20% {
    -ms-transform: translateX(10px);
    transform: translateX(10px);
  }

  25% {
    -ms-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  30% {
    -ms-transform: translateX(10px);
    transform: translateX(10px);
  }

  35% {
    -ms-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  40% {
    -ms-transform: translateX(10px);
    transform: translateX(10px);
  }

  45% {
    -ms-transform: translateX(-10px);
    transform: translateX(-10px);
  }

  50% {
    -ms-transform: translateX(0);
    transform: translateX(0);
  }
}

@-webkit-keyframes bounce-in {
  0% {
    opacity: 0;
    -webkit-transform: scale(.3);
    transform: scale(.3);
  }

  50% {
    opacity: 1;
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
  }

  70% {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(.3);
  }

  50% {
    opacity: 1;
    transform: scale(1.0);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

@-webkit-keyframes zoom-in-out {
  0% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }

  50% {
    -webkit-transform: scale(1.2);
    transform: scale(1.2);
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes zoom-in-out {
  0% {
    -ms-transform: scale(1);
    transform: scale(1);
  }

  50% {
    -ms-transform: scale(1.2);
    transform: scale(1.2);
  }

  100% {
    -ms-transform: scale(1);
    transform: scale(1);
  }
}

/*End of: Animations*/