// Tweaks

.radio-inline {
  margin-right: 0.6rem;

  input {
    margin-right: 0.2rem;
  }
}

.flash.alert:empty {
  display: none;
}
// Fix Firefox and Chrome outlines on focused navs.
.dropdown-menu .dropdown-item:focus,
nav .nav-item .nav-link:focus {
  outline: none;
}

.hidden {
  display: none;
}

#main {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

#ace-credential-value {
  width: 100%;
  height: 10rem;
  position: relative;
}

#ace-agent-options {
  width: 100%;
  height: 10rem;
  position: relative;
}

#ace-payload-editor {
  width: 100%;
  height: 10rem;
  position: relative;
}

.ace-merge-options-editor {
  width: 100%;
  position: relative;
}

#agent_options {
  display: none;
}

.sample-payload {
  display: none;
}

.ace_editor {
  height: 10rem;
  @extend .rounded;
  font-family: $font-family-monospace !important;
  font-size: $font-size-sm !important;
}

.pagination li {
  @extend .page-item;

  a {
    @extend .page-link;
  }
}

// Errors
#error_explanation {
  @extend .alert;
  @extend .alert-danger;

  li {
    line-height: 1.2;
    margin-bottom: 5px;
  }
}

.field_with_errors .form-control {
  @extend .is-invalid;
}
// Hack to show feedback for fields with errors, uses sibling selector.

.field_with_errors ~ .invalid-feedback {
  display: block;
}
// Select2 fixes
.select2 {
  float: none !important;
  margin-left: 0 !important;
}

.select2-container .select2-choice,
.select2-container .select2-choices,
.select2-container .select2-choices .select2-search-field input {
  font-family: $font-family-base !important;
}

.select2-container-multi .select2-choices li.select2-search-choice {
  background: $primary !important;
  font-size: 14px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.select2-drop a {
  color: $blue !important;
}

.select2-highlighted a {
  color: $yellow !important;
}

.link-region .cannot-receive-messages,
.schedule-region .cannot-be-scheduled {
  display: none;
}
// Disabled
.agent-unavailable {
  opacity: 0.5;
}

#agent-spinner {
  display: none;
}

.not-applicable {
  // TODO
}

h1 .badge {
  text-shadow: none;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  border-radius: 2px;
  max-width: 11rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: none;
}

.alert,
.dropdown-menu {
  .badge.workflow {
    display: inline-flex;
  }
}

.select2-highlighted a {
  color: yellow;
  text-decoration: underline;
}

.icon-flipped {
  -ms-transform: translateZ(0);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -ms-transform: scaleX(-1);
  -webkit-transform: scaleX(-1);
  transform: scaleX(-1);
}
