@import "legacy_includes/_colors.scss";
@import "legacy_includes/_mixins.scss";

#bi_user_embed {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 200;
  margin: 0;
  padding: 0;

  * {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    text-rendering: optimizeLegibility;
  }

  .bi-embed-box {
    @include border-radius(3px 3px 2px 2px);

    @include box-shadow(0 0 2px rgba(black, 0.2));

    max-width: 200px;
    margin: 0;
    border: 2px solid $blueDarker;
    background: $blueDarker;
    position: relative;
    overflow: hidden;

    .bike-photo {
      display: block;
      width: 100%;
      height: auto;
    }

    .no-bike-photo {
      display: block;
      position: absolute;
      left: 0;
      top: 1em;
      width: 100%;
      text-align: center;
      color: rgba($blueDarker, 0.4);
    }

    .bikey-slide {
      width: 100%;
      position: relative;
      background: $grayLighter;
    }

    .bi-bike-link {
      display: block;
      position: absolute;
      z-index: 20;
      width: 100%;
      height: 100%;
    }

    .bi-title {
      width: 100%;
      position: absolute;
      bottom: 0;
      left: 0;
      padding: 5px 2px;
      background: rgba(black, 0.4);
      color: $grayLighter;
      cursor: pointer;
      border-top: 1px solid rgba(black, 0.1);
      -webkit-transition: all 0.2s linear;
      -moz-transition: all 0.2s linear;
      -o-transition: all 0.2s linear;
      transition: all 0.2s linear;
    }

    &:hover {
      .bi-title {
        color: $grayLighterer;
      }

      .bi-slide-over {
        display: none;
      }

      #bi-slide-prev {
        left: -1.5em;
      }

      #bi-slide-next {
        right: -1.5em;
      }
    }
  }

  .bikes-registered {
    @include box-shadow(0 0 2px rgba(black, 0.4));

    border-bottom: 1px solid rgba(black, 0.1);
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 2px 5px;
    margin: 0;
    text-align: center;
    color: $grayLighterer;
  }

  .bi-slide-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    -moz-box-shadow: inset 0 0 2px rgba(black, 0.3);
    -webkit-box-shadow: inset 0 0 2px rgba(black, 0.3);
    box-shadow: inset 0 0 2px rgba(black, 0.3);
  }

  .controleys {
    @include border-radius(1em);

    cursor: pointer;
    position: absolute;
    top: 50%;
    background: rgba(white, 0.5);
    padding: 1em;
    margin-top: -1.5em;
    color: $grayMed;
    z-index: 50;
    -webkit-transition: all 0.15s linear;
    -moz-transition: all 0.15s linear;
    -o-transition: all 0.15s linear;
    transition: all 0.15s linear;

    &:hover {
      background: rgba(white, 0.8);
      color: $grayDark;
    }
  }

  #bi-slide-prev {
    &:active {
      @include translate(-1px, 2px);
    }

    left: -4em;
    padding-left: 2em;
  }

  #bi-slide-next {
    &:active {
      @include translate(1px, 2px);
    }

    right: -4em;
    padding-right: 2em;
  }

  .swipe {
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
    visibility: hidden;
    position: relative;
  }

  .swipe-wrap {
    overflow: hidden;
    position: relative;
  }

  .swipe-wrap .bikey-slide {
    float: left;
    width: 100%;
    position: relative;
  }
}
