/* Taxonomy Tree Styles */
/* Hierarchical display of metadata schema fields */

.taxonomy-tree {
  font-family: var(--bs-font-monospace);
  font-size: 0.9rem;
}

.taxonomy-tree .tree-node {
  margin-bottom: 1rem;
}

.taxonomy-tree .tree-node.expanded > .tree-node-header {
  font-weight: bold;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.taxonomy-tree .tree-node.tree-node-parent {
  margin-bottom: 0.75rem;
}

/* Parent Node Header (expandable/collapsible) */
.taxonomy-tree .tree-node-header {
  padding: 1rem 1.25rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #e9ecef;
  background-color: #f8f9fa;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.taxonomy-tree .tree-node-header:hover {
  background-color: #e9ecef;
  border-color: #dee2e6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.taxonomy-tree .tree-node-header .tree-toggle {
  display: inline-flex;
  align-items: center;
  width: 1.5rem;
  flex-shrink: 0;
}

.taxonomy-tree .tree-node-header .tree-toggle i {
  transition: transform 0.2s ease;
  font-size: 1rem;
}

.taxonomy-tree .tree-node-header .tree-node-name {
  flex-grow: 1;
}

/* Leaf Node (actual fields) */
.taxonomy-tree .tree-node-leaf {
  border: 2px solid #dee2e6;
  border-left: 5px solid #0d6efd;
  margin-left: 0.75rem;
  margin-bottom: 0.75rem;
  margin-right: 0.5rem;
  border-radius: 0.5rem;
  background-color: #ffffff;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.taxonomy-tree .tree-node-leaf:hover {
  border-left-color: #0a58ca;
  border-color: #adb5bd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.taxonomy-tree .tree-node-leaf .tree-node-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.95rem;
}

/* Leaf Node Header (clickable) */
.taxonomy-tree .tree-node-leaf-header {
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0.5rem 0.5rem 0 0;
}

.taxonomy-tree .tree-node-leaf-header:hover {
  background-color: #f8f9fa;
}

.taxonomy-tree .tree-node-leaf-header .tree-toggle {
  display: inline-flex;
  align-items: center;
  width: 1.25rem;
  flex-shrink: 0;
}

.taxonomy-tree .tree-node-leaf-header .tree-toggle i {
  transition: transform 0.2s ease;
  font-size: 0.9rem;
  color: #6c757d;
}

/* Leaf Node Details (collapsible content) */
.taxonomy-tree .tree-node-leaf-details {
  padding: 0 1.25rem 1.25rem 1.25rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Children Container */
.taxonomy-tree .tree-node-children {
  margin-left: 1.5rem;
  padding-left: 1rem;
  padding-top: 0;
  border-left: 2px solid #dee2e6;
}

/* Field Description */
.taxonomy-tree .field-description {
  margin-top: 0.75rem;
  line-height: 1.6;
}

.taxonomy-tree .field-description strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Enum Values Display */
.taxonomy-tree .enum-values {
  margin-top: 0.75rem;
}

.taxonomy-tree .enum-values strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.taxonomy-tree .enum-values .enum-value-badge {
  display: inline-block;
  background-color: #f8f9fa;
  padding: 0.25rem 0.5rem;
  margin: 0.25rem 0.25rem 0.25rem 0;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  border: 1px solid #dee2e6;
}

/* Field Constraints */
.taxonomy-tree .field-constraints {
  margin-top: 0.75rem;
}

.taxonomy-tree .field-constraints strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.taxonomy-tree .field-constraints ul {
  margin-left: 1rem;
  padding-left: 0;
  margin-bottom: 0;
}

.taxonomy-tree .field-constraints code {
  background-color: #f8f9fa;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}

/* Field Items (for arrays) */
.taxonomy-tree .field-items {
  margin-top: 0.75rem;
}

.taxonomy-tree .field-items strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.taxonomy-tree .field-items code {
  background-color: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* Badge Styles */
.taxonomy-tree .badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

/* Monospace elements */
.taxonomy-tree .font-monospace {
  font-family: var(--bs-font-monospace);
}
