@import (reference) "~ui/styles/theme";
@import (reference) "~ui/styles/variables";

kibana-settings-app,
kbn-settings-indices,
kbn-settings-indices-edit,
kbn-settings-indices-create,
kbn-settings-advanced,
kbn-settings-objects,
kbn-settings-objects-view {
  display: block;
}

.settings-nav {
  text-transform: capitalize;
}

li.kbn-settings-tab:first-letter {
  text-transform: capitalize;
}

kbn-settings-objects {
  form {
    margin-bottom: @line-height-computed;
  }
  .list-unstyled {
    // border-top: 1px solid @gray-lighter;
    // margin-top: @line-height-computed;
    li {
      border-bottom: 1px solid @gray-lighter;
      padding: 8px;
    }
  }
  .empty {
    color: @gray-light;
  }

  .action-bar {
    margin-top: 10px;
    background-color: @gray-lighter;
    padding: 4px 12px;

    label {
      font-size: 10px;
      font-weight: normal;
    }

    .btn {
      font-size: 10px;
      margin-left: 20px;
    }
  }

  .header {
    .title, .controls {
      padding-right: 1em;
      display: inline-block;
    }
  }
}

kbn-settings-advanced {
  // super specific rule to override bootstrap's equally specific rule
  // https://github.com/twbs/bootstrap/blob/1f329f8f17aa989eabc6e94bdcab93e69ef0e463/less/tables.less#L35
  .table > tbody > tr > td {
    vertical-align: middle;
  }
}

kbn-settings-objects-view {
  label {
    font-family: @font-family-monospace;
  }
  .ace_editor { height: 300px; }
}

.kbn-settings-about {
  margin-top: 30px;

  .jumbotron h1 {
    font-weight: bold;
  }

  &-versions {
    td {
      width: 50%;
    }

    td:first-child {
      font-weight: bold;
      text-align: right;
    }
  }
}

.advanced-settings {
  table {
    width: 100%;

    tr.default td.value {
      color: @input-color-placeholder;
    }

    td {
      font-family: @font-family-monospace;

      &.actions {
        width: 150px;
      }
    }
  }
}

.objects-settings {
  .item {
    padding: 12px;

    .item-title {
      margin-left: 30px;
    }

    .actions {
      margin-top: -6px;
    }
  }
}

.indices-settings {
  i.active {
    color: @btn-success-bg;
  }

  tr.field-settings {
    .field-popularize {
      margin-left: 5px;
      display: none;
    }
    &:hover .field-popularize {
      display: inline;
    }
  }

  .index-pattern-name {
    display: flex;
    align-items: center;

    .title {
      flex: 1 1 auto;
    }

    .controls {
      flex: 4 0 auto;
    }
  }
}

kbn-settings-indices {
  .fields {
    table {
      .table-striped()
    }

    th:last-child,
    td:last-child {
      text-align: right;
    }
  }

  .indexed-fields {
    th:first-child,
    td:first-child {
      width: 35%;
    }
  }

  .scripted-fields header {
    margin: 5px 0;
    text-align: right;
  }

  p.text-center {
    padding-top: 1em;
  }
}


.kbn-settings-indices-create {
  .time-and-pattern > div {}
}
