@font-face {
  font-family: "Oracle";
  font-style: normal;
  font-weight: 350;
  src: url("../fonts/Oracle.woff2") format("woff2"),
       url("../fonts/Oracle.woff") format("woff");
}

@font-face {
  font-family: "Daily Slab";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/Daily-Slab.woff2") format("woff2"),
       url("../fonts/Daily-Slab.woff") format("woff");
}

:root {
  --white:hsl(0, 0%, 100%);
  --grey:hsl(60, 6%, 30%);
  --black:hsl(0, 0%, 0%);
}

html {
  font-family: 'Oracle';
  font-size: 18px;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--white);
  filter: invert(0.1);
}

body {
  background-color: var(--black);
}

#controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: fixed;
  left: 0.5rem;
  top: 0.5rem;
  height: calc(100% - 1rem);
  padding: 1rem;
  padding-top: 1rem;
  padding-right: 2.5rem;
  background-color: var(--black);
  padding-bottom: 1rem;
  width: 25rem;
  box-sizing: border-box;
  transition: left 0.8s;
  transition-timing-function: cubic-bezier(.77, 0, .175, 1);
  border-radius: 1rem;
}

#controls.inactive {
  left: calc(2.5rem - 25rem);
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toggle-controls {
  position: absolute;
  right: 0rem;
  top: 0rem;
  padding: 1rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
}

.open {
  display: none;
}

.inactive .open {
  display: block;
}

.inactive .close {
  display: none;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

input[type=number] {
  padding: 0.1em 0 0.1em 0.2em;
  border-radius: 2px;
  letter-spacing: 0.02em;
  background-color: rgba(255, 255, 255, 0.5);
  background-color: transparent;
  text-align: right;
  font-feature-settings: 'tnum';
  margin-right: -0.9em;
  appearance: none;
}

input[type=range] {
  width: 100%;
  accent-color: var(--white);
  height: 3px;
  margin-top: 0.5em;
  filter: contrast(2);
  cursor: pointer;
}

input[type=checkbox] {
  accent-color: var(--white);
}

.inputrow {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

label {
  text-align: center;
  display: inline-block;
}

form hr {
  margin-top: 0.5rem;
  background-color: rgb(179, 179, 179);
}

select {
  background-color: rgba(255, 255, 255, 0.5);
  padding: 0.2em 0.65em 0.2em 0.65em;
  border-radius: 1em;
  appearance: none;
  width: 100%;
}

.button {
  background-color: rgba(255, 255, 255, 0.5);
  padding: 0.15em 0.65em 0.2em 0.6em;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 4rem;
  text-align: center;
  box-sizing: border-box;
  font-size: 14px;
}

.button:hover {
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
}

.button:active {
  transform: scale(0.95);
}

.button.reset {
  background-color: var(--black);
  color: var(--white);
  outline: 1px solid white;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  width: 8em;
  text-align: center;
  box-sizing: border-box;
}

.description {
  padding-left: 0.5rem;
}

h1 {
  text-align: center;
  font-family: "Daily Slab";
  color: black;
  width: 100%;
  height: 95vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-size: 8vw;
  pointer-events: none;
  opacity: 1;
  transition: 0.5s;
  z-index: 10;
}

h1.hidden {
  top: -2vw;
  opacity: 0;
  pointer-events: none;
}

h3 {
  text-transform: uppercase;
}

/* map styles */

.country {
  fill: rgb(75, 75, 75);
  stroke: rgb(75, 75, 75);
  stroke-width: 0.4px;
}

.graticule {
  fill: none;
  stroke: black;
  stroke-width: 1px;
  pointer-events: none;
}

.background {
  fill: transparent;
  pointer-events: none;
  stroke: var(--black);
  stroke-width: 1.5px;
}

.hemisphere {
  fill: var(--black);
  opacity: 0.1;
  pointer-events: none;
}

#map {
  position: fixed;
  width: calc(100vw - 26rem);
  height: calc(100% - 1rem);
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: width 0.8s;
  transition-timing-function: cubic-bezier(.77, 0, .175, 1);
  background-color: rgb(255, 255, 255);
  overflow: hidden;
  border-radius: 1rem;
}

#map.active {
  width: 100vw;
}

svg {
  padding: 0;
  box-sizing: border-box;
  cursor: move;
  width: 100vw;
  height: 100vh;
  position: absolute;
  z-index: 100;
}

g {
  cursor: grab;
}

g:active {
  cursor: grabbing;
}

.userdata {
  stroke: #2f2faa;
  stroke-width: 0.5px;
  pointer-events: none;
}

.line {
  fill: transparent;
  fill-opacity: 0;
}

.polygon {
  fill: #5050f4;
  fill-opacity: 0.5;
}

path.inactive {
  opacity: 0;
}

.point {
  fill: red
}

.file-button {
    background-color: rgba(255, 255, 255, 0.5);
    color: white;
    padding: 6px 14px;
    border-radius: 2em;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 8em;
    text-align: center;
    box-sizing: border-box;
    display: inline-block;
    margin-right: 0.5rem;
}

.file-name {
    font-size: 14px;
    color: var(--white);
}

.custom-button {
    margin-top: 12px;
    background-color: #000000;
    outline: 1px solid white;
    color: white;
    border: none;
    border-radius: 2em;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    width: 8em;
    text-align: center;
    box-sizing: border-box;
}

#userdata {
  display: none;
}

/* info */

#info {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: black;
  color: white;
  border-radius: 1em;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
  font-feature-settings: 'tnum';
  transition: 0.25s;
  display: none;
}

#info:hover {
  transform: scale(1.2);
  cursor: pointer;
}


@media only screen and (max-width: 600px) { 

  #controls {
    width: calc(100% - 0.5rem);
    overflow-y: scroll;
  }

  #controls.inactive {
    left: calc(3rem - 100vw);
  }

  #controls form {
    opacity: 1;
  }

  #controls.inactive form {
    opacity: 0;
    transition: 0.8s;
    transition-timing-function: cubic-bezier(.77, 0, .175, 1);

  }
}