/* Book Sections Tree Styling */

.section-node {
  position: relative;
}

.section-node::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #e5e7eb;
}

.section-node:last-child::before {
  height: 24px;
}

.section-node::after {
  content: '';
  position: absolute;
  left: -12px;
  top: 24px;
  width: 12px;
  height: 1px;
  background-color: #e5e7eb;
}

/* Hide connecting lines for root level sections */
.section-node[data-depth="0"]::before,
.section-node[data-depth="0"]::after {
  display: none;
}

/* Hover effects */
.section-node:hover {
  background-color: #f9fafb;
}

/* Selection states */
.section-node.selected {
  background-color: #eff6ff;
  border-left: 4px solid #3b82f6;
}

/* Transition effects for expand/collapse */
.children-container {
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

/* Custom scrollbar for the tree container */
.book-sections-tree::-webkit-scrollbar {
  width: 6px;
}

.book-sections-tree::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.book-sections-tree::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.book-sections-tree::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Loading states */
.section-loading {
  opacity: 0.6;
  pointer-events: none;
}

.section-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bulk actions floating panel */
.bulk-actions-panel {
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-node {
    padding: 12px;
  }
  
  .section-node .action-buttons {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .section-node .action-buttons button,
  .section-node .action-buttons a {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}

/* Print styles */
@media print {
  .bulk-actions-panel,
  .action-buttons,
  .selection-checkbox {
    display: none !important;
  }
  
  .section-node {
    break-inside: avoid;
  }
}
