/* ==========================================================================
   Destination folder tree picker (.fh-tree-picker) for move/copy modals.
   Owning feature: browse / sharing
   Load order is defined in Views/Shared/_CssIncludes.cshtml — do not reorder.
   ========================================================================== */

/* --- Modern Destination Folder Tree Picker (.fh-tree-picker) -------------- */
.fh-tree-picker {
  border: 1px solid var(--fh-border, #e2e8f0);
  border-radius: 0.5rem;
  background-color: #fff;
  padding: 0.5rem;
  min-height: 180px;
  user-select: none;
}
/* Move/Copy modal variant — bounded height with its own scroll region so the
   modal body doesn't grow past the viewport on a deep tree. */
.fh-tree-picker-scroll {
  max-height: 50vh;
  overflow-y: auto;
}

.fh-tree-picker::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.fh-tree-picker::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}
.fh-tree-picker::-webkit-scrollbar-thumb:hover {
  background-color: var(--fh-muted);
}
.fh-tree-picker::-webkit-scrollbar-track {
  background: transparent;
}

.picker-tree-item {
  list-style: none;
  margin-bottom: 2px;
}

.picker-tree-row {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: var(--fh-radius-sm, 0.375rem);
  cursor: pointer;
  color: var(--fh-text, #1e293b);
  font-size: var(--fh-text-md);
  transition: background-color var(--fh-transition-fast, 0.15s ease),
              color var(--fh-transition-fast, 0.15s ease),
              border-color var(--fh-transition-fast, 0.15s ease);
  border: 1px solid transparent;
  outline: none;
}

.picker-tree-row:hover {
  background-color: var(--fh-primary-soft, #eff6ff);
  color: var(--fh-primary);
}

.picker-tree-row:focus-visible {
  border-color: var(--fh-primary, #2563eb);
  box-shadow: var(--fh-focus-ring, 0 0 0 2px rgba(37, 99, 235, 0.25));
  background-color: var(--fh-soft, #f8fafc);
}

.picker-tree-row.is-selected {
  background-color: var(--fh-primary-soft, #eff6ff);
  border-color: var(--fh-primary-soft-border, #bfdbfe);
  color: var(--fh-primary-dark, #1d4ed8);
  font-weight: var(--fh-weight-semibold);
}

.picker-toggle {
  width: 22px;
  height: 22px;
  margin-right: 4px;
  border-radius: 4px;
  color: var(--fh-muted, #6b7280);
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.picker-toggle:not(.is-leaf):hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--fh-text, #1e293b);
}

.picker-caret {
  font-size: var(--fh-text-xs);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.picker-caret.is-expanded {
  transform: rotate(90deg);
}

.picker-folder-icon {
  font-size: var(--fh-text-lg);
  margin-right: 0.5rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.picker-label {
  font-size: var(--fh-text-base);
  line-height: var(--fh-leading-snug);
  /* .flex-fill (flex: 1 1 auto) defaults to min-width: auto (= min-content),
     which silently defeats .text-truncate's ellipsis and can force the row —
     and any fluid grid/flex ancestor sized off it — wider than intended. */
  min-width: 0;
}

.picker-check-icon {
  font-size: var(--fh-text-base);
  flex-shrink: 0;
}

.tree-children.picker-children {
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px dashed var(--fh-border, #cbd5e1);
  margin-top: 2px;
}

.picker-no-children,
.picker-loading {
  font-size: var(--fh-text-sm);
  color: var(--fh-muted, #6b7280);
}

