/*
 * based off of https://github.com/gitterHQ/sidecar
 * license: MIT
 */
.map-aside {
    width:500px;

    z-index: 20000;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;

    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    background-color: @body-bg;
    border-left: 1px solid #ddd;
    box-shadow: -12px 0 18px 0 rgba(50, 50, 50, 0.1);

    transition: transform 0.3s cubic-bezier(0.16, 0.22, 0.22, 1.7);

    &.is-collapsed:not(.is-loading) {
      -webkit-transform: translateX(110%);
      transform: translateX(110%);
    }

    /* Add some "extension" so that there isn't a gap
     * when we translate(via animation) more than 100% */
    &:after {
      content: '';

      z-index: -1;
      position: absolute;
      top: 0;
      left: 100%;
      bottom: 0;
      right: -100%;

      background-color: @body-bg;
    }
    iframe {
      width: 100%;
      height: 100%;
    }
}

.map-aside-action-bar {
    position: absolute;
    top: 0;
    right: 0;

    display: -webkit-flex;
    display: flex;
    justify-content: flex-end;

    padding-bottom: 5px;
    padding-right:10px;
    padding-top:5px;
    z-index: 100;
}

.map-fixed-header {
  position: fixed;
  background: white;
  padding-top: 5px;
  width: 100%;
  z-index: 1;
  left: 0;
  top: 0;
  @media (max-width: 720px) {
    padding-top:30px;
  }
  p {
  margin: 5px 0 20px;
    @media (max-width: 720px) {
      margin-bottom:10px;
    }
  }
  hr {
    margin:30px 0;
    @media (max-width: 720px) {
      margin:25px 0;
    }
  }
  .flashMessage {
    position:fixed;
    margin: 0 auto;
    z-index: 2;
    top: 160px;
    width: 100%;
  }
 }

.map-buttons {
  margin-top: -10px;
  & button,
  & .input-group{
    width:300px;
  }
  .input-group{
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
  }
}

#map-filter {
    background:#fff;
    border-color: darkgreen;
}
.input-group-addon {
  width:40px;
  color: darkgreen;
  background: #fff;
  border-color: darkgreen;
  &.filled{
    background: darkgreen;
    border-color: #000d00;
    color: #fff;
    cursor: pointer;
  }
  .fa {
    position:absolute;
    top:50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    right:10px;
  }
}

.mapWrapper {
  position:absolute;
  display: block;
  height: 100%;
  width: 100%; 
}

.map-accordion {
  width:700px; 
  margin:155px auto 0; 
  position:relative;
  #nested {
    margin:0 10px;
    @media (max-width: 400px) {
    margin:0;
    }
  }
  a:focus {
      text-decoration: none;
      color:darkgreen;
  }
  a:focus:hover {
      text-decoration: underline;
      color:#001800;
  }
  h2 > a {
      width:100%;
      display:block;
      background:#efefef;
      padding:10px 0;
      padding-left:50px;
      padding-right:20px;
    }

  h3 {
    margin:15px 0;
    padding:0;
    &:first-child {
      margin-top:25px
    }
    > a {
      padding-left: 40px;
      padding-bottom: 10px;
      display:block;
      max-width: 535px;
    }
  }

  div.chapterBlock {
    :before {
      margin-right: 15px;
    }
    p {
      text-indent: -15px;
      margin-left: 60px;
      padding-right: 20px;
      @media (max-width: 400px) {
          margin-left:30px;
      }
    }
  }

  .challengeBlockDescription {
      margin:0;
      margin-top:-10px;
      padding:0 15px 23px 30px;
    }

  span.no-link-underline {
    position:absolute;
    margin-left:-30px;
    color: #666;
  }

  div > div:last-child {
    margin-bottom:30px
  }
}
.challengeBlockTime {
  font-size: 18px;
  color: #BBBBBB;
  display:block;
  margin-left: 40px;
  margin-bottom: 20px;
  @media (min-width: 721px) {
    margin-right: 20px;
    margin-top:-30px;
    float:right;
  }
}

@media (max-width: 720px) {
  .map-accordion {
    left:0;
    right:0;
    width:100%;
    top:195px;
    bottom:0;
    margin:0;
    position:absolute;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    h2 {
      margin:15px 0;
      padding:0;
      &:first-of-type {
        margin-top:0;
      }
      > a {
        padding:10px 0;
        padding-left:50px;
        padding-right:20px;
        font-size:20px;
      }
    }
    h3 {
      margin:10px 0;
      padding:0;
      > a {
        clear:both;
        font-size:20px;
      }
    }
  }
}
    
.map-aside-action-item {
    display: -webkit-flex;
    display: flex;
    /* main axis */
    justify-content: center;
    /* cross axis */
    align-items: center;

    width: 40px;
    height: 40px;

    padding-left: 0;
    padding-right: 0;

    opacity: 0.65;
    background: none;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
    border: 0;
    outline: none;

    cursor: pointer;
    cursor: hand;

    transition: all 0.2s ease;

    &:hover,
    &:focus {
      opacity: 1;
    }

    &:active {
      filter: hue-rotate(80deg) saturate(150);
    }
}

#noneFound {
    display:none;
    margin:60px 30px 0;
    font-size:30px;
    text-align: center;
    color:darkgreen;
    .fa {
      display:block;
      font-size:300px;
    }
}

.map-aside-action-pop-out {
    margin-right: -4px;
    background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMTcxLjQyOSIgZmlsbD0iIzNhMzEzMyI+PHBhdGggZD0iTTE1Ny4xNDMsMTAzLjU3MXYzNS43MTRjMCw4Ljg1NC0zLjE0NCwxNi40MjYtOS40MzEsMjIuNzEzcy0xMy44NTgsOS40MzEtMjIuNzEyLDkuNDMxSDMyLjE0MyBjLTguODU0LDAtMTYuNDI1LTMuMTQ0LTIyLjcxMi05LjQzMVMwLDE0OC4xNCwwLDEzOS4yODVWNDYuNDI5YzAtOC44NTQsMy4xNDQtMTYuNDI1LDkuNDMxLTIyLjcxMiBjNi4yODctNi4yODcsMTMuODU4LTkuNDMxLDIyLjcxMi05LjQzMWg3OC41NzJjMS4wNDEsMCwxLjg5NiwwLjMzNSwyLjU2NiwxLjAwNGMwLjY3LDAuNjcsMS4wMDQsMS41MjUsMS4wMDQsMi41NjdWMjUgYzAsMS4wNDItMC4zMzQsMS44OTctMS4wMDQsMi41NjdjLTAuNjcsMC42Ny0xLjUyNSwxLjAwNC0yLjU2NiwxLjAwNEgzMi4xNDNjLTQuOTExLDAtOS4xMTUsMS43NDktMTIuNjEyLDUuMjQ2IHMtNS4yNDYsNy43MDEtNS4yNDYsMTIuNjEydjkyLjg1NmMwLDQuOTExLD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