
// Index

#agents-table {

  @include media-breakpoint-up(lg) {
    tbody td:first-child {
      min-width: 200px;
    }
  }

  td {
    vertical-align: top;
  }

  td:first-child { // Name
    padding-top: 8px;
    padding-bottom: 2px;
  }

  td:nth-child(6) { // Messages
    text-align: right;
  }

  td:nth-child(7) { // Issues
    text-align: center;
  }

  td:nth-child(8) { // Actions dropdown
    padding-top: 4px;
  }

  .agent-name {
    display: block;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.1;
    margin: 2px 0 5px;
  }

  .agent-type {
    font-size: 12px;
    display: block;
    margin-bottom: 9px;
  }

  .agent-workflows {
    a.badge {
      font-size: 12px;
      font-weight: 400;
      margin: 0 0 3px 0;
      max-width: 11rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;

      @include media-breakpoint-up(xl) {
        max-width: 15rem;
      }

      &:hover {
        filter: brightness(115%) saturate(125%);
        pointer: default;
      }
    }
  }
}

#resultTabs {
  li {
    margin-right: 20px;
    margin-bottom: 10px;

    a {
      color: #6d6d6d;

      &.active {
        color: #ffffff;
      }

      &:hover {
        color: #8d8d8d;
      }
    }
  }
}

// New – Edit

.agent-selection-filters {
  width: 100%;

  .btn-group.filter-options.hidden {
    visibility: hidden;
  }
}

.filters-search {
  border-radius: 2px;

  .js-shuffle-search {
    border: none;
    padding: 4px 10px;
    border-radius: 2px;
    min-width: 270px;
  }
}

.agent_selection {

  .card-wrapper {
    max-width: 100%;
    min-width: 100%; // If not specified container might be smaller if description is too short.

    @include media-breakpoint-up(sm) {
      max-width: 50%;
      min-width: 50%;
    }

    @include media-breakpoint-up(lg) {
      max-width: 25%;
      min-width: 25%;
    }
  }

  .card {
    width: 100%;
    justify-content: space-between;

    .card-header {
      font-size: 18px;
      font-weight: 200;
      padding: 1rem;
    }

    .card-body {
      padding: 1rem;

      p {
        font-size: 14px;
        line-height: 1.36;
      }

      .btn {
        background: darken($primary, 4%);

        &:hover {
          background: darken($primary, 16%);
        }
      }
    }
  }

}

#agent-form {
  .description {
    padding-top: 1.6rem;
    padding-left: 20px;

    h1 {
      margin-top: 40px;
    }

    p:first-of-type {
      color: white;
    }

    a {
      text-decoration: underline;

      &:hover {
        text-decoration: none;
      }
    }
  }

  .cannot-be-scheduled,
  .cannot-create-messages {
    display: block;
    position: relative;
    margin-top: -7px;
    font-style: italic;
    font-size: 14px;
  }

  .agent-options {
    margin-top: 50px;
  }

}

a.issues,
a.badge.issues,
li.issues {
  color: $warning;
}

// Show

.agent-show {

  .nav-item {
    font-size: 14px;
  }

  .nav-item.disabled {
    display: none;

    opacity: 0.3;

    a:not([href]):hover {
      color: #ffffff;
    }

    .nav-link {
      background-image: linear-gradient(#484e55, $primary 60%, #313539);
      cursor: default;

      &:hover {
        background-image: linear-gradient(#484e55, $primary 60%, #313539);
      }
    }
  }

  .tab-content {
    h2 {
      margin-bottom: 1.5rem;

      span {
        display: inline-block;
        margin-left: 20px;
      }
    }

    .details {
      padding-top: 2px;

      p {
        margin-bottom: 0.45rem;
      }

      b {
        font-weight: 400;
        color: $gray-700;
        color: #62686d;
      }
    }
  }
}

.message-payload {
  @extend .text-monospace;
  padding: 10px;
  border-radius: 2px;
  background: #fff;
  color: #000;

  &.truncated {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    word-wrap: normal;
    width: 10rem;
    @include media-breakpoint-up(md) {
      width: 15rem;
    }
    @include media-breakpoint-up(lg) {
      width: 29rem;
    }
    @include media-breakpoint-up(xl) {
      max-width: 619px;
    }

    &:hover {
      cursor: pointer;
      background: $gray-300;
    }
  }
}

body.agents .modal pre {
  white-space:normal;
}

// Nav

.agents-top-nav {

  a.current-workflow {
    background: #75787D;
  }

  .badge {
    display: inline-flex;
    padding: 4px;
  }
}

.container.agent-show {
  .agents-top-nav .btn.show-agent {
    display: none;
  }
}

// Imports

.agent-import-list {
  background-color: #494f56;
  padding: 20px;
  padding-bottom: 1px;
  margin-bottom: 30px;

  h3 {
    font-size: 1rem;
  }

}
