@import '~scss/variables';

$toolbarHeight: 48px;
$chartHeight: 160px;
$chartContainerPadding: 8px;

.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
}

.searchBar {
  border: solid 2px $light-color04;
  margin-left: 12px;
  margin-right: 12px;
  margin-bottom: -23px;
  background: $white;
  display: flex;
  position: relative;
  border-radius: 4px;
  z-index: 3;
  @at-root {
    .searchInput {
      position: relative;
      flex: 1;
      border: none;
      border-right: solid 2px $light-color04;
      border-left: solid 2px $light-color04;
      border-radius: 0;
    }
    .select {
      width: 120px;
      line-height: 40px;
      :global {
        .select-control {
          height: 40px;
          border: none;
          box-shadow: none !important;
        }

        .select-options {
          width: auto !important;
          min-width: 130px;
        }
      }
    }
  }
}

.searchResult {
  position: relative;
  border-radius: $border-radius;
  border: solid 1px $light-color04;
  background-color: $lightest;
  padding: 25px 12px 14px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.toolbar {
  height: $toolbarHeight;
  line-height: $toolbarHeight;
  border-radius: 4px;
  background-color: $dark-color07;
  margin: $size-medium 0;
  color: $white;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  .frequencyOpts {
    margin-left: 4px;

    & > span {
      display: inline-block;
      vertical-align: middle;
    }
  }
  .frequencyOptions {
    display: inline-block;
    vertical-align: middle;
    width: 100px;
    :global {
      .select-options {
        line-height: 30px;
        font-size: 10px;
      }
      .select-value {
        color: #fff !important;
      }
      .select-control {
        border: none;
        background: transparent;
        box-shadow: none;
        height: 40px;
        &:hover {
          background: transparent;
        }
      }
    }
  }
}

.chartContainer {
  margin-bottom: 12px;
  border-radius: 4px;
  box-shadow: $base-shadow;
  background-color: $white;
  display: flex;
  align-items: center;
  padding: 0 32px;
  @at-root {
    @at-root {
      .recentSummary {
        width: 140px;
        margin-right: 10px;
        h2 {
          font-weight: bold;
          font-size: 32px;
        }
        p {
          font-size: 12px;
          font-weight: 600;
          line-height: 1.67;
        }
      }
      .chart {
        flex: 1;
        height: $chartHeight;
      }
    }
  }
}

.mask {
  width: 100%;
  height: calc(100% + 100px);
  transform: translateY(-90px);
  background-color: transparent;
  z-index: 1;
  position: absolute;
  left: 0;
  top: 0;
}

.detail {
  background-color: $white;
  width: 492px;
  height: calc(100% - 64px - #{$toolbarHeight} - #{$chartContainerPadding});
  border: 1px solid #d5dee7;
  border-radius: 4px;
  box-shadow: 0 4px 8px 0 rgba(72, 91, 127, 0.2);
  position: absolute;
  right: 10px;
  bottom: 15px;
  z-index: 2;
}

.visibleHeight {
  height: calc(
    100% - 64px - #{$toolbarHeight} - #{$size-medium} - #{$chartContainerPadding} -
      #{$chartHeight}
  );
}

.table {
  border-radius: 4px;
  background-color: $white;
  flex: 1;
  overflow: hidden;
  @at-root {
    .logItem {
      flex: 3.8;
      white-space: pre-line;
    }
  }

  .timecol {
    width: 150px;
    margin: auto;
    flex: unset;
  }

  .typecol {
    width: 120px;
    margin: auto;
    flex: unset;
  }

  .namecol {
    width: 120px;
    margin: auto;
    flex: unset;
  }

  .kindcol {
    width: 220px;
    margin: auto;
    flex: unset;
    line-height: 20px;
  }

  .reasoncol {
    width: 120px;
    margin: auto;
    flex: unset;
  }

  .messagecol {
    width: calc(100% - 730px);
    margin: auto;
    flex: unset;
    line-height: 1.5;
  }

  .body {
    overflow: unset;
  }

  .hightLightMatch {
    background: $yellow-color02;
  }
}

.showHistogramBtn {
  cursor: pointer;
}

.exportBtn,
.pollingBtn {
  line-height: 32px;
  width: 32px;
  display: inline-block;
  cursor: pointer;
  text-align: center;
  &:hover {
    border-radius: 2px;
    background-color: $dark-color06;
  }
}

.category {
  width: 54px;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  height: 20px;
  text-align: center;
  border-radius: 1px;
}

.normal {
  color: $dark-color06;
  background-color: $light-color02;
}

.warning {
  color: $white;
  background-color: $yellow-color03;
}

.kind {
  display: inline-block;
  padding: 0 3px;
  text-align: center;
  background-color: $light-color04;
  border-radius: 1px;
}

.name {
  display: inline-block;
  margin-left: 5px;
}
