/**
* Based on Brian Park's MIT-licensed Angular-Json-Human directive, this works on trees.
* Angular directive to convert JSON into human readable table. Inspired by https://github.com/marianoguerra/json.human.js.
* @version v1.2.1 - 2014-12-22
* @link https://github.com/yaru22/angular-json-human
* @author Brian Park <yaru22@gmail.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
/**
* DISCLAIMER: This CSS is modified from https://github.com/marianoguerra/json.human.js
*/

/* --- common css classes for QW Query Results table (class + <table>, <tr>, <td>) and tree displays (class + <li> or <ul>) ---- */

.ajtd-type-object,
.ajtd-type-array,
.ajtd-type-object table,
.ajtd-type-array tr,
.ajtd-type-array td {
  border-collapse: collapse;
  width: auto;
  margin-bottom: 0;
}
.ajtd-key {
  display: inline-block;
  font-style: italic;
  margin: 0;
  padding: .25rem;
  color: #2ca01c;
  font-size: .875rem;
}
.ajtd-value {
  margin: 0;
  padding: .25rem;
  font-size: .875rem;
}
.ajtd-value:first-child {
  padding: 0;
}
.ajtd-type-bool,
.ajtd-type-number {
  font-weight: 500;
  text-align: center;
  color: #cc2a2e;
}
.ajtd-type-string {
  font-style: italic;
  color: #333;
}
.ajtd-empty {
  font-style: italic;
  color: #999;
  font-size: small;
}

/* for TREES ---------------- */
li.ajtd-type-array,
ul.ajtd-type-array {
  padding: 0;
  margin: 0;
}

ul.ajtd-type-object,
ul.ajtd-type-array {
  list-style-type: none;
}

.ajtd-type-object > li {
  padding: .25rem;
  border: 1px dashed #d1d1d1;
  border-bottom: none;
}

.ajtd-type-object li:last-child,
.ajtd-type-array li:last-child {
  border-bottom: 1px dashed #d1d1d1;
}

/* for TABLES ---------------- */
table.ajtd-root {
  border: 0px solid #d1d1d1;
  margin: 0;
}
table.ajtd-root td {
  padding: .125rem;
  border: 1px solid #ececec;
}
table.ajtd-root tr:last-of-type {
  border-bottom: 1px solid #ececec;
}
table.ajtd-root th {
  background-color: #ececec;
  cursor: pointer;
}
td.ajtd-type-array {
  vertical-align: baseline;
}

/* striping alternate 'rows' for TREES and TABLES ---------- */
.ajtd-root > tbody > tr:nth-child(odd),
.ajtd-table > tbody > tr:nth-child(odd),
.ajtd-type-object > li:nth-child(odd),
.ajtd-type-array > li:nth-child(odd) {
  background-color: #f6f7f9;
}

.ajtd-root > tbody > tr:nth-child(even),
.ajtd-table > tbody > tr:nth-child(even),
.ajtd-type-object > li:nth-child(even),
.ajtd-type-array > li:nth-child(even) {
  background-color: #fff;
}

/* hide and show very long strings in TABLES --------- */
.ajtd-hideContent {
  overflow: hidden;
  line-height: 1.5;
  height: 2.5rem;
}
.ajtd-editor {
  font-size: small;
  min-width: 140px;
}
.ajtd-editor-table {
  overflow: auto;
}
.ajtd-showContent {
  height: auto;
}

/*  basic <td> class  ---------------------- */
.ajtd-cell {
  word-wrap: break-word;
}
