.titlebar {
  height: 37px;
  background-color: #f1f0f0;
  border-bottom: 1px solid #ccc;
  position: fixed;
  width: 100%;
  z-index: 10;
}

.titlebar .site-title {
  font-size: 14px;
  margin: 0;
  line-height: 35px;
  padding-left: 10px;
}

.titlebar .site-title .logo {
  height: 30px;
}

.titlebar .site-title .titlebar-text {
  padding-left: 6px;
}

.titlebar .btn-left {
  position: absolute;
  left: 0;
  top: 0;
  margin: 3px 5px;
}

.titlebar .btn-right {
  position: absolute;
  right: 0;
  top: 0;
  margin: 4px 5px;
}

.controls {
  padding: 62px 15px 25px;
  max-width: 320px;
  margin: 0 auto;
}

.controls .form-group {
  overflow: hidden;
  justify-content: space-between;
}

.controls .start-address {
  height: 43px;
  overflow: hidden;
  margin-bottom: 0;
  position: relative;
}

.controls .start-address .control-label {
  display: none;
}

.controls .start-address .start-icon {
  margin-right: 8px;
  width: 24px;
  height: 24px;
  background: #19b566;
  border-radius: 50%;
  border: 1px solid #0d5731;
  text-align: center;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  line-height: 22px;
}

.controls .start-address .form-control {
  vertical-align: 18px;
  width: auto;
  flex-grow: 1;
  font-size: 0.8rem;
}

.controls .start-address .loading-animation {
  position: absolute;
  left: 60px;
  color: #555;
  width: 20px;
  height: 20px;
  animation-name: spin;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  display: none;
}

.controls .start-address.geolocation-pending .loading-animation {
  display: block;
}

.controls .start-address.geolocation-pending .form-control {
  color: transparent;
}

.controls .start-address .btn-geolocation {
  width: 34px;
  height: 43px;
  display: inline-block;
  float: right;
  cursor: pointer;
  padding-left: 4px;
  padding-right: 4px;
  margin-left: 6px;
}

.controls .end-address {
  height: 43px;
  overflow: hidden;
  margin-bottom: 0;
}

.controls .end-address .control-label {
  display: none;
}

.controls .end-address .end-icon {
  margin-right: 8px;
  width: 24px;
  height: 24px;
  background: #cf3043;
  border-radius: 50%;
  border: 1px solid #58131c;
  text-align: center;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  line-height: 22px;
}

.controls .end-address .form-control {
  vertical-align: 18px;
  flex-grow: 1;
  width: auto;
  font-size: 0.8rem;
}

.controls input:focus::-webkit-input-placeholder {
  color: transparent;
}

.controls input:focus:-moz-placeholder {
  color: transparent;
}

.controls input:focus::-moz-placeholder {
  color: transparent;
}

.controls input:focus:-ms-input-placeholder {
  color: transparent;
}

.controls .route-type {
  margin-top: 8px;
  margin-bottom: 8px;
}

.controls .route-type .control-label {
  line-height: 30px;
  margin-bottom: 1px;
}

.controls .hill-reluctance {
  margin-bottom: 8px;
}

.controls .hill-reluctance .control-label {
  line-height: 30px;
  margin-bottom: 1px;
}

.controls .clear-link {
  color: #333;
  line-height: 31px;
}

.controls .btn-update-route {
  float: right;
  display: flex;
  align-items: center;
}

.controls .btn-update-route .loading-animation {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  animation-name: spin;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.disclaimer {
  clear: both;
  font-size: 10px;
  margin-top: 30px;
}

.directions {
  padding: 10px 15px;
}

.directions h3 {
  font-size: 14px;
  margin-top: 0;
  font-weight: normal;
}

.directions .directions-list {
  list-style-type: none;
  padding: 10px 0 0;
}

.directions .directions-list li {
  border-bottom: #ccc 1px solid;
  padding: 3px 0;
  font-size: 11px;
  text-transform: capitalize;
}

.weather {
  padding: 3px 0;
}

.weather .temperature,
.weather .humidity,
.weather .weather-description {
  display: inline-block;
  padding-right: 10px;
}

.weather .air-quality-box {
  display: inline-block;
  padding: 2px 3px;
  margin-left: 6px;
  border: 1px solid #c1c1c1;
}

.weather .air-quality-box-1 {
  background-color: #00e400;
}

.weather .air-quality-box-2 {
  background-color: #ffff00;
}

.weather .air-quality-box-3 {
  background-color: #ff7e00;
  color: #ffffff;
}

.weather .air-quality-box-4 {
  background-color: #ff0000;
  color: #ffffff;
}

.weather .air-quality-box-5 {
  background-color: #99004c;
  color: #ffffff;
}

.weather .air-quality-box-6 {
  background-color: #7e0023;
  color: #ffffff;
}

.elevation {
  background: #fff;
  position: relative;
  border-left: 1px solid #ccc;
  border-top: 1px solid #ccc;
  box-sizing: border-box;
  height: 175px;
}

.elevation .close-box {
  position: absolute;
  z-index: 1;
  top: 2px;
  right: 2px;
  color: #333;
  cursor: pointer;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  font-size: 20px;
}

.elevation .legend {
  display: none;
}

.elevation .grid-axis .tick {
  display: none;
}

.elevation-open-box {
  position: absolute;
  bottom: 142px;
  left: 30px;
  background: #fff;
  border: 1px solid #999;
  border-bottom: 0;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transform: rotate(90deg);
  transform-origin: left top 0;
  z-index: 1;
}

.map-container {
  position: relative;
  padding-top: 37px;
}

.map-container .logo {
  display: none;
}

.map-container .map-layers {
  position: absolute;
  bottom: 37px;
  right: 0;
  background: #fff;
  border: 1px solid #999;
  border-right: 0;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  padding: 10px;
  font-size: 11px;
  font-weight: bold;
}

.map-container .map-layers .close-box {
  position: absolute;
  top: 2px;
  right: 2px;
  color: #333;
  cursor: pointer;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  font-size: 20px;
}

.map-container .map-layers .map-legend-item {
  margin: 4px 0;
  display: flex;
  align-items: center;
}

.map-container .map-layers .map-legend-icon {
  width: 15px;
  height: 3px;
  margin-right: 6px;
  opacity: 0.6;
}

.map-container .map-layers .map-legend-icon.construction {
  background: url('../images/construction_marker.png') 0 0 no-repeat;
  background-size: 15px 15px;
  width: 15px;
  height: 18px;
  overflow: visible;
}

.map-container .map-layers .map-legend-icon.bikeParking {
  background: url('../images/BikeParkingIcon.png') 0 0 no-repeat;
  background-size: 15px 18px;
  width: 15px;
  height: 18px;
  overflow: visible;
}

.map-container .map-layers .map-legend-icon.bikeShops {
  background: url('../images/BikeShopIcon.png') 0 0 no-repeat;
  background-size: 15px 18px;
  width: 15px;
  height: 18px;
  overflow: visible;
}

.map-container .map-layers .map-legend-icon.sf-class1 {
  background: #330066;
}

.map-container .map-layers .map-legend-icon.sf-class2 {
  background: hsl(280, 97%, 48%);
}

.map-container .map-layers .map-legend-icon.sf-class3 {
  background: hsl(280, 59%, 71%);
}

.map-container .map-layers .map-legend-icon.tahoe-class1 {
  background: #fcf4db;
  border-top: 1px solid #330066;
  border-bottom: 1px solid #330066;
  height: 3px;
  vertical-align: -2px;
}

.map-container .map-layers .map-legend-icon.tahoe-class2 {
  border-top: 3px solid #660099;
  height: 0px;
  vertical-align: -2px;
}

.map-container .map-layers .map-legend-icon.tahoe-class3 {
  border-top: 3px dashed #9933cc;
  height: 0px;
  vertical-align: -2px;
}

.map-container .map-layers .map-legend-icon.tahoe-winter {
  border-top: 3px dashed #ff0000;
  height: 0px;
  vertical-align: -2px;
}

.map-container .map-layers .map-legend-icon.contracosta-lockers {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  background-color: #f41cf1;
  border: 1px solid #530a52;
  border-radius: 50%;
  opacity: 1;
}

.map-container .map-layers label {
  margin-bottom: 0;
  padding: 2px 0;
}

.map-container .map-layers label input[type='checkbox'] {
  padding-top: 3px;
  margin-right: 5px;
}

.map-layers-open-box {
  position: absolute;
  bottom: 37px;
  right: 30px;
  background: #ffffff;
  border: 1px solid #999;
  border-top: 0;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transform: rotate(90deg);
  transform-origin: right bottom 0;
}

.popup-container {
  margin-top: 10px;
  overflow-wrap: break-word;
}

.popup-container p,
.popup-container b {
  font-size: 15px;
  line-height: 20px;
  margin: 0 0 10px;
}

.icon-not-loading {
  display: none;
}

.ReactModal__Overlay {
  z-index: 1001;
}

.ReactModal__Overlay .ReactModal__Content {
  left: 0;
  right: 0;
  margin: 0 auto;
}

.welcome-modal h1 {
  margin-top: 0;
  font-size: 24px;
  text-align: center;
}

.welcome-modal .btn-primary {
  width: 100%;
}

/* Animations */

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media only screen and (min-width: 667px) {
  .controls {
    width: 340px;
    float: left;
    padding: 10px 15px;
    max-width: none;
  }

  .controls .start-address .loading-animation {
    left: 50px;
  }

  .controls .route-type {
    margin-top: 6px;
    margin-bottom: 6px;
  }

  .controls .route-type .form-control {
    width: 180px;
  }

  .controls .hill-reluctance {
    margin-bottom: 6px;
  }

  .controls .hill-reluctance .form-control {
    width: 180px;
  }

  .directions {
    width: 340px;
    clear: left;
    float: left;
    overflow-y: scroll;
  }
  .elevation {
    margin-left: 340px;
  }
  .elevation-open-box {
    bottom: 0;
    left: auto;
    right: 275px;
    transform: none;
  }

  .map-container {
    margin-left: 340px;
    padding-top: 0;
  }

  .map-container .map {
    min-height: 400px;
  }

  .map-container .map-layers {
    bottom: 24px;
  }

  .map-container .map-layers .close-box {
    display: none;
  }

  .map-container .logo {
    display: block;
    position: absolute;
    top: 0;
    left: 52px;
    z-index: 10;
  }

  .map-container .logo.ltbc-logo {
    /*
    Specific styling for the LTBC Logo overlay:

    Bikesy logo has an opaque #333 colored background
    And some more padding around the logo built into the tif
    LTBC Logo has a transparent background and less padding
    So padding needs to be added here. 
    TODO, update the LTBC PNG and then these styles can be removed?
    */
    background: #fff;
    padding: 4px 7px;
    /*
    Rounded corners and a thin solid border look nice too.
    These are included in the old tahoe bike map
    */
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    border: 1px solid #999;
  }

  .map-container .logo.contracosta-logo {
    /*
    Specific styling for the 511 Contra Costa Bike Mapper Logo overlay:
    */
    background: #fff;
    padding: 4px 7px;
    /*
    Rounded corners and a thin solid border look nice too.
    These are included in the old tahoe bike map
    */
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    border: 1px solid #999;
  }

  .titlebar {
    display: none;
  }

  .ReactModal__Overlay .ReactModal__Content {
    max-width: 400px;
    height: 290px;
  }
}

@media print {
  .titlebar {
    display: none;
  }
  .directions {
    height: auto !important;
  }

  .directions h3 {
    font-size: 30px;
    margin-top: 20px;
  }

  .directions .directions-list li {
    font-size: 14px;
    border-bottom: 0;
  }

  .map {
    height: 1700px !important;
    page-break-before: always;
  }

  .map .leaflet-control-attribution {
    background: #fff !important;
  }
  .elevation {
    border: 0;
    margin-top: 20px;
  }
}
