/* main data table */
.dataTable {
  border: 0;
  width: 100%;
  padding: 0;
  border-spacing: 0;
  margin: 0;

  td .ratio {
    color: #999999;
    font-size: 12px;
    display:none;
    text-align: right;
    min-width: 45px;
    margin-left: 4px;
    font-weight: normal;
  }

  td.highlight > .ratio {
    display: inline-block;
    line-height: 15px;
  }
}

div.dataTable {
  position:relative;
}

table.dataTable td.label,
table.subDataTable td.label {
  width: 100%;
  white-space: nowrap;
}

table.dataTable img,
table.subDataTable img {
  vertical-align: middle;
}

table.dataTable img {
  border: 0;
  margin-right: 1em;
  margin-left: 0.5em;
}

table.dataTable tr.subDataTable {
  cursor: pointer;

  td.label span.label {
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    width: inherit;
    display: inline-block;
  }
}

table.dataTable th {
  margin: 0;
  color: @dataTable-link-color;
  text-align: left;
  padding: 6px 6px 6px 12px;
  background: @dataTable-header-background;
  font-size: 12px;
  font-weight: normal;
  border-left: 1px solid #d4d0c4;
  vertical-align: top;
}

table.dataTable th.sortable {
  cursor: pointer;
}

table.dataTable th.columnSorted {
  font-weight: bold;
  padding-right: 20px;
  background: @dataTable-headerActive-background;
}

table.dataTable td {
  padding: 5px 5px 5px 12px;
  background: @theme-color-background-base;
  border-left: 1px solid #e7e7e7;
}

table.dataTable td,
table.dataTable td a {
  margin: 0;
  text-decoration: none;
  color: @theme-color-text-light;
}

table.dataTable tr:hover > td,
table.dataTable tr:hover > td .dataTableRowActions {
  background-color: #FFFFF7;
}

table.dataTable tr.subDataTable:hover > td,
table.dataTable tr.subDataTable:hover > td .dataTableRowActions {
  background-color: #ffffcb;
}

table.dataTable tr:hover > td.cellSubDataTable
table.dataTable tr:hover > td.cellSubDataTable .dataTableRowActions {
  background-color: @theme-color-background-base;
}

td.clean {
  background-color: @theme-color-background-base;
}

table.dataTable td.column {
  white-space: nowrap;
}

table.dataTable td.columneven {
  background: #efeeec;
}

table.dataTable td.columnodd {
  background: #f6f5f3;
}

.dataTable tr.highlight td {
  background-color: #ECF9DD;
  font-weight: bold;
}

table.dataTable td.label,
table.subActionsDataTable td.label,
table.actionsDataTable td.label {
  border-top: 0;
  border-left: 0;
}

table.dataTable th.label {
  border-left: 0;
}

.dataTableActions table.dataTable th.label {
  /* Ensures tables have enough space to display subtable on click, and prevent the jumping effect */
  min-width: 250px;
}

table.dataTable span.label.highlighted {
  font-style: italic;
}

/* the cell containing the subdatatable */
table.dataTable .cellSubDataTable {
  margin: 0;
  border-left: 0;
  padding: 6px 12px 6px;
}

.cellSubDataTable > .dataTable {
    padding: 6px 0 0;
}

/* A link in a column in the DataTable */
table.dataTable td #urlLink {
  display: none;
}

table.dataTable img {
  margin-left: 0;
}

.dataTable > .dataTableWrapper {
  width: 450px;
}

div.dataTable, div.dataTable > .dataTableWrapper {
  margin-bottom: 9px; // same height as expand/contract button (so datatable height will encompass the
                      // expand/contract button)
}

.subDataTable > .dataTableWrapper {
  width: 95%;
}

.sortIconContainer {
  float: right;
  position: relative;
}

.sortIcon {
  margin: 0;
  position: absolute;
}

.datatableFooterMessage {
  color: #888;
  text-align: left;
  margin: 10px;
}

.dataTablePages {
  color: #BFBFBF;
  font-weight: bold;
  margin: 10px;
  font-size: 12px;
}

.dataTableSearchPattern {
  margin: 5px 0 2px 0;
  height: 20px;
  display: block;
  white-space: nowrap;
  background: url(plugins/Morpheus/images/search_bg.png) no-repeat center 0;
  text-align: center;
}

.dataTableSearchPattern input {
  vertical-align: top;
  font-size: 10px;
  color: #454545;
  border: 0;
  background: transparent;
  width: 21px;
  height: 17px;
  overflow: hidden;
  opacity: 0;
  filter: Alpha(opacity=0);
  cursor: pointer;
}

.dataTableSearchPattern .searchInput {
  width: 114px;
  height: auto;
  overflow: visible;
  padding: 2px 6px;
  opacity: 1;
  cursor: text;
  filter: Alpha(opacity=100);
}

.dataTableNext,
.dataTablePrevious {
  font-size: 12px;
  color: #184A83;
  cursor: pointer;
}

.datatableRelatedReports {
  color: #888;
  font-size: 11px;
  padding-bottom: 5px;
  margin-top: 6px;
}

#dashboard .datatableRelatedReports {
  margin-top: 0px;
}

.datatableRelatedReports span {
  cursor: pointer;
  font-weight: bold;
}

.dataTableFeatures {
  text-align: center;
}

.dataTableFooterNavigation {
  padding: 5px 0;
}

.dataTableNext,
.dataTablePrevious,
.dataTableSearchPattern {
  display: none;
}

.dataTableFeatures .loadingPiwik {
  font-size: 0.9em;
}

.subDataTable .dataTableFooterIcons {
  height: 0;
}

.dataTable .loadingPiwikBelow {
  padding-bottom: 5px;
  display: block;
  text-align: center;
}

.dataTableFooterIcons div {
  padding-bottom: 4px;
}

.dataTableFeatures {
  &.expanded {
    .dataTableFooterIcons {
      display: block;
    }

    .expandDataTableFooterDrawer {
      display: none;
    }
  }

  &.hasEvolution {
    .dataTableFooterIcons {
      margin-top: 17px;
    }
    .expandDataTableFooterDrawer {
      margin-top: 20px;
    }
  }

  .expandDataTableFooterDrawer {
    display: block;
    margin-top: 5px;
    margin-bottom: -1px;
    margin-left: auto;
    margin-right: auto;
    background-color: @theme-color-background-base;
    border: 1px solid @theme-color-background-tinyContrast;
    height: 7px;
    width: 70px;
    -webkit-border-bottom-left-radius: 10px;
    -webkit-border-bottom-right-radius: 10px;
    -moz-border-radius-bottomleft: 10px;
    -moz-border-radius-bottomright: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    line-height: 0px;

    img {
      margin-bottom: 0px;
      line-height: 0px;
    }
  }
}

.dataTableFeatures {
  border-bottom: 1px solid @theme-color-background-tinyContrast;
}

.widget .dataTableFeatures {
  border-bottom-style: none !important;
}

.dataTableFooterIcons {

  display: none;
  margin-top: 5px;
  height: auto;

  div {
    padding-bottom: 2px;
  }

  .foldDataTableFooterDrawer {
    display: block;
    padding-bottom: 0px;
    margin-bottom: -1px;
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    background-color: @theme-color-background-base;
    border: 1px solid @theme-color-background-tinyContrast;
    -webkit-border-top-left-radius: 10px;
    -webkit-border-top-right-radius: 10px;
    -moz-border-radius-topleft: 10px;
    -moz-border-radius-topright: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    line-height: 0px;
    height: 7px;
    width: 70px;
    clear: both;

    img {
      margin-top: 2px;
      margin-bottom: 0px;
      line-height: 0px;
    }
  }

  .controls {
    clear: left;
    padding: 0px 0px 15px;
    text-align: left;
    color: #333;
  }
}

#dashboard .dataTableFeatures,.widget .dataTableFeatures {
  .expandDataTableFooterDrawer {
    -webkit-border-top-left-radius: 10px;
    -webkit-border-top-right-radius: 10px;
    -moz-border-radius-topleft: 10px;
    -moz-border-radius-topright: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;

    -webkit-border-bottom-left-radius: 0px;
    -webkit-border-bottom-right-radius: 0px;
    -moz-border-radius-bottomleft: 0px;
    -moz-border-radius-bottomright: 0px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
  }
}

.dataTableFooterIcons .foldDataTableFooterDrawer,
.dataTableFeatures .expandDataTableFooterDrawer {
  cursor: pointer;
}

.widget .foldDataTableFooterDrawer {
  margin-bottom: -9px;
}

// customizing footer appearance for row evolution graph
.ui-dialog .dataTableVizEvolution {
  .expandDataTableFooterDrawer,.foldDataTableFooterDrawer {
    display: none !important;
  }

  .dataTableFooterIcons {
    display: block;
  }

  .dataTableFeatures {
    border-bottom-style: none !important;
    margin-top: 0 !important;
  }
}

@-moz-document url-prefix() {

  #dashboard .dataTableFeatures .expandDataTableFooterDrawer {
    line-height: 1px;

    img {
      margin-bottom: 1px;
      line-height: 1px;
    }
  }
}

.dataTableFooterIcons {
  min-height: 20px;
  white-space: nowrap;
  font-size: 10px;
  padding: 6px 5px 0px;
  border-top: 1px solid #B6B0A6;
}

.dataTableFooterWrap {
  position: relative;
  float: left;
}

.dataTableFooterWrap select {
  float: left;
  margin: 1px 0 1px 10px;
}

.tableIcon {
  background: #f2f1ed;
  display: inline-block;
  float: left;
  margin: 0 1px 0 0;
  padding: 2px;
  border-radius: 2px;
}

.tableIcon:hover {
  background: #e9e8e1;
}

.activeIcon {
  background: #e9e8e1;
}

.tableIconsGroup > span > span {
    position:relative;
    float:left;
}

.dataTableFooterActiveItem {
  position: absolute;
  top: -6px;
  left: 0;
}

.exportToFormatItems {
  background: #dcdacf;
  float: left;
  margin: 0 1px 0 0;
  padding: 4px 6px 3px 6px;
  color: #968d7f;
  border-radius: 2px;
}

.exportToFormatItems img {
  vertical-align: middle;
  margin: -4px -3px -2px 2px;
}

.tableIconsGroup {
  float: left;
  padding-right: 4px;
}

.tableIconsGroup .tableIcon span {
  margin-right: 5px;
  margin-left: 5px;
}

.tableIconsGroup img {
  vertical-align: bottom;
}

.tableIconsGroupActive {
  display: block;
  float: left;
  background: #dcdacf;
  border-radius: 2px;
}

.tableIconsGroupActive .tableIcon {
  background: none;
}

.tableIconsGroupActive .tableIcon:hover {
  background: #e9e8e1;
}

.exportToFormatIcons,
.dataTableFooterIconsShow {
  float: left;
}

.dataTableFooterIcons,
.dataTableFooterIcons a {
  text-decoration: none;
  color: @dataTable-link-color;
}

.dataTableSpacer {
  clear: both;
}

/* Actions table */
.dataTableActions table.dataTable tr td.labelodd {
  background-image: none;
}

/* levels higher than 4 have a default padding left */
.actionsDataTable tr td.label {
  padding-left: 7em;
}

tr.level0 td.label {
  padding-left: 1.5em;
}

tr.level1 td.label {
  padding-left: 2.5em;
}

tr.level2 td.label {
  padding-left: 3.5em;
}

tr.level3 td.label {
  padding-left: 4.5em;
}

tr.level4 td.label {
  padding-left: 5em;
}
tr.level5 td.label {
  padding-left: 5.5em;
}
tr.level6 td.label {
  padding-left: 6em;
}
tr.level7 td.label {
  padding-left: 6.5em;
}
tr.level8 td.label {
  padding-left: 7em;
}
tr.level9 td.label {
  padding-left: 7.5em;
}
tr.level10 td.label {
  padding-left: 8em;
}
tr.level11 td.label {
  padding-left: 8.5em;
}
tr.level12 td.label {
  padding-left: 9em;
}

/* less right margins for the link image in the Pa*/
.dataTableActions table.dataTable img.link {
  margin-right: 0.5em;
  margin-left: -0.5em;
  margin-top: -8px;
}

tr td.label img.plusMinus {
  margin-left: -1em;
  margin-right: 3px;
  margin-top: -5px;
}

.pk-emptyDataTable {
  padding-top: 20px;
  padding-bottom: 10px;
  text-align: center;
  font-style: italic;
}

.helpDate {
  color: #777777;
  font-size: 11px;
  font-style: italic;
  padding: 4px;
  text-align: right;
  display: block;
}

body .ui-tooltip.rowActionTooltip {
  font-size: 11px;
  padding: 3px 5px 3px 6px;
}

table.dataTable span.cell-tooltip {
  cursor: default;
}

.dataTable .jqplot-graph {
  padding-left: 6px;
  > div {
    position: relative;
  }
}

td.cellSubDataTable .loadingPiwik {
    padding:0;
}

.dataTable .searchReset {
  position:relative;

  img {
    position: absolute;
    top: 4px;
    left: -15px;
    cursor: pointer;
    display: inline;
  }
}
