/*********************
  font imports
*********************/
@import url("https://fonts.googleapis.com/css2?family=Play:wght@400;700&display=swap");

/*********************
  global variables
*********************/
:root {
  --clr-white: #fff;
  --clr-light: #999;
  --clr-error: #d90429;
  --clr-success: #20ac64;
  --clr-warning: #ffe033;
  --clr-info: #06aed5;
  --clr-greyL: #222;
  --clr-greyD: #1a1a1a;
  --clr-border: #4d4d4d;
  --fnt-default: "Play", sans-serif;
  --brd-radius: 25px;
  /* offset-x | offset-y | blur | spread | color */
  --box-shadows: 0 0 1em 0.75em rgba(0, 0, 0, 0.4);
}

/*********************
  scrollbars
*********************/
::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  background: transparent !important;
  border: none;
}

::-webkit-scrollbar-thumb {
  background: none var(--clr-error) !important;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-thumb:window-inactive {
  background: transparent !important;
}

::-webkit-scrollbar-track {
  background: none rgba(0, 0, 0, 0.2);
}

/*********************
  general settings
*********************/
* {
  padding: 0;
  margin: 0;
  border: none;
  box-sizing: border-box;
  outline: none;
  scroll-behavior: smooth;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html {
  width: 100%;
  height: 100vh;
  font-size: 10px;
}

body {
  width: 100%;
  height: 100vh;
  background-color: var(--clr-greyL);
  color: var(--clr-white);
  font-family: var(--fnt-default);
  font-family: var(--fnt-default);
  font-size: 1.6rem;
  text-decoration: none;
  cursor: default;
}

a,
a:link,
a:active,
a:visited,
a:hover,
a:focus {
  color: var(--clr-white);
  text-decoration: none;
}

p {
  font-size: 1.1em;
  line-height: 1.3em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
}

pre {
  display: inline-block;
  font-family: monospace;
  font-size: 0.9em;
  color: var(--clr-light);
  background-color: var(--clr-greyD);
  padding: 0.2em 0.4em;
  margin: 0 0 0.2em 0;
  border-radius: 0.2em;
}

/*********************
  navigation menu
*********************/
/* checkbox - controlling menu dropdown */
#menuStatusCheckbox {
  display: none;
}

/* checkbox label controlling checkbox status */
#menuStatusLabel {
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 1;
}

/* activate/deactivate dropdown */
#menuStatusCheckbox:checked ~ nav {
  transform: translateY(0%);
}

/* activate/deactivate dropdown */
#menuStatusCheckbox:checked ~ .grid .arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.menuBtn {
  width: 32px;
  height: 32px;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.arrow {
  opacity: 0.5;
  z-index: 1;
  transition: transform 250ms ease-in-out;
}

nav {
  z-index: 5;
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--clr-greyD);
  transform: translateY(100%);
  transition: transform 250ms ease-in-out;
}

nav ul {
  width: 100%;
  list-style: none;
  font-size: 1.25em;
}

nav li {
  margin: 0.15em 0;
  padding: 0;
  text-transform: uppercase;
  background-color: var(--clr-greyL);
}

nav a {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  text-decoration: none;
  width: 100%;
  height: 100%;
  padding: 1.25em 3em;
  color: #fff;
}

.link-version {
  background-color: #1c1c1c;
}

.version {
  font-size: 0.7em;
  color: var(--clr-border);
}

/*********************
  page sections
*********************/
.grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 275px 1fr 10vh;
  width: 100vw;
  height: 100vh;
}

header {
  grid-row: 1;
  padding: 2.5rem 2em 0 2em;
  display: flex;
  justify-content: center;
  align-items: center;
}

main {
  grid-row: 2;
  overflow: scroll;
  padding: 0 2em;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: anmUp 500ms ease-in-out;
}

.texts {
  overflow: scroll;
}

footer {
  grid-row: 3;
  place-self: center;
  text-align: center;
  z-index: 10;
}

.indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150px;
  z-index: -1;
  animation: anmDwn 750ms ease-in-out;
}

.display {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  min-height: 175px;
  max-height: 175px;
  background-color: var(--clr-greyD);
  border-radius: var(--brd-radius);
  border: 1px solid var(--clr-greyL);
  box-shadow: var(--box-shadows);
  z-index: 1;
  overflow: hidden;
  animation: anmDwn 500ms ease-in-out;
}

/* gps-row */
.gps-position {
  z-index: 2;
  width: 100%;
  padding: 0 2em;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  font-size: 0.85em;
}

.timestamp {
  font-size: 0.8em;
  color: var(--clr-light);
}

.pos,
.pos-details {
  height: 2.4em;
}

.pos-details {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
  align-items: flex-start;
  font-size: 1em;
}

.distance {
  position: relative;
  align-self: center;
  font-size: 1.1em;
  align-content: center;
  align-items: center;
}

.navto {
  position: relative;
  align-self: center;
  font-size: 1.75em;
  align-content: center;
  align-items: center;
}

#timeOutput {
  font-size: 4em;
  font-weight: 400;
  line-height: 1em;
}

/*********************
  utility classes
*********************/
/* buttons */
.btn,
.input {
  width: 100%;
  padding: 0.75em 1em;
  border-radius: 15px;
  font-family: "Play", sans-serif;
  color: var(--clr-white);
}

.input {
  margin-bottom: 0.5em;
  background: var(--clr-greyD);
  border: 2px solid var(--clr-border);
  font-size: 1em;
  font-weight: 400;
  line-height: 1.5em;
  -webkit-user-select: all;
  -moz-user-select: all;
  -ms-user-select: all;
  user-select: all;
}

.btn {
  cursor: pointer;
  font-size: 1.5em;
  line-height: 1em;
  text-transform: uppercase;
}

/* background colors */
.bg-error {
  background-color: var(--clr-error);
}

.bg-success {
  background-color: var(--clr-success);
}

.bg-default {
  background-color: var(--clr-border);
}

.bg-warning {
  background-color: var(--clr-warning);
}

.bg-info {
  background-color: var(--clr-info);
}

.bg-light {
  background-color: var(--clr-light);
}

.bg-dark {
  background-color: var(--clr-greyL);
}

/* text colors */
.txt-error {
  color: var(--clr-error);
}

.txt-success {
  color: var(--clr-success);
}

.txt-default {
  color: var(--clr-border);
}

.txt-warning {
  color: var(--clr-warning);
}

.txt-info {
  color: var(--clr-info);
}

.txt-light {
  color: var(--clr-light);
}

.txt-dark {
  color: var(--clr-greyL);
}

/* margins */
.m-t-5 {
  margin-top: 0.5em;
}

.m-t-10 {
  margin-top: 1em;
}

.m-b-5 {
  margin-bottom: 0.5em;
}

.m-b-10 {
  margin-bottom: 1em;
}

.m-b-15 {
  margin-bottom: 1.5em;
}

.m-b-20 {
  margin-bottom: 2em;
}

.m-b-50 {
  margin-bottom: 5em;
}

.m-l-15 {
  margin-left: 1.5em;
}

.about-scroll {
  width: 100%;
  padding: 0;
  overflow-y: scroll;
}

/* padding */
.padding-10 {
  padding: 1em;
}

.icon {
  width: 32px;
  text-align: center;
}

/* width */
.w-100 {
  width: 100%;
}

/* opacity */
.opacity-10 {
  opacity: 0.1;
}

.opacity-25 {
  opacity: 0.25;
}

.opacity-50 {
  opacity: 0.5;
}

/* text-alignment */
.align-center {
  text-align: center;
}

.align-left {
  text-align: left;
}

.align-right {
  text-align: right;
}

.text-sm {
  font-size: 0.9em;
  color: var(--clr-light);
}

.ls-25 {
  letter-spacing: 0.25em;
}

/*********************
  page loader spinner
*********************/
.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 998;
}

.lds-ring {
  display: block;
  position: absolute;
  width: 80px;
  height: 80px;
  z-index: 999;
}

.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid var(--clr-error);
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: var(--clr-error) transparent transparent transparent;
}

.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}

.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}

.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}

.fs-14 {
  font-size: 14px;
}

/*********************
  animations
*********************/
@keyframes anmDwn {
  0% {
    transform: translateY(-200%);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes anmUp {
  0% {
    transform: translateY(100%);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/*********************
  media-queries
  screen sizes
*********************/
@media screen and (orientation: landscape) {
  main .texts {
    display: none;
  }

  footer {
    display: none;
  }

  .indicator {
    height: 50%;
  }

  .grid {
    grid-template-rows: 1fr;
  }

  header {
    padding: 0;
  }

  .display {
    min-width: 375px;
    width: 50%;
  }

  .logo,
  .link-version {
    display: none;
  }

  nav a {
    padding: 1.5em 5em;
  }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
  main,
  footer {
    display: none;
  }
}
