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

.metadata {
  display: flex;
  padding: 1em 35px 2em;
  background: $chef-white;
  justify-content: space-between;

  chef-card {
    width: 50%;
  }

  table {
    font-size: 14px;

    tr {
      margin: 0;

      th,
      td {
        padding: 0.25em 0;
        border: none;
        background-color: transparent;
        text-align: left;
      }

      td {
        flex-grow: 3;
      }

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

.controls-table {
  padding: 2em 35px;

  chef-th,
  chef-td {

    &:first-child {
      word-break: break-all;

      chef-icon {
        margin-right: 1em;
      }

      strong {
        display: block;
      }
    }

    &:last-child {
      max-width: 150px;
      justify-content: flex-end;
    }

    chef-button {
      margin: -.5em 0 -.5em .5em;
      white-space: nowrap;
    }
  }

  .control-result {
    display: flex;
    margin-right: 1em;
    align-items: center;
    color: $chef-grey;

    .waived-icon:before {
      color: $chef-white;
    }

    &:last-child {
      margin-right: 0;
    }

    chef-icon, .waived-icon {
      margin-right: 5px;
    }
  }

  .impact-status {
    max-width: 15%;
  }

  .status-icon,
  .impact-status,
  .control-result {
    &.failed {
      color: $chef-critical;
    }

    &.passed {
      color: $chef-success;
    }

    &.skipped {
      color: $chef-dark-grey;
    }

    &.waived {
      color: $chef-darkest;

      .waived-icon:before {
        color: inherit;
      }
    }

    &.critical {
      color: $chef-critical;
    }

    &.major {
      color: $chef-major;
    }

    &.minor {
      color: $chef-minor;
    }
  }
}

.reporting-profile-side-panel {

  chef-button {
    margin: 0;
  }

  chef-icon.failed {
    color: $chef-critical;
  }

  chef-icon.passed {
    color: $chef-success;
  }

  chef-icon.skipped {
    color: $chef-dark-grey;
  }

  .critical {
    color: $chef-critical;
  }

  .major {
    color: $chef-major;
  }

  .minor {
    color: $chef-minor;
  }

  .side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em;
    background: $chef-white;
    border-bottom: 1px solid $chef-grey;

    .header-icon {
      font-size: 2em;
      color: $chef-dark-grey;
    }

    .header-text {
      margin: 0 1em;
      flex-grow: 1;
      word-break: break-all;

      p {
        margin: 0;
        color: $chef-dark-grey;
      }
    }
  }

  .side-panel-body {
    .side-panel-body-header {
      display: flex;
      padding: 1em;
      border-bottom: 1px solid $chef-grey;
      align-items: center;

      chef-button {
        margin: 0 1em 0 0;
      }

      p {
        margin: 0;
      }
    }
  }

  .results-profile-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .results-profile-list-item {
    border-bottom: 1px solid $chef-grey;
    background: $chef-white;
  }

  .list-item-summary {
    display: flex;
    align-items: center;
    padding: 1em;

    .list-item-text {
      margin: 0 1em;
      flex-grow: 1;

      chef-button,
      p {
        margin: 0;
      }

      p {
        line-height: 1.5;
      }
    }
  }

  .list-item-detail {
    border-top: 1px solid $chef-grey;
    border-left: 4px solid $chef-success;
    padding: 1em;

    &.failed {
      border-left-color: $chef-critical;
    }

    &.passed {
      border-left-color: $chef-success;
    }

    &.skipped {
      border-left-color: $chef-dark-grey;
    }

    chef-toggle {
      margin-bottom: 1em;
      font-size: 14px;
    }

    chef-snippet.source {
      border: 1px solid $chef-grey;
      border-radius: $global-radius;
      background: $chef-lightest-grey;

      ::ng-deep pre {
        background: transparent;
      }
    }
  }

  .result-item {
    margin-bottom: 1em;
    border: 1px solid $chef-grey;
    border-radius: $global-radius;

    &:last-child {
      margin-bottom: 0;
    }

    p {
      margin: 0;
    }

    .result-item-header {
      display: flex;
      padding: 1em;
      align-items: center;
      border-radius: $global-radius;

      chef-icon {
        margin-right: 1em;
      }
    }

    .result-item-body {
      background: $chef-lightest-grey;
      border-top: 1px solid $chef-grey;

      p {
        margin: 0;
        padding: 1em;
      }

      chef-snippet {
        background: $chef-lightest-grey;

        ::ng-deep pre {
          background: transparent;
        }
      }
    }
  }
}

