/**
 * Reusable Tree Component Styles
 * 
 * Provides styling for hierarchical tree components with lazy loading support.
 */

/* Tree list styling */
.list-group.tree-component > .list-group-item {
  border: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.list-group.tree-component > .list-group-item:last-child {
  border-bottom: none;
}

/* Tree toggle button styling */
.tree-component .tree-toggle {
  display: inline-block;
  width: 1.5rem;
  text-align: center;
  transition: color 0.2s ease;
}

.tree-component .tree-toggle:hover {
  color: var(--bs-primary, #0d6efd) !important;
}

/* Children container styling */
.tree-component .ms-3.border-start {
  border-left: 2px solid rgba(15, 23, 42, 0.1) !important;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
}

/* Spinner visibility handling */
.tree-component .spinner-border.d-none.htmx-request {
  display: inline-block !important;
}

/* Disabled state */
.tree-component button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Tree container root */
.tree-container {
  width: 100%;
}

/* Optional: Thumbnail support for tree items */
.tree-component .tree-thumbnail {
  width: 48px;
  min-width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.tree-component .tree-thumbnail img,
.tree-component .tree-thumbnail .image-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}

