@charset "UTF-8";
/* Custom styles goes here */
.selected {
  box-shadow: 0 0 5px rgba(200, 0, 122, 0.9);
}

.bootstrap-select .dropdown-menu {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  z-index: 2000 !important;
}

.bootstrap-select .dropdown-menu li a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Knowledge Source Type Select CSS*/
.card-radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-radio input[type=radio] {
  display: none;
}

.card-radio label {
  cursor: pointer;
  border: 2px solid transparent;
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
  width: 160px;
  transition: all 0.3s;
}

.card-radio input[type=radio]:checked + label {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.card-radio label .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #6c757d;
}

.card-radio input[type=radio]:checked + label .icon {
  color: var(--bs-primary);
}

/* Git and GitHub both read repositories, so those two cards say which hosts each is for
   (#1034). The cards in a row stretch to the tallest so a hint does not leave one taller. */
.card-radio {
  display: flex;
}

.card-radio label {
  height: 100%;
}

.card-radio label .hint {
  font-size: 0.75rem;
  line-height: 1.2;
  margin-top: 0.25rem;
}

/* Keep feedback tooltip above navbar overlays/dropdowns */
.tooltip.feedback-tooltip {
  z-index: 4000 !important;
}

/* First column soaks up whatever width the other columns leave, so a cell carrying
   .text-truncate ellipsises at the real boundary rather than a guessed pixel width.
   max-width: 0 is what makes that possible — without it the cell grows to fit its
   content and never overflows. Give the remaining columns .text-nowrap so they keep
   sizing to their content. */
.table-truncate-first-col th:first-child,
.table-truncate-first-col td:first-child {
  width: 100%;
  max-width: 0;
}

/* Bounds a table inside a widget card: past the height of the charts it sits beside
   (350px), the table scrolls instead of stretching the card and the row it shares.
   The header stays pinned while rows scroll; it needs its own opaque background or
   the rows would show through it. */
.table-scroll {
  max-height: 350px;
  overflow-y: auto;
}
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-card-bg, #fff);
}

/* Signal Sources hover: the signal's conditions as an AND/OR tree (#686). Bootstrap's
   tooltip is narrow and centred, which shreds glob patterns — widen it and left-align.
   Colours stay relative to the tooltip's own dark background so this holds in both themes. */
.tooltip.signal-logic-tooltip {
  --bs-tooltip-max-width: 22rem;
}
.tooltip.signal-logic-tooltip .tooltip-inner {
  text-align: left;
}

.signal-logic-name {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

/* The bar is what makes a group read as one unit, so the AND'd conditions inside it are
   visually distinct from the OR'd groups sitting outside. */
.signal-logic-group {
  border-left: 2px solid rgba(255, 255, 255, 0.35);
  padding-left: 0.5rem;
}

/* Long glob patterns have no spaces to break at, so allow a mid-token break rather than
   let the tooltip overflow its max-width. */
.signal-logic-condition {
  overflow-wrap: anywhere;
}

.signal-logic-operator {
  font-style: italic;
  opacity: 0.75;
}

.signal-logic-value {
  color: inherit;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 0 0.2rem;
  border-radius: 0.15rem;
}

.signal-logic-join {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin: 0.15rem 0;
}

.signal-logic-empty {
  font-style: italic;
  opacity: 0.75;
}
