input, textarea {
  margin: 0;
  border: 0;
  padding: 0;
  font: normal normal 13px/16px $sansSerif;
  outline: none;
  background-color: transparent;
  @include userSelect(text);
}

.set-name-row {
  display: none;
  height: 0%;
}

// A two column form used to collect user input for grids.
.grid-form {
  width: 100%;
  border-collapse: collapse;
  line-height: 0;

  td {
    padding: 0 0 2px 0;
    &:first-child { padding-right: 1px; }
    &:last-child { padding-left: 1px; }
    &:first-child:last-child {
      padding-left: 0;
      padding-right: 0;
    }
  }

  tr:last-child td { padding-bottom: 0; }

  textarea {
    max-width: 100%;
    width: 100%;
  }

  .set-name { width: 100%; }

  .input { height: 22px; }

  .checkbox { height: 18px; }
}

.is-showing-new-set-form {

  .set-name-padding {
    margin-top: 28px;
  }

  .set-name-row { display: block; }
}

// A text field that contains GuideGuide String Notation.
.ggn-form {

  textarea {
    margin: 0;
    padding: 3px 0;
    width: 100%;
    resize: none;
    font-size: 12px;
  }

  .grid-form {
    margin-bottom: 48px;
  }

  .ggn-input {
    overflow: hidden;
    position: absolute;
    margin-bottom: 48px;
  }

  .scroll-content {
    position: absolute;
    height: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

// A horizontal list of buttons at the bottom of a form.
// Primary buttons are highlighted and take up the most room.
.form-action-buttons {
  position: absolute;
  display: table;
  width: 100%;
  margin-bottom: 10px;
  bottom: 0;


  .button {
    display: table-cell;
    padding: 4px 10px 6px;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;

    &.primary { width: 100%; }

    &.save-set, &.cancel-set { display: none; }

    .is-showing-new-set-form &.save-set { display: table-cell; }
    .is-showing-new-set-form &.cancel-set { display: table-cell; }
    .is-showing-new-set-form &.make-grid { display: none; }
    .is-showing-new-set-form &.add-set { display: none; }
  }

  .icon-button {
    line-height: 0;
    padding: 5px;
  }
}

.make-grid {
  @include transition(opacity .2s);
}

// A basic input. This is required to be able to do 100% width AND have
// padding, since box-sizing isn't supported.
//
// <div class="input js-input">
//   <div class="input-shell">
//     <input type="text" class="js-input-target">
//   </div>
// </div>
//
// .iconned inputs have extra room to the left to account for a nested icon.
.input {
  display: block;

  .input-shell {
    display: block;
    border: 1px solid transparent;
    padding: 2px 4px;
    line-height: 0;
    cursor: text;
  }

  &.iconned .input-shell { padding: 2px 2px 2px 21px; }

  input {
    width: 100%;
    font-size: 12px;
  }

  position: relative;

  .icon {
    display: block;
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
  }

  .input-padding { padding: 0 4px; }
}

.importer {
  position: absolute;
  z-index: 20;
  display: none;

  .is-showing-importer & { display: block; }

  .importer-padding {
    margin: 0 10px;
  }

  .input {
    position: absolute;
    margin-top: 53px;
    margin-bottom: 50px;
  }

  .importer-desc {
    margin-top: 10px;
    font-size: 14px;
  }

  textarea {
    padding: 3px 0;
    width: 100%;
    resize: none;
  }
}

.clear-form-button-holder {
  display: none;
  margin-top: 10px;
  padding-left: 3px;

  .icon-clear-guides {
    vertical-align: top;
  }

  .is-showing-clear-button & {
    display: block;
  }
}
