.StatsMenu-container,
.StatsMenuContainer,
.StatsSelector-container,
.StatsSelectorContainer {
  display: inline-block;
}

/* Stats Menu Component */

$stats-menu-border-color: #eee;
$stats-menu-text-color: #333;
$stats-menu-link-color: #333;
$stats-menu-link-color-selected: #666;
$stats-menu-help-color: #9b9b9b;

.StatsMenu {
  border: 1px solid $stats-menu-border-color;
  color: $stats-menu-text-color;
  display: inline-block;
  font-size: 12px;
  margin: 0 16px 24px 0;
  padding: 16px;

  &-period {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  &-periodItem {
    display: inline-block;
    margin: 0 4px;
  }

  &-custom {
    border-left: 1px solid $stats-menu-border-color;
    display: inline-block;
    font-size: 10px;
    font-style: italic;
    margin-left: 4px;
    padding-left: 4px;
  }

  &-link,
  &-Link {
    color: $stats-menu-link-color;
    cursor: pointer;
    text-decoration: underline;
  }

  &-periodLink,
  &-customLink {
    &.is-selected {
      font-weight: bold;
      text-decoration: none;
    }
  }

  &-customInput {
    display: none;
  }
}

.Stats-message--notice {
  color: $stats-menu-help-color;
  font-size: 10px;
  font-style: italic;
  margin: 0;
  &.is-hidden {
    display: none;
  }
}

/* Stats Logs Component */
.StatsLogs,
.StatsLogs-loading {
  &.is-hidden {
    display: none;
  }
}

/* StatsLogs Pagination */
.StatsLogs-pagination-item {
  display: inline-block;
  padding: 0 2px;
}

.StatsLogs-pagination-link {
  cursor: pointer;
}

/* StatsMessages Components */
.StatsMessages-list {
  margin-bottom: 16px;
  padding-left: 32px;
}

.StatsMessages-title {
  margin-bottom: 16px;
}

/* StatsCVSLink */
.StatsCSVLink {
  display: inline-block;
  float: right;
}

/* Stats Chart Component */
$stats-chart-border-color: #dfdfdf;
$stats-chart-tooltip-shadow: rgba(68, 68, 68, .1);
$stats-chart-tooltip-bg-color: #fff;
$stats-chart-tooltip-color: #444;

.StatsChart-container {
  &.is-loading {
    opacity: .5;

    &::before {
      background-image: image-url('spinner.svg');
      background-position: center;
      background-repeat: no-repeat;
      bottom: 50%;
      content: '';
      height: 42px;
      left: 50%;
      position: absolute;
      width: 42px;
    }
  }

  .c3 svg {
    font: 10px 'Lucida Grande', verdana, sans-serif;
  }

  .c3-line {
    stroke-width: 2px;
  }

  .c3-grid line.c3-ygrid,
  .c3-axis-y .tick line {
    stroke: $stats-chart-border-color;
  }

  .c3-ygrid {
    stroke-dasharray: 0;
  }

  .c3-axis-y .domain {
    display: none;
  }

  .c3-tooltip-container {
    border: 1px solid $stats-chart-border-color;
    border-radius: 6px;
    -moz-box-shadow: 0 0 6px $stats-chart-tooltip-shadow;
    -webkit-box-shadow: 0 0 6px $stats-chart-tooltip-shadow;
    box-shadow: 0 0 6px $stats-chart-tooltip-shadow;
    opacity: .98;
  }

  .c3-tooltip {
    border: 0;
    border-radius: 6px;
    -moz-box-shadow: 0 0 0 transparent;
    -webkit-box-shadow: 0 0 0 transparent;
    box-shadow: 0 0 0 transparent;
    opacity: 1;
  }

  .c3-tooltip th {
    background-color: $stats-chart-tooltip-bg-color;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    color: $stats-chart-tooltip-color;
    padding: 2px 10px;
  }

  .c3-tooltip tr {
    border: 0;
    border-bottom: 1px solid $stats-chart-border-color;

    &:last-child {
      border-bottom: 0;

      td {

        &:first-child {
          border-bottom-left-radius: 6px;
        }

        &:last-child {
          border-bottom-right-radius: 6px;
        }
      }
    }
  }

  .c3-tooltip td {
    border-left: none;
    padding: 0 10px;
  }
}

.StatsChart,
.StatsChart-noDataMessageContainer {
  &.is-hidden {
    display: none;
  }
}

// StatsMethodsTable

.StatsMethodsTable-name.is-children {
  background-image: image-url('child_metric_background.png');
  background-position: left center;
  background-repeat: no-repeat;
  padding-left: 24px;
}

.StatsMethodsTable {
  line-height: 2.6;
  margin-bottom: 24px;
  margin-top: 12px;
  width: 100%;

  td,
  th {
    border-bottom: 1px solid $stats-menu-border-color;
  }
}
