@import "../../styles/variables";

.metadata-container {
  background: $chef-white;
  padding: 1em 35px;
}

.metadata {
  border: 1px solid $chef-dark-grey;
  border-radius: $global-radius;

  .metadata-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: $chef-dark-grey;
    color: $chef-white;
    cursor: pointer;
    font-size: 14px;

    .metadata-title {
      display: flex;
      align-items: center;

      chef-icon {
        margin-right: 10px;
        color: $chef-white;
      }
    }

    chef-button {
      margin: -5px 1em;
      border: 1px solid $chef-white;
    }
  }

  .metadata-body[opened] {
    display: flex;
    padding: 1em;
    flex-flow: wrap;
  }

  .metadata-group {
    flex-basis: 33.33%;
    flex-flow: column nowrap;

    .metadata-group-heading {
      margin: 1em 0;
      text-transform: uppercase;
      font-size: 15px;
    }

    th {
      text-align: left;
    }

    th, td {
      font-size: 14px;
      padding: 2px 10px 2px 0;
    }

    td {
      overflow-wrap: break-word;
      word-break: break-all;
    }
  }

  &.failure {
    border-color: $chef-critical;

    .metadata-header {
      background: $chef-critical;
    }
  }

  &.success {
    border-color: $chef-success;

    .metadata-header {
      background: $chef-success;
    }
  }

  @media (max-width: 960px) {
    .metadata-group {
      flex-basis: 100%;
    }

    .metadata-toggle {
      display: none;
    }
  }

  @media (min-width: 960px) {
    .metadata-group {
      flex-basis: 50%;
    }
  }

  @media (min-width: 1260px) {
    .metadata-group {
      flex-basis: 33.33%;
    }
  }
}

chef-radial-chart {
  width: 175px;
  height: 175px;

  ::ng-deep .success {
    color: $chef-success;
  }

  ::ng-deep .failure {
    color: $chef-critical;
  }

  ::ng-deep .other {
    color: $chef-grey;
  }

  ::ng-deep .innerText {
    font-size: 13px;
    font-weight: bold;
    color: $chef-primary-dark;
  }

  ::ng-deep .chart-label-number {
    display: block;
    font-size: 16px;
    color: $chef-primary-dark;
  }
}
