/* Estilos para la vista jerárquica de categorías */

/* Eliminar el triángulo por defecto del summary */
details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* Rotación suave del ícono de expansión */
details[open] > summary svg:first-child {
  transform: rotate(90deg);
}

/* Hover para los elementos sin hijos */
.category-tree-item:hover {
  background-color: rgba(243, 244, 246, 0.5);
}

/* Remover línea de indentación para categorías */
.category-groups details > div {
  border-left: none;
}

/* Accordion específico para categorías sin líneas */
.accordion-categories {
  details {
    border-block-end-width: 0;
  }
  
  summary {
    padding-block: var(--size-2);
    
    &:hover {
      text-decoration: none;
    }
  }
}

/* Prevenir que el ícono de chevron se voltee con los botones */
.accordion summary::after {
  pointer-events: none;
}

/* Asegurar que los botones no interfieran con el accordion */
.accordion summary > div:last-child {
  position: relative;
  z-index: 1;
}

/* Último elemento sin línea inferior */
details > div > *:last-child {
  padding-bottom: 0;
}

/* Estilos para la vista de categorías estilo branch_price_lists */
.category-type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.25rem;
}

.category-type-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

.category-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.category-item-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.category-item-info {
  flex: 1;
}

.category-item-title {
  font-weight: 500;
  color: #4b5563;
  font-size: 0.875rem;
}

.category-item-parent {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}

.category-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}