@import "styles/_variables";
@import "styles/mixins";

.wrapper {
  display: flex;

  @include md-down {
    flex-wrap: wrap;
  }

  @include sm-down {
    display: none;
  }
}

.info {
  margin-right: 19px;

  .summary {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(2, 190px);
    row-gap: 15px;
    column-gap: 19px;
    height: 100%;
    list-style: none;

    li:nth-child(1) {
      grid-row: 1;
      grid-column: 1;
    }

    li:nth-child(2) {
      grid-row: 1;
      grid-column: 2;
    }

    li:nth-child(3) {
      grid-row: 2;
      grid-column: 1;
    }

    li:nth-child(4) {
      grid-row: 2;
      grid-column: 2;
    }
  }

  @include md-down {
    flex: 1 1 100%;
    margin-right: 0;
    margin-bottom: 19px;

    .summary {
      grid-template-columns: repeat(2, 1fr);

      li {
        min-height: 100px;
      }
    }
  }

  .title {
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 500;
    line-height: 12px;
    color: var(--color-content);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .item {
    display: flex;
    flex-flow: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 18px 20px;
    background: var(--background-card);
    border-radius: 6px;
    box-shadow: 0 0 1px var(--shadow-4), 0 0.5px 2px var(--shadow-5);

    &-heading {
      height: 13px;
      font-size: 13px;
      line-height: 13px;
      color: var(--color-summary);
    }

    &-content {
      display: flex;
      flex: 1 1 auto;
      align-items: flex-end;
      font-size: 22px;
      font-weight: 500;
      line-height: 24px;
      color: var(--color-content);
      letter-spacing: 0.03em;

      sub {
        margin-left: 5px;
      }

      span + span {
        margin-left: 3px;
      }

      .status {
        text-transform: capitalize;

        &-running {
          color: var(--color-running-dark);
        }

        &-success {
          color: var(--color-success-dark);
        }

        &-failure,
        &-killed,
        &-error {
          color: var(--color-error-dark);
        }

        &-pending {
          color: var(--color-label);
        }
      }
    }
  }
}

.bar-wrapper {
  width: 100%;
  min-height: 210px;
  padding: 27px 43px 27px 27px;
  overflow: hidden;
  background: var(--background-card);
  border-radius: 6px;
  box-shadow: 0 0 1px var(--shadow-4), 0 0.5px 2px var(--shadow-5);

  @include md-down {
    flex: 1 1 100%;
  }
}
