html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}
body {
  margin: 0;
}

body,
input,
textarea,
select,
button {
  font: 1rem "Fira Sans", sans-serif;
}

#spotlight {
  /* IE11 support */
  display: -ms-grid;
  -ms-grid-columns: 25em 1fr;
  -ms-grid-rows: 2.5em 1fr;
  /* standards */
  display: grid;
  grid-template-columns: 25em 1fr;
  grid-template-rows: 3em 1fr;
  gap: 1em 1em;
  height: 100vh;
  grid-template-areas:
    "map-io source"
    "settings map";
}

#map-io {
  /* IE11 support */
  -ms-grid-column: 1;
  -ms-grid-row: 1;
  /* standards */
  grid-area: map-io;
  display: flex;
}

.source {
  /* IE11 support */
  -ms-grid-column: 2;
  -ms-grid-row: 1;
  /* standards */
  grid-area: source;
  align-self: center;
  justify-self: stretch;
}

.settings {
  /* IE11 support */
  -ms-grid-column: 1;
  -ms-grid-row: 2;
  /* standards */
  grid-area: settings;
  overflow-y: scroll;
  padding: 0 0.5em;
}

.map {
  /* IE11 support */
  -ms-grid-column: 2;
  -ms-grid-row: 2;
  /* standards */
  grid-area: map;
  align-self: center;
  justify-self: center;
}

.layer + dd {
  display: none;
}
.layer + dd.visible {
  display: block;
}

iframe {
  border: 0;
  background-color: #ccc;
  position: -webkit-sticky;
  position: sticky;
  top: 10px;
  box-shadow: 0px 0px 5px -2px #336075;
}

legend {
  background-color: #000;
  color: #fff;
  padding: 3px 6px;
}

fieldset {
  margin-top: 0.5em;
}

textarea,
input[type="text"] {
  width: 100%;
  border-width: 1px;
  line-height: 1.3;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  margin: 7.3px 0;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 11.4px;
  cursor: pointer;
  box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
  background: #bebebe;
  border-radius: 1.3px;
  border: 0.2px solid #010101;
}

input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0.9px 0.9px 1px #000031, 0px 0px 0.9px #00004b;
  border: 1.8px solid #00001e;
  height: 26px;
  width: 26px;
  border-radius: 15px;
  background: #ffffff;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7.5px;
}

input[type="range"]:focus::-webkit-slider-runnable-track {
  background: #cbcbcb;
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 11.4px;
  cursor: pointer;
  box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
  background: #bebebe;
  border-radius: 1.3px;
  border: 0.2px solid #010101;
}

input[type="range"]::-moz-range-thumb {
  box-shadow: 0.9px 0.9px 1px #000031, 0px 0px 0.9px #00004b;
  border: 1.8px solid #00001e;
  height: 26px;
  width: 26px;
  border-radius: 15px;
  background: #ffffff;
  cursor: pointer;
}

input[type="range"]::-ms-track {
  width: 100%;
  height: 11.4px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

input[type="range"]::-ms-fill-lower {
  background: #b1b1b1;
  border: 0.2px solid #010101;
  border-radius: 2.6px;
  box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}

input[type="range"]::-ms-fill-upper {
  background: #bebebe;
  border: 0.2px solid #010101;
  border-radius: 2.6px;
  box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}

input[type="range"]::-ms-thumb {
  box-shadow: 0.9px 0.9px 1px #000031, 0px 0px 0.9px #00004b;
  border: 1.8px solid #00001e;
  height: 26px;
  width: 26px;
  border-radius: 15px;
  background: #ffffff;
  cursor: pointer;
  height: 11.4px;
}

input[type="range"]:focus::-ms-fill-lower {
  background: #bebebe;
}

input[type="range"]:focus::-ms-fill-upper {
  background: #cbcbcb;
}

input[type="number"] {
  width: 6em;
}
input[type="button"],
select {
  width: 100%;
  height: 2em;
}

#info-pin-location input[type="button"] {
  width: 11em;
}

ul,
dl {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  margin: 0.25em 0;
}
li > input {
  margin-left: 0;
}

li ul {
  margin-left: 1em;
}

dd {
  margin-left: 1em;
  padding-bottom: 0.5em;
}

.disabled {
  color: #666;
  display: none;
}

.warning,
.error {
  display: inline-flex;
  align-items: center;
  width: 100%;
  border-width: 1px;
  border-style: solid;
  margin-top: 0;
  padding: 0.5em;
  gap: 0.5em;
}
.warning {
  color: rgb(99, 64, 0);
  background-color: rgba(253, 200, 100, 0.25);
  border-color: rgb(99, 64, 0);
}
.error {
  color: rgb(99, 0, 0);
  background-color: rgba(253, 100, 100, 0.25);
  border-color: rgb(99, 0, 0);
}

body *.hidden {
  display: none;
}

button {
  color: #225368;
  background-color: transparent;
  line-height: 1;
  cursor: pointer;
  height: 2rem;
  padding: 0.25rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #225368;
  text-transform: uppercase;
  font-size: 0.8rem;
}
input + button,
button + button {
  border-left: 0;
}
button:first-of-type {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}
button:last-of-type {
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

button.highlight {
  border-color: #333;
  color: #333;
  background-color: #ddd;
  font-weight: 700;
}

button.toggled {
  background-color: #22536833;
}

.buttonset {
  margin: 0.5em 0;
  display: flex;
}
.buttonset > button {
  flex: 1 1 0px;
}

/* Specific styles */
#map-io {
  margin: 0;
}
#map-io > button {
  width: 50%;
  height: 100%;
  padding: 0.7em 0.9em;
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  font-weight: bold;
}
button#show-code {
  background-color: #53caff;
}

.source > input,
.source > button {
  height: 2rem;
}

.source > label {
  display: inline-block;
  width: 5.5em;
}
#modal-import textarea#import-url {
  height: 6em;
  font-family: "Courier New", Courier, monospace;
}

input#source-url {
  display: inline-block;
  width: calc(100% - 6em - 8em);
  background-color: rgb(232, 240, 254);
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

button#source-update {
  display: inline-block;
  width: 7.5em;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

#map-layers {
  margin-top: 0.5em;
}

#map-layers > dt {
  font-weight: bold;
  margin-bottom: 0.1em;
}
#map-layers > dd {
  margin-left: 0;
}

#map-layers > dd > dl {
  margin-left: 1em;
}

#map-layers dt.layer + dd.legend {
  padding: 0;
}

#info-pin-location li > label {
  display: inline-block;
  width: 5em;
}

#modal-export-content {
  width: 100%;
}

#modal-export-content textarea {
  width: 100%;
  height: 100px;
}

#modal-export-content a#export-link {
  font-family: monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.modal {
  display: none;
}

.modal.is-open {
  display: block;
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal__container {
  background-color: #fff;
  padding: 2rem;
  max-width: 36rem;
  max-height: 80vh;
  border-radius: 0.25rem;
  overflow-y: auto;
  box-sizing: border-box;
  width: 80vh;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__title {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #333;
  box-sizing: border-box;
}

.modal__close {
  background: transparent;
  border: 0;
}

.modal__header .modal__close:before {
  content: "\2716";
  font-size: large;
}

.modal__content {
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: rgba(0, 0, 0, 0.8);
}

.modal__content p {
  margin-bottom: 0.5em;
}
.modal__content p + p,
.modal__content p + textarea {
  margin-top: 0;
}
.modal__content p:last-child {
  margin-bottom: 1em;
}

.modal__btn {
  font-size: 0.875rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: #e6e6e6;
  color: rgba(0, 0, 0, 0.8);
  border-radius: 0.25rem;
  border-style: none;
  border-width: 0;
  cursor: pointer;
  -webkit-appearance: button;
  text-transform: none;
  overflow: visible;
  line-height: 1.15;
  margin: 0;
  will-change: transform;
  -moz-osx-font-smoothing: grayscale;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  transition: -webkit-transform 0.25s ease-out;
  transition: transform 0.25s ease-out;
  transition: transform 0.25s ease-out, -webkit-transform 0.25s ease-out;
}

.modal__btn:focus,
.modal__btn:hover {
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
}

.modal__btn-primary {
  background-color: #53caff;
  color: #333;
}
.modal__btn:disabled {
  cursor: default;
}

.modal__btn:focus:disabled,
.modal__btn:hover:disabled {
  -webkit-transform: none;
  transform: none;
}
.modal__btn-primary:disabled {
  background-color: rgba(253, 200, 100, 0.25);
  color: rgb(99, 64, 0);
}
