/* Public Category Tree Styles */
.category-tree-public {
  background: var(--pico-background-color);
  border: 1px solid var(--pico-border-color);
  border-radius: var(--pico-border-radius);
  overflow: hidden;
}

.tree-header-public {
  background: var(--pico-secondary-background);
  padding: 1rem;
  border-bottom: 1px solid var(--pico-border-color);
}

.tree-header-public h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--pico-color);
}

.tree-header-public i {
  margin-right: 0.5rem;
  color: var(--pico-muted-color);
}

.tree-content-public {
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
}

.tree-node-public {
  position: relative;
}

.tree-item-public {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--pico-border-color);
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.tree-item-public:hover {
  background: var(--pico-secondary-background);
}

.tree-item-public.active {
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
}

.tree-toggle-public {
  background: none;
  border: none;
  color: var(--pico-muted-color);
  cursor: pointer;
  padding: 0.25rem;
  margin-right: 0.5rem;
  border-radius: var(--pico-border-radius);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
}

.tree-toggle-public:hover {
  background: var(--pico-secondary-background);
  color: var(--pico-color);
}

.tree-icon-public {
  margin-right: 0.5rem;
  color: var(--pico-muted-color);
  display: flex;
  align-items: center;
}

.tree-icon-public.no-toggle {
  margin-left: 2rem;
}

.tree-label-public {
  flex: 1;
  font-weight: 500;
  color: var(--pico-color);
  text-decoration: none;
}

.tree-label-public:hover {
  color: var(--pico-color);
  text-decoration: none;
}

.tree-actions {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.tree-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.tree-item-public.active .tree-label-public {
  color: var(--pico-primary-inverse);
  text-decoration: none;
}

.tree-item-public.active .tree-label-public:hover {
  color: var(--pico-primary-inverse);
  text-decoration: none;
}

.tree-count-public {
  background: var(--pico-secondary-background);
  color: var(--pico-muted-color);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.tree-children-public {
  display: none;
}

.tree-children-public.expanded {
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tree-item-public {
    padding: 0.75rem;
  }

  .tree-label-public {
    font-size: 0.9rem;
  }
}