@import "mixins";
@import "variables";

$formBreakpoint: 1100px;
$formWidth: 600px;
$previewHeight: 800px;

body.transit-add {
  background: #f1f1f1;
  @media (max-width: $formBreakpoint) {
    background: $white;
  }
}

.transit-add-wrapper {
  position: relative;
  z-index: 1;
  @include clearfix();
}

.form-wrapper { 
  position: relative;
  width: $formWidth;
  float: left;
  @include box-sizing();
  
  @media (max-width: $formBreakpoint) {
    float: none;
    width: 100%;
    max-width: $formWidth;
    margin: 20px auto 0;
    padding: 50px 20px 10px;
  }
}

.preview-wrapper {
  position: relative;
  width: auto;
  min-height: $previewHeight;
  margin-top: 50px;
  margin-right: 20px;
  margin-left: $formWidth + 20;
  background: $white;
  .empty-message {
    text-align: center;
    width: 300px;
    height: 100px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -50px;
    margin-left: -150px;
    font-size: 1em;
    color: #888;
  }
  @media (max-width: $formBreakpoint) {
    display: none; 
  }
}
.svg-wrapper.preview {
  z-index: 0;
  position: absolute;
}

.form-tab-links {
  @include clearfix();
  
  .tab-link {
    display: block;
    float: left;
    width: 33.3333333%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: $secondary;
    color: $white;
    overflow: hidden;
    border-bottom: 1px solid darken($secondary, 10%);
    border-left: 1px solid darken($secondary, 10%);
    margin-left: -1px;
    &:hover {
      background: lighten($secondary, 5%);
    }
    &.active {
      background: lighten($light, 5%);
      color: $dark;
      border-bottom: 1px dashed darken($light, 5%);
    }
    &:first-child {
      border-left: none;
      margin-left: 0;
    }
    @media (max-width: $formBreakpoint) {
      &:first-child {
        @include border-radius(6px 0px 0px 0px);
        border-left: none;
        margin-left: 0;
      }
      &:last-child {
        @include border-radius(0px 6px 0px 0px);
      }
    }
  }
}

.form-tabs {
  padding: 10px 20px 40px;
  background: lighten($light, 10%);
  min-height: $previewHeight - 40;
  border-right: 1px solid $light;
  border-bottom: 1px solid $light;
  
  .tab {
    max-height: 0;
    overflow: hidden;
    
    &.active {
      max-height: 5000px;
      overflow: visible;
    }
  }
  
  button[type="submit"] {
    margin-top: 20px;
  }
  
  @media (max-width: $formBreakpoint) {
    min-height: 0;
    border: none;
    @include border-radius(0 0 6px 6px);
  }
}

.tab-list {
  margin-top: 20px;
  li {    
    border-bottom: 1px solid darken($light, 5%);
    padding: 6px 0;
    overflow: hidden;
  }  
  .content {
    line-height: 40px;    
    @include clearfix();
    > div {
      height: 40px;
      float: left;
      overflow: hidden;
    }
  }
  .button {
    margin: 0;
    padding: 0 10px;
    font-size: 0.8em;
    line-height: 30px;
    vertical-align: middle;
  }
  input {
    display: inline-block;
    border: none;
    line-height: 30px;
    height: 30px;
    vertical-align: middle;
    background: rbga(255, 255, 255, 0.5);
  }
  .remove {
    width: 5%;
  }
  .name {
    width: 45%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    padding-right: 6px;
    @include box-sizing();
  }
  .list {
    width: 28%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-style: italic;
    color: #888;
  }
  .action {
    width: 22%;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
  }
  .sortable-handle {
    cursor: move;
  }
}

.people-select-list {  
  li {
    display: inline-block;
    margin-right: 10px;
  }
  
  .button {
    background: #bbb;
    &.active {
      background: $green;
    }
  }
}

.button-group {
  margin-top: 20px;
  button {
    background: #bbb;
    margin-right: 6px;
    &.active {
      background: $green;
    }
  }
}

.toolbar {
  position: fixed;
  top: 5px;
  right: 5px;
  text-align: right;
  z-index: 100;
}
.toolbar-link {
  display: inline-block;
  position: relative;
  margin-left: 10px;
  padding: 0 6px;
  height: 28px;
  line-height: 28px;
  border: 1px solid #ccc;
  background: $white;
  .toolbar-list {
    background: $white;
    display: none;
    position: absolute;
    width: 100%;
    top: 28px;
    left: -1px;
    border: 1px solid #ccc;
    border-top: 1px solid $white;
    a {
      display: block;
      padding: 3px 6px;
      text-align: left;
      font-size: 0.8em;
      &:hover {
        background: lighten($light, 10%);
      }
    }
  }
  &.hide {
    display: none;
  }
  &:hover {
    background: $white;
    border: 1px solid $secondary;
    background: $secondary;
    color: $white;
    .toolbar-list {
      display: block; 
    }
  }
}

