@media (max-width: $screen-md-max) {
  .deployments-container {
    width: 100%;
    overflow: auto;
  }
}

.environments-folder-name {
  font-weight: $gl-font-weight-normal;
  padding-top: 20px;
}

.environments-container {
  .ci-table {
    @include new-style-dropdown;

    .deployment-column {
      > span {
        word-break: break-all;
      }

      .avatar {
        float: none;
      }
    }

    .btn-group {

      > a {
        color: $gl-text-color-secondary;
      }

      svg path {
        fill: $gl-text-color-secondary;
      }

      .dropdown {
        outline: none;
      }
    }

    .btn .text-center {
      display: inline;
    }

    .commit-title {
      margin: 0;
    }

    .icon-play {
      height: 13px;
      width: 12px;
    }

    .external-url,
    .dropdown-new {
      color: $gl-text-color-secondary;
    }

    .dropdown-menu {
      .fa {
        margin-right: 6px;
        color: $gl-text-color-secondary;
      }
    }

    .build-link,
    .ref-name {
      color: $gl-text-color;
    }

    .stop-env-link,
    .external-url {
      color: $gl-text-color-secondary;

      .stop-env-icon {
        font-size: 14px;
      }
    }

    .deployment .build-column {
      .build-link {
        color: $gl-text-color;
      }

      .avatar {
        float: none;
        margin-right: 0;
      }
    }

    .folder-icon {
      margin-right: 3px;
      color: $gl-text-color-secondary;
      display: inline-block;

      .fa:nth-child(1) {
        margin-right: 3px;
      }
    }

    .folder-name {
      cursor: pointer;
      color: $gl-text-color-secondary;
      display: inline-block;
    }

    .icon-container {
      width: 20px;
      text-align: center;
    }

    .branch-commit {
      .commit-sha {
        margin-right: 0;
      }
    }

    .no-btn {
      border: none;
      background: none;
      outline: none;
      width: 100%;
      text-align: left;
    }
  }
}

/**
 * Deploy boards
 */

.deploy-board > div {
  display: flex;
  justify-content: space-between;

  .deploy-board-information {
    order: 1;
    display: flex;
    width: 70px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0 20px 5px;

    > span {
      text-align: center;
    }

    .percentage {
      color: $gl-text-color;
    }

    .text {
      color: $gl-text-color-secondary;
    }
  }

  .deploy-board-instances {
    order: 2;
    margin-left: 20px;
    width: 100%;

    .text {
      color: $gl-text-color-secondary;
      font-size: 12px;
    }

    .deploy-board-instances-container {
      display: flex;
      flex-wrap: wrap;
      flex-direction: row;
      margin-top: -8px;
    }
  }

  .deploy-board-actions {
    order: 3;
    align-self: center;
    min-width: 150px;
    margin-left: 10px;
  }

  &.deploy-board-error-message {
    justify-content: center;
  }

  .deploy-board-empty-state-svg {
    order: 1;
    width: 90px;
    margin: auto 0 auto 20px;
  }

  .deploy-board-empty-state-text {
    order: 2;
    flex-wrap: wrap;
    margin: auto auto 15px 0;

    .title {
      order: 1;
      display: flex;
      font-size: 17px;
      line-height: 40px;
    }
  }
}

.deploy-board-instance {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  border-width: 1px;
  border-style: solid;
  margin: 1px;
  display: flex;
  justify-content: center;
  align-items: center;

  &-finished {
    background-color: $green-100;
    border-color: $green-400;
  }

  &-deploying {
    background-color: $green-50;
    border-color: $green-400;
  }

  &-failed {
    background-color: $red-200;
    border-color: $red-500;
  }

  &-ready {
    background-color: lighten($border-color, 1%);
    border-color: $border-color;
  }

  &-preparing {
    background-color: lighten($border-color, 5%);
    border-color: $border-color;
  }

  &-waiting {
    background-color: $white-light;
    border-color: $border-color;
  }

  &.deploy-board-instance-canary {
    &::after {
      width: 7px;
      height: 7px;
      border: 1px solid $white-light;
      background-color: $orange-300;
      border-radius: 50%;
      content: "";
    }
  }
}

.deploy-board-icon {
  display: none;

  @media (min-width: $screen-md-min) {
    float: left;
    display: block;
  }

  i {
    cursor: pointer;
    color: $layout-link-gray;
    padding-right: 10px;
  }
}

.deploy-board {
  padding: 10px;
  background-color: $gray-light;
  min-height: 20px;

  .fa-spinner {
    margin: 0 auto;
    width: 20px;
    display: block;
    font-size: 20px;
  }
}

.gl-responsive-table-row {
  .branch-commit {
    max-width: 100%;
  }
}

.folder-row {
  padding: 15px 0;
  border-bottom: 1px solid $white-normal;

  @media (max-width: $screen-sm-max) {
    border-top: 1px solid $white-normal;
    margin-top: 10px;
  }
}

.x-axis path,
.y-axis path,
.label-x-axis-line,
.label-y-axis-line {
  fill: none;
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.x-axis path,
.y-axis path {
  stroke: $stat-graph-axis-fill;
}

.label-x-axis-line,
.label-y-axis-line {
  stroke: $border-color;
}

.y-axis {
  line {
    stroke: $stat-graph-axis-fill;
    stroke-width: 1;
  }
}

.metric-area {
  opacity: 0.25;
}

.prometheus-graph-overlay {
  fill: none;
  opacity: 0.0;
  pointer-events: all;
}

.rect-text-metric {
  fill: $white-light;
  stroke-width: 1;
  stroke: $gray-darkest;
}

.rect-axis-text {
  fill: $white-light;
}

.text-metric {
  font-size: 12px;
}

.selected-metric-line {
  stroke: $gl-gray-dark;
  stroke-width: 1;
}

.deployment-line {
  stroke: $black;
  stroke-width: 1;
}

.deploy-info-text {
  dominant-baseline: text-before-edge;
}

.prometheus-state {
  margin-top: 10px;

  .state-button-section {
    margin-top: 10px;
  }
}

.environments-actions {
  .external-url,
  .monitoring-url,
  .terminal-button,
  .stop-env-link {
    width: 38px;
  }
}

.prometheus-panel {
  margin-top: 20px;
}

.prometheus-graph-group {
  display: flex;
  flex-wrap: wrap;
  padding: $gl-padding / 2;
}

.prometheus-graph {
  flex: 1 0 auto;
  min-width: 450px;
  padding: $gl-padding / 2;

  h5 {
    font-size: 16px;
  }

  @media (max-width: $screen-sm-max) {
    min-width: 100%;
  }
}

.prometheus-svg-container {
  position: relative;
  height: 0;
  width: 100%;
  padding: 0;
  padding-bottom: 100%;
}

.prometheus-svg-container > svg {
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;

  text {
    fill: $gl-text-color;
    stroke-width: 0;
  }

  .text-metric-bold {
    font-weight: $gl-font-weight-bold;
  }

  .label-axis-text {
    fill: $black;
    font-weight: $gl-font-weight-normal;
    font-size: 10px;
  }

  .text-metric-usage,
  .legend-metric-title {
    fill: $black;
    font-weight: $gl-font-weight-normal;
    font-size: 12px;
  }

  .legend-axis-text {
    fill: $black;
  }

  .tick > text {
    font-size: 12px;
  }

  .text-metric-title {
    font-size: 12px;
  }

  .y-label-text,
  .x-label-text {
    fill: $gray-darkest;
  }

  .axis-tick {
    stroke: $gray-darker;
  }

  @media (max-width: $screen-sm-max) {
    .label-axis-text,
    .text-metric-usage,
    .legend-axis-text {
      font-size: 8px;
    }

    .tick > text {
      font-size: 8px;
    }
  }
}
