@mixin placeholdit ($width, $height) {
  background-image: url("http://placehold.it/#{$width}x#{$height}");
  height: #{$height}px;
  width: #{$width}px;
}

@mixin absolute-center ($height) {
  height: $height;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: auto;
  text-align: center;
  position: absolute;
}

.charts {

  list-style: none;
  margin: 0;

  .expanded {
    width: 100%;
    margin-left: 0;
    .plot {
      min-height: 400px;
    }
  }

  .normal {
    width: 49%;
    display: inline-block;

    &:last-child {
      margin-left: 2%;
    }
    .chart {
      &.new a {
        line-height: 15;
      }
      .plot {
        height: 225px;
      }
    }
  }
}

.chart {
  border: 1px solid $brand-tertiary;
  padding: 1em;
  margin-bottom: $baseLineHeight;

  .caption {
    position: relative;
    h4 {
      text-align: center;
    }
    .edit-chart {
      display: block;
      position: absolute;
      right: 0;
      bottom: 0;
    }
  }


  &.new {
    border-width: 2px;
    border-style: dashed;
    box-shadow: none;
    display: block;
    text-align: center;
    line-height: 15;
    font-size: $fontSizeLarge;
    border-width: 3px;
    @include box-shadow(none);

    cursor: pointer;

    &:hover {
      text-decoration: none;
      @include box-shadow(none);
    }
  }
}

.chart-edit {
  width: 800px;
  left: 40%;

  .modal-header {
    h3, a, input {
      display: inline-block;
    }
  }

  ul {
    margin-left: 0;
  }

  fieldset {
    border-bottom: 1px solid $grayLighter;
    padding-top: $baseLineHeight;
    h4 { margin-top: 5px };
  }
}

.graph {
  overflow: hidden;
}

.plot {
  position: relative;
  display: block;

  &.maximized {
    height: 100%;
  }
}

.rickshaw-maximizer,
.rickshaw-minimizer {
  position: absolute;
  bottom: 5px;
  right: 5px;
  display: block;
  text-align: center;
  border: 1px solid $grayLighter;
  height: 20px;
  width: 20px;
  background-color: #fff;

  &:hover {
    border-color: $gray;
  }

  i {
    cursor: pointer;
  }

}

.rickshaw_graph {
  .detail {
    .super-label {
      font-family: Arial, sans-serif;
      border-radius: 3px;
      padding: 6px;
      border: 1px solid #e0e0e0;
      font-size: 12px;
      position: absolute;
      white-space: nowrap;
      background-color: white;
      background-color: rgba(255, 255, 255, .75);
    }
    .super-label.left {
      left: 10px;
    }
    .super-label.right {
      right: 10px;
    }

    .title,
    .value {
      font-weight: bold;
    }

    .swatch {
      width: 10px;
      height: 10px;
      border: 1px solid rgba(0, 0, 0, .2);
      display: inline-block;
      margin-right: 3px;
      border-radius: 2px;
    }
  }
}

.rickshaw-maximizer {
  z-index: 2;
}
