/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
/* Document Tree View Styles */
.document-tree {
  font-family: inherit;
}

.tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tree-node {
  position: relative;
}

.folder-item, .file-item {
  position: relative;
  transition: all 0.15s ease;
  border-radius: 0.375rem;
}

.folder-item:focus, .file-item:focus {
  outline: 2px solid rgb(59 130 246);
  outline-offset: 2px;
}

.folder-item.expanded .folder-icon {
  transform: rotate(0deg);
}

.folder-children {
  transition: all 0.2s ease;
  overflow: hidden;
}

.file-item.selected {
  background-color: rgb(59 130 246 / 0.1);
  border-left: 3px solid rgb(59 130 246);
}

.dark .file-item.selected {
  background-color: rgb(59 130 246 / 0.2);
  border-left-color: rgb(147 197 253);
}

/* Hover states for tree items */
.folder-item:hover, .file-item:hover {
  transform: translateX(2px);
}

/* Animation for folder expand/collapse */
.folder-children {
  animation-duration: 0.2s;
  animation-timing-function: ease-out;
}

/* Focus styles for keyboard navigation */
.document-tree:focus-within .folder-item:focus,
.document-tree:focus-within .file-item:focus {
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .document-tree {
    font-size: 0.875rem;
  }
  
  .tree-node {
    margin-left: 0 !important;
  }
  
  .folder-children .tree-node {
    margin-left: 12px !important;
  }
}