body {
  --page-background-color: white;
  --app-bar-background-color: #21045A;
  --header-background-color: #E3E3E3;
  --separating-line-color: #E3E3E3;
  --app-bar-shadow-color: rgba(0,0,0,0.2);
  --header-shadow-color: rgba(0,0,0,0.39);
  --default-text-color: black;
  --app-bar-text-color: white;
  --caption-text-color: #666;
  --faint-text-color: #999;
  --link-color:  #051A71;
  --red-warning-color: #8c0000;

  --button-background-color: #437C60;
  --button-active-background-color: #2c5642;
  --button-text-color: white;

  --current-location-color: #437C60;
  --current-location-shadow-color: #8FCB9B;

  --card-background-color: rgb(244,244,244);
  --card-background-gradient: linear-gradient(180deg, rgba(244,244,244,1) 0%, rgba(228,228,228,1) 83%, rgba(224,224,224,1) 100%);
  --card-inner-background-color: rgb(208, 208, 208);
  --warning-background-color: rgb(255 244 0 / 23%);

  margin: 0 0 10px;
  padding: 0;
  background: var(--page-background-color);
  font-family: sans-serif;
  font-size: 15px;
  color: var(--default-text-color);
}

@media (prefers-color-scheme: dark) {
  body {
    --page-background-color: #0A0A0A;
    --app-bar-background-color: #1C044E;
    --header-background-color: #18142d;
    --separating-line-color: #413f44;
    --default-text-color: white;
    --app-bar-text-color: white;
    --caption-text-color: #999;
    --faint-text-color: #666;
    --link-color:  #9caae3;
    --red-warning-color: #e65858;

    --current-location-color: #2b9d65;
    --current-location-shadow-color: #8fcb9b7d;

    --card-background-color: rgb(31,31,31);
    --card-background-gradient: rgb(31,31,31);
    --card-inner-background-color: rgb(50, 50, 50);
    --warning-background-color: rgba(255, 242, 0, 0.23);

  }
}

body.disable-interaction * {
  pointer-events: none !important;
  user-select: none !important;
}

a {
  color: var(--link-color);
}
h1,h2,h3,h4,h5,h6 {
  margin: 0 0 10px;
  padding: 0;
}
h2 {
  font-size: 18px;
}
h3 {
  font-size: 15px;
}
header {
  position: fixed;
  background: var(--header-background-color);
  box-shadow: 0px 1px 4px 0px var(--header-shadow-color);
  padding-bottom: 5px;
  width: 100%;
  z-index: 10;
}

button,
a.button {
  background: var(--button-background-color);
  border-radius: 3px;
  border: 0;
  color: var(--button-text-color);
  display: inline-block;
  font-family: sans-serif;
  font-size: 16px;
  line-height: 18px;
  padding: 8px 16px;
  text-decoration: none;
}

button:active {
  background: var(--button-active-background-color);
  padding: 9px 15px 7px 17px;
}

#loading-message {
  color: var(--faint-text-color);
  font-size: 20px;
  font-style: italic;
  text-align: center;
  padding-top: 20vh;
}

.app-bar {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  padding: 15px;
  margin: 0 0 5px 0;
  box-shadow: 0px 1px 2px 0px var(--app-bar-shadow-color);
  position: relative;
  background: var(--app-bar-background-color);
  color: var(--app-bar-text-color);
}

#header-spacer {
  height: 110px;
}

.feather {
  width: 24px;
  height: 24px;
  stroke: var(--app-bar-text-color);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

a.button .feather {
  padding-right: 2px;
  position: relative;
  top: 1px;
  vertical-align: baseline;
  width: 14px;
  height: 14px;
}

#hamburger {
  position: absolute;
  top: 15px;
  left: 15px;
  transform: translate3d(0,0,0);
}
#scroll-to-location {
  position: absolute;
  top: 15px;
  right: 15px;
}
#location-banner {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.location-error,
.location-error:active {
  display: inline-block;
  background: none;
  padding: 0;
  margin: 0;
  color: var(--red-warning-color);
}
.location-pending {
  font-style: italic;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}
.feather.spinning-icon {
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
#spots {
  list-style: none;
  margin: 0;
  padding: 0;
}
.spot {
  position: relative;
  min-height: 50px;
  padding: 10px 8px 20px 0;
  border-bottom: solid 1px var(--separating-line-color);
  margin: 10px 0;
}
h3 {
  font-size: 18px;
  margin: 0;
  padding: 0;
  padding-bottom: 5px;
}
#route .icon {
  width: 32px;
  height: 32px;
  background-repeat: no-repeat;
  background-size: contain;
  position: absolute;
  left: 10px;
  top: 9px;
}
.distance,
.distance-from-route,
.eta,
.category {
  line-height: 22px;
}
.distance-from-route a {
  text-decoration: none;
  color: var(--default-text-color);
}
.distance-from-route a:active {
  color: var(--link-color);
}
.distance,
.eta {
  /* Set a fixed width/height to prevent layout on text updates. */
  width: 100%;
  height: 22px;
  overflow: hidden;
}
.content {
  margin-left: 50px;
}
.permanently-closed {
  color: var(--red-warning-color);
}
.spot p {
  margin-bottom: 0;
}

.current-location-line {
  width: 95%;
  height: 4px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--current-location-color);
  box-shadow: 0px 0px 5px 0px var(--current-location-shadow-color);
  display: none;
}
.spot > .current-location-line {
  position: absolute;
  left: 2.5%;
  top: -17px;
}
.current-location-line.last-line {
  /* This negative value should be the total height (margin + height) of the line
     that prevents the line from taking up any height in the dom. */
  margin-top: -14px;
  z-index: 1;
  position: relative;
  top: 2px;
}
.shown {
  display: block !important;
}
#menu {
  background: var(--page-background-color);
  box-sizing: border-box;
  padding: 20px;
  z-index: 10;
}

/* Used for animated transitions. */
#menu.float {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  transform: translate3d(0,0,0);
  transform-origin: left top;

  animation-iteration-count: 1;
  animation-duration: 0.3s;
}

#menu.float.slide-out {
  animation-name: slide-menu-out;
  animation-timing-function: ease-out;
}

#menu.float.slide-in {
  animation-name: slide-menu-out;
  animation-timing-function: ease-in;
  animation-direction: reverse;
  animation-fill-mode: both;
}

@keyframes slide-menu-out {
  from {
    transform: translate3d(0, 0, 0);
  }
  99% {
    transform: translate3d(28px, 28px, 0) scale3d(0.001,0.001,1);
  }
  to {
    transform: translate3d(28px, 28px, 0) scale3d(0,0,1);
  }
}

#close {
  float: right;
  transform: translate3d(0,0,0);
}
#close svg {
  stroke: var(--default-text-color);
}

.spin {
  animation-name: spin;
  animation-duration: 500ms;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes spin {
  from {
    transform: rotate3d(0, 0, 1, 0deg);
  }
  /* Safari is really stubborn about rotating continuously in a circle, so you
   * have to give it lots of keyframes. */
  25% {
    transform: rotate3d(0, 0, 1, 90deg);
  }
  50% {
    transform: rotate3d(0, 0, 1, 180deg);
  }
  75% {
    transform: rotate3d(0, 0, 1, 270deg);
  }
  to {
    transform: rotate3d(0, 0, 1, 360deg);
  }
}
#route-map-link {
  padding: 10px 0 30px;
}
.category-choice {
  padding: 10px 0;
  font-size: 18px;
  line-height: 20px;
}
.category-choice label {
  padding-left: 5px;
}
.category-choice .icon {
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-size: contain;
  display: inline-block;
  padding-right: 4px;
  position: relative;
  top: 3px;
}
.category-choice input:not(:checked) + label {
  filter: grayscale(1);
}
.select-all-choice {
  border-top: 1px dashed var(--separating-line-color);
}
#eta-control,
#location-info,
#route-info {
  margin-top: 40px;
}
#reverse-route-line{
  margin: 25px 0;
}
#refresh-route-link,
#share-route-link {
  margin-bottom: 25px;
}
#share-route-link button,
#update-location {
  margin-top: 5px;
}

#scroll-indicator-container {
  width: 100px;
  height: 70px;
  right: -20px;
  top: 0;
  position: fixed;
  transform: translate3d(0px, -10000px, 0);
  z-index: 10;
}

#scroll-indicator {
  width: 80px;
  height: 20px;
  overflow: hidden;
  border-radius: 60% 90% 90% 60%;
  border: 0px;
  background: #437c60d3;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  color: white;
  line-height: 20px;
  padding: 25px 20px 25px 0;
  transform-origin: right;
  transform: translate3d(0, 0, 0);
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  user-select: none;
}

#unsupported-content {
  padding: 20px;
}

/* Importer CSS */
#refresh-required,
#importer {
  padding: 0 10px 10px;
}
.smaller {
  font-size: 13px;
}
#importer label {
  display: block;
  padding-bottom: 4px;
}
.card {
  background: var(--card-background-color);
  background: var(--card-background-gradient);
  box-shadow: 0px 1px 4px 0px var(--header-shadow-color);
  padding: 10px;
  margin-top: 20px;
}
#import-from-share ul {
  margin: 15px 0;
  padding: 0;
  list-style: none;
}
#import-from-share li:not(:last-child) {
  margin-bottom: 5px;
}
#share-import-name {
  font-weight: bold;
}
#replace-route-warning {
  background: var(--warning-background-color);
  padding: 10px;
}

.existing-route {
  background: var(--card-inner-background-color);
  padding: 10px;
  margin-bottom: 10px;
}
.existing-route-details {
  padding-bottom: 5px;
}

.start-import-container {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 20px;
}

.start-import-container button {
  transform: translate3d(0,0,0);
}

button.animate-out {
  animation-name: animate-button-out;
  animation-duration: 0.5s;
  animation-timing-function: ease-out;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

@keyframes animate-button-out {
  from {
    transform: scale3d(1, 1, 1);
  }

  15% {
    transform: scale3d(1.2, 1.2, 1);
  }

  to {
    transform: rotate3d(0, 0, 1, 150deg) scale3d(0.01, 0.01, 1);
  }
}


#import-from-share .start-import-container {
  margin-top: 35px;
  margin-bottom: 25px;
}
#current-route-name {
  font-size: 18px;
  margin-bottom: 5px;
}
#refresh-route {
  margin-top: 20px;
}
#refresh-route-desc {
  margin-top: 5px;
  font-size: 13px;
  font-style: italic;
}
#import-url {
  box-sizing: border-box;
  width: 100%;
}
.input-info {
  font-size: 13px;
  margin: 5px 0;
}
#inputs-or  {
  margin: 10px 0;
  display: block;
}
#importing {
  margin-top: 20px;
}
#import-status {
  list-style: none;
  margin: 10px 0 20px;
  padding: 0;
  font-weight: bold;
  min-height: 200px;
}
#import-status .import-line {
  color: var(--default-text-color);
  opacity: 0.4;
  padding-top: 7px;
}
#import-status .import-line:first-child {
  opacity: 1;
}
#import-status .import-line:nth-child(2) {
  opacity: .8;
}
#import-status .import-line:nth-child(3) {
  opacity: .6;
}
#import-error,
#load-existing-error {
  margin-top: 20px;
}
#import-error > strong,
#load-existing-error > strong {
  color: var(--red-warning-color);
}
#powered-by-google {
  color: var(--caption-text-color);
  font-size: 12px;
  text-align: center;
  margin-top: 80px;
  padding: 0 20px;
}
#powered-by-google-wrapper {
  display: inline-flex;
}
@media (prefers-color-scheme: dark) {
  #powered-by-google-wrapper {
    background: #eee;
    padding: 5px;
    border-radius: 3px;
  }
}

/* Scroll indicator keyframes */
@keyframes indicator-disappear {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(100px, 0, 0) scale3d(0.7, 0.7, 1);
  }
}

@keyframes indicator-appear-from-above {
  from {
    transform: translate3d(80px, -15px, 0) rotate3d(0, 0, 1, 20deg) scale3d(0.7, 0.7, 1);
  }
  80% {
    transform: translate3d(0px, 0px, 0) rotate3d(0, 0, 1, -4deg) scale3d(1, 1, 1);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes indicator-appear-from-below {
  from {
    transform: translate3d(80px, 15px, 0) rotate3d(0, 0, 1, -20deg) scale3d(0.7, 0.7, 1);
  }
  80% {
    transform: translate3d(0px, 0px, 0) rotate3d(0, 0, 1, 4deg) scale3d(1, 1, 1);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes indicator-touch-out {
  from {
    transform: translate3d(0, 0, 0);
  }
  65% {
    transform: translate3d(-105px, 0, 0) scale3d(1.1, 1.1, 1);
  }
  to {
    transform: translate3d(-100px, 0, 0);
  }
}

@keyframes indicator-touch-in {
  from {
    transform: translate3d(-100px, 0, 0);
  }
  65% {
    transform: translate3d(5px, 0, 0) scale3d(0.9, 0.9, 1);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

/* Loader from https://loading.io/css/ */
#importing-indicator {
  text-align: center;
}
.lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #437C60;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}
