/* --------------------------------------
  Little Helpers
----------------------------------------- */
.button .maki { margin-right:5px;}

/* --------------------------------------
  Basic Styles
----------------------------------------- */
#maki-hero {
  position: relative;
  z-index: 0;
  min-height: 480px;
  }

#maki-hero .intro {
  margin: auto;
  position: absolute;
  left: 0;
  right: 0;
}

#map {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  }

  .download-button .details small, .download-button .details h3 {
    color: #fff;
    }
  .download-button h3 {
    margin-bottom: 0;
    }
  .download-button .details {
    border: 1px solid #3887be;
    border-right: none;
    border-radius: 0 4px 4px 0;
    background-color:#3887BE;
    white-space: nowrap;
    }
      .download-button:hover .details {
      background: #3bb2d0;
      border-color: #3bb2d0;
      }
  .download-button .label {
    position: relative;
    border: 1px solid #3175a5;
    border-right: none;
    border-radius: 4px 0 0 4px;
    }
  .download-button:hover .label { border-color: #3bb2d0; }

.download-button .big-icon-download {
  background: url(images/sprite.png) -165px 3px no-repeat;
  height: 35px;
  width: 20px;
  float: left;;
  margin-right: 10px;
  }

.illustration-container {
  overflow: hidden;
  height: 350px;
  position: relative;
  bottom: -40px;
  }

.open-source-illustration {
  background: url(images/sprite.png) 0 -155px no-repeat;
  height: 350px; width: 460px;
  position: absolute;;
  bottom: 0; left: 0; right: 0;
  margin: 0 auto;
  }

/* --------------------------------------
  Maki Icon Grid
----------------------------------------- */
.canvas {
  background:#fff url(images/bg.png) repeat 0 0;
  position:relative;
  }

/*Search box*/
.canvas-controls form input {
  background: #fff url(images/sprite.png) -441px 10px no-repeat;
  width: 100%;
  height: 40px;
  padding: 10px 5px;
  line-height: 40px\9; /* IE6,7,8 Hack to center the cursor in IE */
  padding-left: 30px;
  -webkit-appearance: none;
  }

/*Icons on the canvas*/

#maki-set { min-height: 300px; }

ul.icon-set {
  float: left;
  position: relative;
  }

.maki-details {
  background: url(images/maki-dot-pattern.png) 0 0 repeat #8fa363;
  padding: 20px;
  min-height: 190px;
  width: 880px;
  -webkit-border-radius: 0px 0px 5px 5px;
  border-radius: 0px 0px 5px 5px;
  margin-bottom: 20px;
  z-index: 1000;
  }

/* Searching icons */
#maki-set.active ul  { visibility: hidden\9; }

body.searching #search-results { display: block; }
#search-results {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 160px;
  overflow: hidden;
  }
  #search-results div {
    visibility: hidden;
    padding: 20px;
    }
  #search-results div.empty {
    left: 0; right: 0; top: 130px;
    position: absolute;
    margin: auto;
    text-align: center;
    font-size: 20px;
    }
  #search-results div.active { visibility: inherit; }

  #search-results ul#results {
    position: absolute;
    bottom:120px;
    width: 66.6666%;
    margin-left: 16.6666%;
    transition:all 250ms;
    -moz-transition:all 250ms;
    -webkit-transition:all 250ms;
    }
    #search-results ul#results.size-1 {
      left: 50%;
      width: 60px;
      margin-left: -30px;
      -moz-transition: none;
      -o-transition: none;
      -webkit-transition: none;
      transition: none;
      }
    #search-results ul#results.size-2  { margin-left: 37.5000%; width: 25%;}
    #search-results ul#results.size-3  { margin-left: 37.5000%; width: 25%;}
    #search-results ul#results.size-4  { margin-left: 37.5000%; width: 25%;}
    #search-results ul#results.size-5  { margin-left: 33.3333%; width: 33.3333%; }
    #search-results ul#results.size-6  { margin-left: 33.3333%; width: 33.3333%; }
    #search-results ul#results.size-7  { margin-left: 33.3333%; width: 33.3333%; }
    #search-results ul#results.size-8  { margin-left: 29.1666%; width: 41.6666%; }
    #search-results ul#results.size-9  { margin-left: 29.1666%; width: 41.6666%; }
    #search-results ul#results.size-10 { margin-left: 29.1666%; width: 41.6666%; }
    #search-results ul#results.size-11 { margin-left: 25.0000%; width: 50%; }
    #search-results ul#results.size-12 { margin-left: 25.0000%; width: 50%; }
    #search-results ul#results.size-13 { margin-left: 25.0000%; width: 50%; }
    #search-results ul#results.size-14 { margin-left: 20.8333%; width: 58.333%; }
    #search-results ul#results.size-15 { margin-left: 20.8333%; width: 58.333%; }
    #search-results ul#results.size-16 { margin-left: 20.8333%; width: 58.333%; }

    #search-results ul#results li {
      position: relative;
      float: left;
      }

.title-box {
  position: absolute;
  background: white;
  left: -42px; right: 0;
  bottom: 60px;
  width: 150px;
  padding: 10px;
  text-align: center;
  margin: auto;
  white-space:nowrap;
  display: none;
  border: 1px solid #ddd;
  -webkit-border-radius: 2px;
     -moz-border-radius: 2px;
          border-radius: 2px;
  }
  .title-box::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ddd;
    position: absolute;
    bottom: -10px;
    left: 0px;
    right: 0;
    margin: auto;
    }
#maki-set ul.icon-set:hover .title-box,
#search-results ul#results li:hover .title-box {
  display: block;
  }

a.search-download {
  position: absolute;
  right: 203px;
  font-size: 14px;
  bottom: 50px;
  }
.canvas-controls #maki-close {
  top: 5px;
  right: 5px;
  position:absolute;
  display:none;
  height: 30px;
  width: 30px;
  padding: 5px;
  }
  .canvas-controls #maki-close.active { display:block; }

/* --------------------------------------
  Icon Preview
----------------------------------------- */

.preview-screen {
  height: 200px;
  }
  .preview-screen img {
    display: block;
    left: 0px;
    right: 0px;
    margin: auto;
    }
#maki-icon-preview ul {
  border-radius: 4px;
  }

#maki-icon-preview li a {
  float: left;
  width: 33.3333%;
  margin: 0;
  border-radius: 0;
  background: #ABABD1;
  border-right: 1px solid #8A8ACB;
  font-size: 12px;
  min-width: 0;
  transition: background 500ms;
  -moz-transition: background 500ms;
  -webkit-transition: background 500ms;
  -o-transition: background 500ms;
  }
  #maki-icon-preview li a.active { background: rgba(255,255,255,.5); }
  #maki-icon-preview li a.size-12 {
    border-radius: 0 4px 4px 0;
    border-right: 0px;
    }
  #maki-icon-preview li a.size-24 {
    border-radius: 4px 0 0 4px;
    }

#maki-icon-preview .maki {
  vertical-align:top;
  display:inline-block;
  height:24px;
  width:24px;
  background: url(images/sprite.png) -200px -35px no-repeat;
  }
#maki-icon-preview .maki.size-18 { background-position-y: -85px;}
#maki-icon-preview .maki.size-12 { background-position-y: -115px}

/* --------------------------------------
  Map Styles
----------------------------------------- */

@media
only screen and (max-width: 640px) {
  .download { display: none;}
  #maki-hero { min-height: 0;}
  #maki-hero .intro { position: relative; padding:0;}
  #map { display: none; }
  .canvas-controls { padding-bottom: 40px;}
  #results { bottom: -40px;}
  .info .cell6:first-child { padding-bottom: 0;}
  .illustration-container { bottom: -20px;}

}

@media
  only screen and (-webkit-min-device-pixel-ratio : 2),
  only screen and (min-device-pixel-ratio : 2) {
  close,
  .canvas-controls form input,
  .maki-details,
  #maki-icon-preview .maki,
  .spot-illustration,
  .open-source-illustration,
  .download-button .big-icon-download,
  .branding .attribution .small-mapbox {
    background-image: url(images/sprite@2x.png);
    background-size: 470px 505px;
  }
}
