/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Prevent empty <dd> cells from reducing in height and making the vert separation look wrong */
dl.row > dd {
  min-height: 1lh;
}

/* Pill badges */
.doc-count,
.place-person-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 1rem;
}

.doc-count {
  color: #92400e;
  background-color: #fef3c7;
}

.place-person-count {
  color: #285e61;
  background-color: #e0f2f1;
}

.source-explorer-pane {
  min-height: 70vh;
  max-height: 75vh;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  background-color: var(--bs-body-bg);
}

.source-file-tree {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.tree-children {
  margin-left: 0.75rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--bs-border-color);
}

/* Children stay hidden until their parent row has been expanded */
.tree-node:not(.is-expanded) > .tree-children {
  display: none;
}

.tree-item {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0.2rem 0.4rem;
  font: inherit;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0.25rem;
  cursor: pointer;
}

.tree-item:hover {
  background-color: #f1f5f9;
}

.tree-item.is-selected {
  font-weight: 600;
  color: #1e3a8a;
  background-color: #dbeafe;
}

.tree-caret {
  flex: 0 0 0.75rem;
  font-size: 0.7rem;
  color: #64748b;
  transition: transform 0.15s ease-in-out;
}

.tree-node.is-expanded > .tree-item > .tree-caret {
  transform: rotate(90deg);
}

.tree-icon {
  flex: 0 0 auto;
  color: #d97706;
}

.tree-leaf .tree-icon {
  color: #64748b;
}

.tree-icon-open,
.tree-node.is-expanded > .tree-item > .tree-icon-closed {
  display: none;
}

.tree-node.is-expanded > .tree-item > .tree-icon-open {
  display: inline-block;
}

.tree-label {
  overflow-wrap: anywhere;
}

.tree-empty {
  padding: 0.2rem 0.4rem;
  font-size: 0.875rem;
  font-style: italic;
}

/* less wrap on tooltip */
.tooltip-nowrap {
  --bs-tooltip-max-width: none;
}
.tooltip-inner {
  white-space: nowrap;
}

/* Edit form */
.source-file-input {
  height: 28px;
  border: 1px solid #aaa;
  border-radius: 4px;
}
