@import "compass/css3";
@import "../../styles/mixin";

.trip-exposed {
  outline: 2px solid white;
}

.trip-overlay {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  background: black;
  width: 100%;
  height: 100%;

  // NOTE
  // z-index is an option defined in trip.js
  @include opacity(0.7);
}

.trip-block {
  display: none;
  padding: 8px;
  position: absolute;
  text-align: center;
  min-width: 100px;
  border-radius: 3px;

  &:before {
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
  }

  $arrow-size: 8px;
  &.n:before, &.s:before {
    border-width: $arrow-size;
    left: 50%;
    margin-left: -$arrow-size;
  }

  &.e:before, &.w:before {
    border-width: $arrow-size;
    top: 50%;
    margin-top: -$arrow-size;
  }

  &.n:before {
    top: 100%;
  }

  &.s:before {
    bottom: 100%;
  }

  &.e:before {
    right: 100%;
  }

  &.w:before {
    left: 100%;
  }

  // sepcial directions will be positioned fixed
  &.screen-ne,
  &.screen-se,
  &.screen-sw,
  &.screen-nw,
  &.screen-center {
    position: fixed;
  }

  &.animated {
    // animations are from :
    // http://thecssguru.freeiz.com/animate/
    $duration: 0.5s;
    $delay: 0s;
    $supportAnimations: (
      'flash', 'bounce', 'shake', 'tada',
      'fadeIn', 'fadeInUp', 'fadeInDown',
      'fadeInLeft', 'fadeInRight', 'fadeInUpBig', 'fadeInDownBig',
      'fadeInLeftBig', 'fadeInRightBig', 'bounceIn', 'bounceInDown',
      'bounceInUp', 'bounceInLeft', 'bounceInRight', 'rotateIn',
      'rotateInDownLeft', 'rotateInDownRight', 'rotateInUpLeft',
      'rotateInUpRight'
    );

    @each $animation in $supportAnimations {
      &.#{$animation} {
        @include animate(#{$animation}, $duration, $delay);
      }
    }
  }

  .trip-header {

  }

  .trip-content {
    clear: right;
  }

  // define its basic rules
  .trip-close {
    position: relative;
    font-size: 80%;
    float: right;
    margin-top: -5px;
    z-index: 1;

    &:hover {
      text-decoration: none;
    }
  }

  .trip-navigation {
    @include display-flex;
  }

  .trip-prev,
  .trip-next,
  .trip-skip {
    padding: 5px 10px;
  }

  .trip-prev,
  .trip-next {
    &.disabled {
      color: grey;
      pointer-events: none;
    }
    @include flex(1);
  }

  .trip-skip {
    @include flex(2);
  }

  .trip-progress-bar {
    height: 1px;
    background-color: #444;
    width: 0;
  }

  .trip-progress-steps {
    border: 1px solid #ddd;
    border-width: 1px 0;

    .trip-progress-step {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 100%;
      background: #ddd;
      margin: 15px 5px 11px;

      &.selected {
        background: none;
        border: 1px solid;
        @include scale(1.25);
      }
    }
  }
}
