/* ==========================================================================
   Follow-up Actions card (shared/_tag_manager, _tag_badge; tags_controller.js)
   on the opportunity, Purchase Order and project show pages. Bootstrap
   variables only, so dark_theme.css needs no rules here.
   ========================================================================== */

.cp-tag-badge {
  padding: 0.3rem 0.375rem 0.3rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.cp-tag-badge i {
  font-size: 0.7rem;
}

.cp-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  margin-left: 0.125rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: 0.75;
}

.cp-tag-remove:hover,
.cp-tag-remove:focus-visible {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.18);
}

.cp-tag-remove:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

/* The add box: a text input with a listbox under it. */
.cp-tag-combobox {
  position: relative;
}

/* A global rule floats .input-group right, which would collapse this box. */
.cp-tag-combobox > .input-group {
  float: none;
}

/* No Popper here, so place the menu under the input ourselves (doubled class:
   a theme .dropdown-menu rule sets top). */
.cp-tag-combobox > .dropdown-menu.cp-tag-options {
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 16rem;
  overflow-y: auto;
  margin-top: 0.25rem;
}

.cp-tag-options .dropdown-item.active,
.cp-tag-options .dropdown-item:active {
  color: var(--bs-dropdown-link-active-color);
  background-color: var(--bs-dropdown-link-active-bg);
}

.cp-tag-options .cp-tag-create:not(.active) {
  color: var(--bs-primary-text-emphasis);
}
