/* With code from: https://codepen.io/MarcMalignan/pen/kftvL?q=compass&limit=all&type=type-pens */
/* base colour in hex: #C12E2E; Compass background color: #444 */


:root {
  --hue: 0;
  --saturation: 80%;
  --lightness: 47%;
  --compass-rotation: 0deg;
  --compass-red: hsla(var(--hue), var(--saturation), var(--lightness), 1);

  --black-ligth: 5%;
  --black: hsla(var(--hue), var(--saturation), var(--black-ligth), 1);
  --black-t: hsla(var(--hue), var(--saturation), var(--black-ligth), .9);

  --dark-light: 20%;
  --dark: hsla(var(--hue), var(--saturation), var(--dark-light), 1);
  --dark-t: hsla(var(--hue), var(--saturation), var(--dark-light), .9);

  --white: hsla(var(--hue), var(--saturation), 90%, 1);
  --blue: #4183D7;

  --drop-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);

  --font-size: 20px;
}

*, *:after, *:before {
    box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Roboto', 'Segoe UI', 'Helvetica', sans-serif;
  font-size: var(--font-size);
}
body {
    margin: 0;
    background: var(--black);
    color: var(--white);
}

input, button {
  font-size: inherit;
}

.rounded {
  border-radius: 50%;
  border: none;
  font-size: 150%;
  width: 55px;
  height: 55px;
  box-shadow: var(--drop-shadow);
}
.floating-right {
  position: fixed;
  top: .25em;
  right: .25em;
}

.info {
  background: var(--white);
}
.error {
  background-color: var(--compass-red);
  color: var(--white);
}

.compass-wrap {
  --compass-size: calc(100vw / 1.75);
  position: relative;
  width: var(--compass-size);
  height: var(--compass-size);
  pointer-events: none;
  margin-top: 1.5em;
}
.compass {
  position: absolute;
  width:100%;
  height:100%;
  background: var(--black-t);
  border-radius: 0 50% 50% 50%;
  border: 10px solid var(--white);
  box-shadow: 0 0 8px rgba(0,0,0,0.23);
  border-right-color: var(--compass-red);
  border-bottom-color: var(--compass-red);
  box-sizing: border-box;
  transform: rotate(var(--compass-rotation));
  transition: transform .5s ease;
}
.compass-msg {
  position: absolute;
  width:100%;
  height:100%;
  line-height: var(--compass-size);
  text-align: center;
  font-weight: 300;
  font-size: 200%;
}

@media all and (max-height: 550px) {
  .compass-wrap {
    --compass-size: 200px;
  }
}
@media all and (min-width: 450px) {
  .compass-wrap {
    --compass-size: 300px;
  }
}

.map {
  position: fixed;
  background-color: gray;
}
.map:after {
  content: '';
  background: linear-gradient(to bottom, rgba(68, 68, 68, 1) 0%, rgba(68, 68, 68, .7) 25%, rgba(68, 68, 68, .7) 100%);
  position: fixed;
  height: 100vh;
  width: 100vw;
  z-index: 1000;
}

.full-page {
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.full-page:not(.map) {
  display: flex;
  flex-flow: column nowrap;
  justify-content: space-between;
  position: relative;
}
.top-bar {
  width: 100vw;
  display: flex;
  flex-flow: column nowrap;
  justify-content: space-around;
  align-items: center;
  flex-grow: 1;
}
.bottom-bar {
  height: calc(100vh / 6);
  min-height: 90px;
  width: 100vw;
  background-color: var(--dark-t);
  padding: .5em;
  display: flex;

  border-top: 5px solid var(--white);

  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
}

.speed-sign {
  --factor: 2.75;
  --sign-size: calc(var(--font-size) * var(--factor));
  position: absolute;
  border-radius: 50%;
  background-color: var(--white);
  border: calc(var(--font-size) / 4) solid var(--compass-red);
  width: var(--sign-size);
  height: var(--sign-size);
  top: .5em;
  left: .5em;
  color: var(--black);
  font-weight: bold;
  text-align: center;
  /* Make the text centered. */
  line-height: calc(var(--font-size) * var(--factor) - var(--font-size) / 2);
  box-shadow: var(--drop-shadow);
}

.code-word {
  font-weight: bold;
  font-size: 150%;
  text-transform: uppercase;
}
.code-word:before {
  content: 'Code:';
  font-size: 50%;
  font-weight: lighter;
  position: absolute;
  text-transform: initial;
  margin-top: -1.5em;
}

.distance-display {
  font-size: 200%;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, .25);
}

.info-page {
  color: var(--black);
}
.info-page article {
  background-color: var(--white);
  margin: .5em;
  padding: .5em;
  border-radius: 3px;
  box-shadow: var(--drop-shadow);
}
.info-page h1 {
  margin: 0;
  padding: 0;
}

.info-page table {
  border-collapse: collapse;
}

.info-page td, .info-page th {
  text-align: left;
  padding: .25em .25em .25em 0;
}
.info-page td:first-of-type {
  text-transform: capitalize;
  max-width: 35vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
