:root {
  --orange: #ff5416;
}

html {
  box-sizing: border-box;
  background-color: black;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  font-family: 'Questrial', arial, Helvetica, sans-serif;
  margin: 0;
}

#map {
  height: calc(100vh - 86px);
  width: 100%;
  margin: 0;
  padding: 0;
}

header,
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header {
  flex-wrap: wrap;
  padding: 10px;
}

h1 {
  display: flex;
  margin: 0;
  font-weight: normal;
  color: var(--orange);
}

.title {
  font-size: 28px;
  line-height: 30px;
  display: inline-block;
}

.logo {
  display: inline-block;
  width: 100px;
  height: 30px;
  margin-right: 5px;
  color: transparent;
  background: url(logo.svg) no-repeat left;
}

.intro {
  height: calc(100vh - 100px);
  padding: 40px;
  font-size: 1.2em;
  background-color: white;
}

h2 {
  font-weight: normal;
  font-size: 1em;
  color: white;
}

#channel {
  display: flex;
}

.label {
  display: none;
}

.input {
  height: 40px;
  max-width: 200px;
  font-size: 1em;
  margin-right: 20px;
  padding: 0px 10px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 -1px 0px rgba(0, 0, 0, 0.02);
}

.historyContainer .item {
  height: 300px;
  border: 1px solid black;
  overflow: hidden;
  margin-top: 10px;
  padding: 20px;
}

.animation {
  display: none;
}

p {
  max-width: 960px;
  line-height: 1.6em;
}

.link {
  display: block;
  max-width: 960px;
  margin: 2em 0;
  text-decoration: none;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  color: #f9a01b;
}

.link:hover {
  color: #ed760a;
}

.marker-mapbox {
  width: 30px;
  height: 26px;
  background: no-repeat center;
  background-size: 100%;
  background-image: url('./driverN.png');
}

.raw-marker-mapbox {
  width: 30px;
  height: 26px;
  background: no-repeat center;
  background-size: 100%;
  background-image: url('./driverN.png');
  opacity: 0.3;
}

.marker-mapbox[compass-direction='N'] {
  background-image: url('./driverN.png');
}

.marker-mapbox[compass-direction='S'] {
  background-image: url('./driverS.png');
}

.marker-mapbox[compass-direction='E'] {
  background-image: url('./driverE.png');
}

.marker-mapbox[compass-direction='W'] {
  background-image: url('./driverW.png');
}

.marker-mapbox[compass-direction='NE'] {
  background-image: url('./driverNE.png');
}

.marker-mapbox[compass-direction='SE'] {
  background-image: url('./driverSE.png');
}

.marker-mapbox[compass-direction='SW'] {
  background-image: url('./driverSW.png');
}

.marker-mapbox[compass-direction='NW'] {
  background-image: url('./driverNW.png');
}

.mapboxgl-map {
  background-color: white;
}

.raw-marker-mapbox[compass-direction='N'] {
  background-image: url('./driverN.png');
}

.raw-marker-mapbox[compass-direction='S'] {
  background-image: url('./driverS.png');
}

.raw-marker-mapbox[compass-direction='E'] {
  background-image: url('./driverE.png');
}

.raw-marker-mapbox[compass-direction='W'] {
  background-image: url('./driverW.png');
}

.raw-marker-mapbox[compass-direction='NE'] {
  background-image: url('./driverNE.png');
}

.raw-marker-mapbox[compass-direction='SE'] {
  background-image: url('./driverSE.png');
}

.raw-marker-mapbox[compass-direction='SW'] {
  background-image: url('./driverSW.png');
}

.raw-marker-mapbox[compass-direction='NW'] {
  background-image: url('./driverNW.png');
}

#settings-icon {
  cursor: pointer;
}

#overlay {
  position: fixed; /* Sit on top of the page content */
  display: none; /* Hidden by default */
  width: 100%; /* Full width (cover the whole page) */
  height: 100%; /* Full height (cover the whole page) */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); /* Black background with opacity */
  z-index: 2; /* Specify a stack order in case you're using a different order for other elements */
  cursor: pointer; /* Add a pointer on hover */
  align-items: center;
  justify-content: center;
}

.settings-container {
  width: clamp(300px, 50%, 450px);
  height: max-content;
  background-color: black;
  border-radius: 1rem;
  padding: 1rem;
  cursor: default;
  color: white;
}

.settings-title {
  color: white;
}

.settings-label {
  color: white;
}

.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.hidden {
  visibility: hidden;
  display: none;
}

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

.switch input {
  display: none;
}

.slider {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 34px;
  background-color: #ccc;
  cursor: pointer;
  transition: 0.4s;
}

.slider:before {
  content: '';
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #fff;
  transition: 0.4s;
}

.settings-checkbox:checked + .slider {
  background-color: #ed760a;
}

.settings-checkbox:checked + .slider:before {
  transform: translateX(26px);
}

.settings-number {
  height: 40px;
  max-width: 100px;
  margin-left: 1rem;
  padding: 0px 10px;
  border: 0;
  border-radius: 2px;
  font-size: 1em;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 20%), inset 0 -1px 0px rgb(0 0 0 / 2%);
}

.settings-info {
  margin-top: -0.5rem;
  margin-right: auto;
}

/* mobile styles */
@media (max-width: 800px) {
  #map {
    height: calc(100vh - 50px);
  }
  .subscribers {
    position: absolute;
    width: 100%;
    height: 60px;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 10px;
    background-color: black;
    z-index: 1;
  }
  .title {
    width: min-content;
    font-size: 17px;
    line-height: 15px;
    display: inline-block;
    text-align: center;
  }
  h2 {
    margin: 0;
  }
  header {
    flex-wrap: nowrap;
    gap: 20px;
  }
  #channel {
    max-width: 50%;
  }
  .controls {
    position: absolute;
    bottom: 10px;
    right: 50%;
    z-index: 1;
    transform: translate(50%, 0%);
  }
  h2 {
    font-weight: normal;
    font-size: 0.8em;
  }
  .input {
    max-width: 170px;
    margin: 0;
  }
  a.mapboxgl-ctrl-logo {
    margin: 0px 0 5px -5px !important;
  }
  .mapboxgl-ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact:after {
    bottom: 5px !important;
    right: -4px !important;
  }
}
